[Pedido] TDM
#3

TogglePlayerSpectating
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;
}
Reply


Messages In This Thread
TDM - by leon44 - 07.12.2014, 15:56
Re: TDM - by [BOPE]Seu._.Madruga - 07.12.2014, 18:37
Re: TDM - by MultiKill - 07.12.2014, 19:10
Respuesta: TDM - by leon44 - 08.12.2014, 14:39
Re: TDM - by MultiKill - 08.12.2014, 16:06
Respuesta: TDM - by leon44 - 09.12.2014, 00:41
Re: TDM - by MultiKill - 09.12.2014, 01:13
Respuesta: TDM - by leon44 - 09.12.2014, 14:30

Forum Jump:


Users browsing this thread: 1 Guest(s)