Spectator Question.
#1

Hello,
If a player Die's, He will Spectate his killer.
But, How to add something, if the player clicks on the right mouse button, he will switch to the next Player that's ''alive''..
And if he presses the lft Mouse button, he will switch to the Previous player That's '''Alive''?
Reply
#2

pawn Код:
new killer[ MAX_PLAYERS ];
public OnPlayerDeath(playerid, killerid, /* params */)
{
    killer[ playerid ] = killerid;
    TogglePlayerSpectating( playerid, killerid ) ..
    return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if( IsPlayerDead )
   {
      if( newkeys & KEY_WHATEVER_YOU_WANT
             TogglePlayerSpectate( killer[ playerid ] + 1, 1 );
      ..
    }
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)