Race... - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Race... (
/showthread.php?tid=184162)
Race... -
ColdXX - 18.10.2010
No,im not asking how to make races!
What i wanna ask is....
For example i have 1 checkpoint (like a race) and the first player that enters it wins something ,second player gets something too and third,same as above!
How to check that?
Thanks!
Re: Race... -
Nero_3D - 18.10.2010
Nothing more than
pawn Код:
static winner;
switch(++winner) {
case 1: GameTextForPlayer(playerid, "First", 5000, 4);
case 2: GameTextForPlayer(playerid, "Second", 5000, 4);
case 3: GameTextForPlayer(playerid, "Third", 5000, 4);
}
And if the race ends
Re: Race... -
ColdXX - 18.10.2010
I would like to have something like...when a player comes out as 3rd,the race ends!
Ok ill try something!
Re: Race... -
ColdXX - 18.10.2010
Help im stuck
![Cheesy](images/smilies/biggrin.png)
Ok so i have made the command to TP an put player in Vehicle!
I have create the Finish Checkpoint but im stuck here...help
Re: Race... -
Nero_3D - 19.10.2010
So just
pawn Код:
static winner;
switch(++winner) {
case 1: GameTextForPlayer(playerid, "First", 5000, 4);
case 2: GameTextForPlayer(playerid, "Second", 5000, 4);
case 3: {
winner = 0;
for(new i; i != MAX_PLAYERS; i++) {
if(PlayerCheckpoint[i] == RACE_CHECKPOINT)
{ //pseudo check for getting all players who attend the race
SetPlayerPos(i, 0.0, 0.0, 0.0); //Remove the players from race
}
}
GameTextForPlayer(playerid, "Third", 5000, 4);
SendClientMessage(playerid, 0xFFFF00FF, "Race ended!");
}
}