[HELP] Random tp to the prison cells
#2

pawn Код:
new Float:PrisonCells[6][3] =
{
    {146.641326, 1086.450805, 523.917419}// Cell ID 0
    {143.410385, 1086.557373, 523.917419}// Cell ID 1
    {140.075027, 1086.834594, 523.917419}// Cell ID 2
    {125.594047, 1086.595458, 523.917419}// Cell ID 3
    {122.502304, 1086.180175, 523.911437}// Cell ID 4
    {119.788101, 1086.267700, 523.911437}   // Cell ID 5
};

new id = random(sizeof(PrisonCells));
SetPlayerPos(playerid, PrisonCells[id][0], PrisonCells[id][1],PrisonCells[id][2]);
--

This part was wrong:
pawn Код:
new Float:PrisonCells[][0] =
--

I suggest you read a bit more about 'arrays' and how they're structured.
https://sampforum.blast.hk/showthread.php?tid=318212
Reply


Messages In This Thread
[HELP] Random tp to the prison cells - by Roei1998 - 10.07.2014, 15:25
Re: [HELP] Random tp to the prison cells - by Threshold - 10.07.2014, 15:50
Re: [HELP] Random tp to the prison cells - by Luca12 - 10.07.2014, 15:51
Re: [HELP] Random tp to the prison cells - by Threshold - 10.07.2014, 16:00

Forum Jump:


Users browsing this thread: 3 Guest(s)