prevent multiple spawns
#1

hi,

lets say i have this spawnpositions defined:

pawn Код:
new Float:Spawns[12][5] =
{
    {-975.3903,-2925.9272,21.8838,284.3823},
    {-972.0638,-2905.3533,21.8838,275.8586},
    {-956.3236,-2916.6104,21.8838,249.3463},
    {-956.7857,-2922.9092,21.8838,287.2159},
    {-936.2440,-2921.0129,21.8964,267.9487},
    {-975.3903,-2925.9272,21.8838,284.3823},
    {-972.0638,-2905.3533,21.8838,275.8586},
    {-956.3236,-2916.6104,21.8838,249.3463},
    {-956.7857,-2922.9092,21.8838,287.2159},
    {-936.2440,-2921.0129,21.8964,267.9487},
    {-975.3903,-2925.9272,21.8838,284.3823},
    {-936.2440,-2921.0129,21.8964,267.9487}
};
I want to let players or vehicles spawn there, so how could i make it like there is only one vehicle/player spawned at a place and not multiple ones?

I want them to be spawned like this:

pawn Код:
for (new i=0; i<MAX_PLAYERS;i++)
{
new Spawn = random(sizeof(Spawn));
Vehicles[i] = CreateVehicle(500,Spawn[Spawn][0],Spawn[Spawn][1],Spawn[Spawn][2],Spawn[Spawn][4],1,1,0);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)