06.04.2018, 12:46
if(i == 0) i = MAX_PLAYERS+1; <--- ? what are you trying to do with this?
use PVars or make player's global variable which will detect player's current spectating ID.
for example when player goes in spec, use SetPVarInt(playerid,"Spectating",targetid);
and than you can use PlayerSpectatePlayer(playerid,GetPVarInt(playerid, "Spectating")+1, SetPVarInt(playerid,"Spectating",GetPVarInt(player id,"Spectating")+1);
use PVars or make player's global variable which will detect player's current spectating ID.
for example when player goes in spec, use SetPVarInt(playerid,"Spectating",targetid);
and than you can use PlayerSpectatePlayer(playerid,GetPVarInt(playerid, "Spectating")+1, SetPVarInt(playerid,"Spectating",GetPVarInt(player id,"Spectating")+1);