Race: spawning in line
#1

Hello, I need some help about my racing mod, about spawns especially.

So I've done something like this:

pawn Код:
else if(playerid > 0 && playerid < 10) {
        if(started == 1){
            Veh[2] = CreateVehicle(487, FirstSpawn[0][0],FirstSpawn[0][1]+10,FirstSpawn[0][2], FirstSpawn[0][3], 3, 3, 60);
            SetPlayerVirtualWorld(playerid, 0);
            GameTextForPlayer(playerid, "~r~Race already started", 5000, 4);
            PutPlayerInVehicle(playerid, Veh[2], 0);
            TogglePlayerControllable(playerid, 1);
        }
        else {
            Veh[2] = CreateVehicle(487, FirstSpawn[0][0],FirstSpawn[0][1]+10,FirstSpawn[0][2], FirstSpawn[0][3], 3, 3, 60);
            PutPlayerInVehicle(playerid, Veh[2], 0);
            TogglePlayerControllable(playerid, 0);
        }
    }
Of course this doesn't work as I would like it to do.
My idea was to make something like giving the coordinates for playerid 0 and then setting the spawn pos of the others with these coordinates + some distance to make each car spawning by the previous. Like in this pic (don't criticize please ^^):



So playerid 0 has 1, playerid 1 has 2 .... Then playerid 10 (for example) would be placed on line '4' and we have cars on 2;4 3;4 3;5 and 2;5. I know the way to do it player by player 1 spawns here, 2 spawns here ect... But I was expecting another way to only write the first pos and then set the others to spawn next to it farer every time.

Hope to be clear, thanks for reading.
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)