Race multiple spawn position in order
#1

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.
Reply
#2

Код:
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]);
Reply
#3

Wow thanks for the reply! But what should I do with PlayersInRace? It says undefined.
Reply
#4

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.
Reply
#5

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
By saying PlayersInRace he meant the ID of the player.
no. PlayersInRace = total players in race.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)