SA-MP Forums Archive
need little help for race last checkpoint - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: need little help for race last checkpoint (/showthread.php?tid=592098)



need little help for race last checkpoint - LovelySoomro - 20.10.2015

case 30:
{
DisablePlayerRaceCheckpoint(playerid);
AccInfo[playerid][races] +=1;
GameTextForPlayer(playerid,"30/30~n~Checkpoints",2000,6);
PlayerPlaySound(playerid,1097,0.0,0.0,0.0);
new pname[MAX_PLAYER_NAME], string[256 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string),"[NGP]: {80FFFF}%s {FF0000}Has Won The Race,In totals They Won {80FFFF}%d {FF0000}Races",pname,AccInfo[playerid][races]);
SendClientMessageToAll(LIGHTBLUE,string);
SetPlayerVirtualWorld(playerid, 0);
SetTimer("racesound",4000,false);
Racer[playerid] = 0;
racestart = 1;
}

when i finish last checkpoint i win but 2nd player is in race why


Re: need little help for race last checkpoint - Karan007 - 20.10.2015

Why is racestart = 1; ? Shouldn't it be racestart = 0; ?

Try it.


Re: need little help for race last checkpoint - Sh4d0w2 - 20.10.2015

Yeah I agreed with karan...It should be 0....

PHP код:
case 30:
{
DisablePlayerRaceCheckpoint(playerid);
AccInfo[playerid][races] == 0;
GameTextForPlayer(playerid,"30/30~n~Checkpoints",2000,6);
PlayerPlaySound(playerid,1097,0.0,0.0,0.0);
new 
pname[MAX_PLAYER_NAME], string[256 MAX_PLAYER_NAME];
GetPlayerName(playeridpnamesizeof(pname));
format(stringsizeof(string),"[NGP]: {80FFFF}%s {FF0000}Has Won The Race,In totals They Won {80FFFF}%d {FF0000}Races",pname,AccInfo[playerid][races]);
SendClientMessageToAll(LIGHTBLUE,string);
SetPlayerVirtualWorld(playerid0);
SetTimer("racesound",4000,false);
Racer[playerid] = 0;
racestart 1;




Re: need little help for race last checkpoint - LovelySoomro - 20.10.2015

ah i found it thanks when i set it to 0 it will be fixed


Re: need little help for race last checkpoint - Jay_Dixon - 20.10.2015

Why not use race checkpoints instead? It's much easier than what it seems like you're trying to do