Race: spawning in line
#4

Okay, this is the basic idea:

pawn Код:
new Float:X, Float:Y; //Coordinates the car will spawn on
new columns = 5; //This is the number of columns. If you set it to 5, a new row will start every 5 cars
new i;
while(idx >= columns*(i+1)) i++;
idx -= columns*i;
X = floatadd(FirstSpawn[0][0], floatmul(10.0, idx)); //Column
Y = floatsub(FirstSpawn[0][1], floatmul(10.0, i)); //Row
This is intended for cars facing north, if you want it differently tell me ^^

Replace idx with playerid! As an alternative, you can set idx to be the number of racers who already joined
Reply


Messages In This Thread
Race: spawning in line - by Amator - 26.09.2012, 12:13
Re: Race: spawning in line - by Rimeau - 26.09.2012, 12:23
Re : Race: spawning in line - by Amator - 26.09.2012, 12:30
Re: Race: spawning in line - by Rimeau - 26.09.2012, 13:00
Re : Race: spawning in line - by Amator - 26.09.2012, 13:10
Re: Race: spawning in line - by Rimeau - 26.09.2012, 13:17
Re : Race: spawning in line - by Amator - 26.09.2012, 13:20

Forum Jump:


Users browsing this thread: 2 Guest(s)