spectate player !+reps! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: spectate player !+reps! (
/showthread.php?tid=303123)
spectate player !+reps! -
PawnoQ - 11.12.2011
hi,
i want that players that join cant spawn and that they spectate a certain player (the player that made the last kill)
ive tried it like this but i doesnt spectate no player then:
pawn Код:
new SpecPlayer:
//OnPlayerDeath
SpecPlayer = killerid;
//OnPlayerSpawn
TogglePlayerSpectating(playerid,true);
PlayerSpectatePlayer(playerid,SpecPlayer);
thx for help.
Re: spectate player !+reps! -
park4bmx - 11.12.2011
pawn Код:
new SpecPlayer[MAX_PLAYERS]=-1;//make it global ;X
//OnPlayerDeath
SpecPlayer[playerid] = killerid;
//OnPlayerSpawn
if(SpecPlayer[playerid]==-1) return SendClientMessage(playerid,-1,"No Kills Yet!");
TogglePlayerSpectating(playerid,true);
PlayerSpectatePlayer(playerid,SpecPlayer[playerid]);
try that out making the SpecPlayer global is a bad idea expectually for that kind of process
Re: spectate player !+reps! -
PawnoQ - 11.12.2011
ok, this should work?
or were there also other possibilities?