How to alternate between 2 locations
#4

pawn Код:
new spawnIdx; // Global variable, used to determin last spawned index

new Float:VehicleSpawnLocs[2][3] =
{
      {533.1320,-1316.8053,16.9984,92.6},
      {537.8416,-1321.7615,16.9943,92.6}
};

stock GrottiSpawnVehicle(Your Params Here)
{
    if(spawnIdx > sizeof(VehicleSpawnLocs))
    {
        spawnIdx = 0;
    }
    else
    {
        spawnIdx++;
    }
    new Float:x = VehicleSpawnLocs[spawnIdx][0],
    Float:y = VehicleSpawnLocs[spawnIdx][1],
    Float:z = VehicleSpawnLocs[spawnIdx][2];
    CreateVehicle(...)
}
Something like that
Reply


Messages In This Thread
How to alternate between 2 locations - by Deal-or-die - 02.05.2012, 15:43
Re: How to alternate between 2 locations - by niels44 - 02.05.2012, 16:50
Re: How to alternate between 2 locations - by ViniBorn - 02.05.2012, 16:55
Re: How to alternate between 2 locations - by PrawkC - 02.05.2012, 16:58

Forum Jump:


Users browsing this thread: 1 Guest(s)