CCTV - Server Unknown Command
#5

Well you do
pawn Код:
else if(CurrentCam[playerid] < 3)
  SetCam(playerid,CurrentCam[playerid]+1);
So CurrentCam[playerid]'s greater value is 3.

So the SetCam's camid, from your code, range from 0 to 3, and that is 4 cameras (0, 1, 2, 3).. and your cameras array size is only 3.

I think something like this is just better than your whole if/else if:
pawn Код:
SetCam(playerid, (CurrentCam[playerid] + 1) & (sizeof cameras - 1));
Reply


Messages In This Thread
CCTV - Server Unknown Command - by Mikep - 23.02.2009, 03:11
Re: CCTV - Server Unknown Command - by yom - 23.02.2009, 03:33
Re: CCTV - Server Unknown Command - by x-cutter - 23.02.2009, 03:35
Re: CCTV - Server Unknown Command - by Mikep - 23.02.2009, 03:48
Re: CCTV - Server Unknown Command - by yom - 23.02.2009, 06:33
Re: CCTV - Server Unknown Command - by MenaceX^ - 23.02.2009, 09:14
Re: CCTV - Server Unknown Command - by Mikep - 23.02.2009, 12:39
Re: CCTV - Server Unknown Command - by Norn - 23.02.2009, 12:41

Forum Jump:


Users browsing this thread: 3 Guest(s)