-
Posts
1,303 -
Joined
-
Last visited
-
Days Won
53
Everything posted by Leonard
-
In loc de foreach( new x : Player ) pune foreach(new x : Player) Iar la textdraw, vezi ca e CrateTD[ numarul textdraw-ului ]
-
Da-mi sursa de la erori.
-
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.
-
Problema rezolvata. Locked
-
Defineste variabila new PlayerText: JobTD[MAX_PLAYERS][2]; Iar daca o ai definita deja, modific-o.
-
@@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.
-
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
-
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
-
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 );
-
hai noroc kumetre
-
Acest topic are 72 ore (3 zile) de inactivitate. Locked
-
Acest topic are 72 ore (3 zile) de inactivitate. Locked
-
Acest topic are 72 ore (3 zile) de inactivitate. Locked
-
66
-
wow, sunt bogat
-
Problema rezolvata. Locked
-
Problema rezolvata. Locked
-
Acest topic are 72 ore (3 zile) de inactivitate. Drept urmare, am sa-l inchid. Locked
-
Acest topic are 72 ore (3 zile) de inactivitate. Drept urmare, am sa-l inchid. Locked
-
Acest topic are 72 ore (3 zile) de inactivitate. Drept urmare, am sa-l inchid. Locked
-
@@CSORIN pe acela din systems.inc in modifici cu asta.
-
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
-
Hai norok kumetre
ABOUT LEAKS COMMUNITY
LEAKS.RO is a resource community where aspiring webmasters can share content and receive support for a wide variety of software platforms — no license required.