gPrisonSpawn help !
#10

pawn Код:
SetPlayerPos(playerid, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2]);
SetPlayerPos(playerid, gPrisonSpawns[rand][3], gPrisonSpawns[rand][4], gPrisonSpawns[rand][5]);
SetPlayerPos(playerid, gPrisonSpawns[rand][6], gPrisonSpawns[rand][7], gPrisonSpawns[rand][8]);
That's the reason for your errors, the indexes can go from 0 to 2, not anything above. I don't even understand what you're trying to do teleporting the player 3 times, 2 times to an invalid location entirely.

To make the player go to a random jail, simply do:
pawn Код:
rand = random(sizeof(gPrisonSpawns));
SetPlayerPos(playerid, gPrisonSpawns[rand][0], gPrisonSpawns[rand][1], gPrisonSpawns[rand][2]);
Reply


Messages In This Thread
gPrisonSpawn help ! - by DanBike - 26.07.2011, 22:22
Re: gPrisonSpawn help ! - by Aleks1337 - 26.07.2011, 22:24
Re: gPrisonSpawn help ! - by Cro_Haxor - 26.07.2011, 22:27
Re: gPrisonSpawn help ! - by AndreT - 26.07.2011, 22:32
Re: gPrisonSpawn help ! - by DanBike - 26.07.2011, 22:45
Re: gPrisonSpawn help ! - by fie - 26.07.2011, 22:47
Re: gPrisonSpawn help ! - by DanBike - 26.07.2011, 22:52
Re: gPrisonSpawn help ! - by =WoR=Varth - 27.07.2011, 00:40
Re: gPrisonSpawn help ! - by DanBike - 27.07.2011, 09:16
Re: gPrisonSpawn help ! - by AndreT - 27.07.2011, 09:48

Forum Jump:


Users browsing this thread: 1 Guest(s)