Jump to content

Leonard

Administrator
  • Posts

    1,303
  • Joined

  • Last visited

  • Days Won

    53

Everything posted by Leonard

  1. In loc de foreach( new x : Player ) pune foreach(new x : Player) Iar la textdraw, vezi ca e CrateTD[ numarul textdraw-ului ]
  2. Da-mi sursa de la erori.
  3. foreach( new x : Player ) { if( CrateTime[ x ] > 0 ) { CrateTime[ x ] --; new amount, rand, string[ 256 ]; if( CrateType[ x ] == 1 ) { rand = random( 30 ); } else { rand = random( 50 ); } switch( rand ) { case 0..15: { amount = random( 5 ) + 5; if( CrateType[ x ] == 1 ) { amount += 5; } format( string, sizeof string, "Step: %d/30~n~~y~%sx RP", 30 - CrateTime[ x ], FormatNumber( amount ) ); PlayerTextDrawSetString( x, CrateTD[ 4 ], string ); if( CrateTime[ x ] == 0 ) { PlayerInfo[ x ][ pExp ] += amount; Update( x, pRP ); SCM( x, COLOR_LGREEN, "Felicitari! Ai castigat RP-uri!" ); SetTimerEx( "hideCrateTextdraws", 2000, true, "d", x ); } } case 16..25: { amount = random( 50 ) + 100; if( CrateType[ x ] == 1 ) { amount += 100; } format(string, sizeof string, "Step: %d/30~n~~p~%s PremiumPoints", 30 - CrateTime[ x ], FormatNumber( amount ) ); PlayerTextDrawSetString( x, CrateTD[ 4 ], string ); if( CrateTime[ x ] == 0 ) { PlayerInfo[ x ][ pPremiumPoints ] += amount; Update( x, pPremiumPoints ); SCM( x, COLOR_LGREEN, "Felicitari! Ai castigat PremiumPoints!" ); SetTimerEx( "hideCrateTextdraws", 2000, true, "d", x ); } } default: { amount = random( 1000000 ) + 500000; if( CrateType[ x ] == 1 ) { amount += 500000; } format(string, sizeof string, "Step: %d/30~n~~g~$%s", 30 - CrateTime[ x ], FormatNumber( amount ) ); PlayerTextDrawSetString( x, CrateTD[ 4 ], string ); if( CrateTime[ x ] == 0 ) { GivePlayerCash(x, amount); Update( x, pCashx ); SCM( x, COLOR_LGREEN, "Felicitari! Ai castigat bani!" ); } } } } } function hideCrateTextdraws( playerid ) { for( new i = 0; i < 5; i++) { PlayerTextDrawHide( playerid, CrateTD[ i ] ); } return true; } Ti-am facut eu partea de td si ti-am pus un timer care sa stearga singur textdraw-urile.
  4. Problema rezolvata. Locked
  5. Defineste variabila new PlayerText: JobTD[MAX_PLAYERS][2]; Iar daca o ai definita deja, modific-o.
  6. @@iPanter Redenumeste textdraw-ul pentru titlu in JobTD[ playerid ][ 1 ] Si textdraw-ul pentru continut (castig, s.a.m.d) in JobTD[ playerid ][ 0 ] Si ai sa scapi de warning-uri.
  7. Consider ca ai rezolvat problema pe care o aveai din moment ce nu ai mai lasat nici un reply de 72 ore (3 zile). Locked
  8. Consider ca ai rezolvat problema pe care o aveai din moment ce nu ai mai lasat nici un reply de 72 ore (3 zile). Locked
  9. Poti face mult mai usor: format( string, sizeof string, "Castig: $%s\nCastig total: $%s\nTimp job: %s", FormatNumber( money ), FormatNumber( money + bonus ), CalculeazaTimp2( WorkingTime[ playerid ] ) ); PlayerTextDrawSetString( playerid, JobTD[ playerid ][ 0 ], string ); for( new i = 0; i { PlayerTextDrawShow( playerid, JobTD[ playerid ][ i ] ); } SetTimerEx( "numeTimer", 500, 0, "d", playerid );
  10. Acest topic are 72 ore (3 zile) de inactivitate. Locked
  11. Acest topic are 72 ore (3 zile) de inactivitate. Locked
  12. Acest topic are 72 ore (3 zile) de inactivitate. Locked
  13. Topic inactiv. Locked
  14. Problema rezolvata. Locked
  15. Problema rezolvata. Locked
  16. Acest topic are 72 ore (3 zile) de inactivitate. Drept urmare, am sa-l inchid. Locked
  17. Acest topic are 72 ore (3 zile) de inactivitate. Drept urmare, am sa-l inchid. Locked
  18. Acest topic are 72 ore (3 zile) de inactivitate. Drept urmare, am sa-l inchid. Locked
  19. @@CSORIN pe acela din systems.inc in modifici cu asta.
  20. Definesti sus in gameode new PlayerText:Speedo[MAX_PLAYERS][3]; Functia propriu zisa + optimizata function Checkvehinfo(playerid) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { if(InRaceArena[playerid] == 1 && !RaceStarted) return true; new engine, lights, alarm, doors, bonnet, boot, objective, string[128]; GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); if(CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][cID] != -2 && FindSpawnID(GetPlayerVehicleID(playerid)) != 0 && !IsAPlane(GetPlayerVehicleID(playerid))) { if(!IsABike(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid))) { format(string, sizeof string, "~%s~%d", (Carspeed(playerid) < 99) ? ("g") : ("r"), Carspeed(playerid)); TextDrawSetString(Speedo[playerid][0], string); format(string, sizeof string, "Fuel: ~%s~%d~n~~w~~h~%s~n~Odometer: %0.2f", (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("g") : ("r"), Gas[GetPlayerVehicleID(playerid)], (doors == 1) ? ("Doors: ~r~Locked~w~~h~") : ("Doors: ~g~Unlocked~w~~h~"), CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][KM]); TextDrawSetString(Speedo[playerid][2], string); } } else { if(!IsABike(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid))) { format(string, sizeof string,, "~%s~%d", (Carspeed(playerid) < 99) ? ("g") : ("r"), Carspeed(playerid)); TextDrawSetString(Speedo[playerid][0], string); format(string, sizeof string,, "Fuel: ~%s~%d", (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("g") : ("r"), Gas[GetPlayerVehicleID(playerid)]); TextDrawSetString(Speedo[playerid][2], string); } } for(new i = 0; i < 3; i++) { PlayerTextDrawShow(playerid, Speedo[playerid][i]); } } return 1; } Cu placere, @@CSORIN
×
×
  • Create New...