spectate player !+reps!
#1

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.
Reply
#2

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
Reply
#3

ok, this should work?
or were there also other possibilities?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)