Race multiple spawn position in order - 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: Race multiple spawn position in order (
/showthread.php?tid=613140)
Race multiple spawn position in order -
OKOK - 25.07.2016
Can someone please help me give a sample script on how to spawn players in a arranged order.
Let say there are 6 cars for example below..
[1] [2]
[3] [4]
[5] [6]
So. If player1 join he should be position in number 1, and player2 join he should be in position number 2. And so on.
Re: Race multiple spawn position in order -
Stuntff - 25.07.2016
Код:
static const Float:RaceSpawn[2][4] =
{
{X,Y,Z,A},{X,Y,Z,A}
};
new n = PlayersInRace;//TOTAL PLAYERS IN RACE.
SetPlayerPos(playerid, RaceSpawn[n][0], RaceSpawn[n][1], RaceSpawn[n][2]);
Re: Race multiple spawn position in order -
OKOK - 25.07.2016
Wow thanks for the reply! But what should I do with PlayersInRace? It says undefined.
Re: Race multiple spawn position in order -
Dayrion - 25.07.2016
Quote:
Originally Posted by OKOK
Wow thanks for the reply! But what should I do with PlayersInRace? It says undefined.
|
By saying PlayersInRace he meant the ID of the player.
Re: Race multiple spawn position in order -
Stuntff - 25.07.2016
Quote:
Originally Posted by Dayrion
By saying PlayersInRace he meant the ID of the player.
|
no. PlayersInRace = total players in race.