07.12.2014, 19:10
(
Последний раз редактировалось MultiKill; 07.12.2014 в 19:59.
)
TogglePlayerSpectating
PlayerSpectatePlayer
Sу usar essas funзхes, usar variбveis e vocк irб conseguir.
Exemplo:
PlayerSpectatePlayer
Sу usar essas funзхes, usar variбveis e vocк irб conseguir.
Exemplo:
pawn Код:
new bool: Spec[MAX_PLAYERS];
new SpecId[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
Spec[playerid] = true;
SpecId[playerid] = killerid;
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
return 1;
}
CMD:proximo(playerid)
{
if(IsPlayerConnected(SpecId[playerid] + 1) && Spec[SpecId[playerid] + 1] == false)
{
SpecId[playerid] ++;
PlayerSpectatePlayer(playerid, SpecId[playerid]);
}
return 1;
}
CMD:anterior(playerid)
{
if(IsPlayerConnected(SpecId[playerid] - 1) && Spec[SpecId[playerid] - 1] == false)
{
SpecId[playerid] --;
PlayerSpectatePlayer(playerid, SpecId[playerid]);
}
return 1;
}