TogglePlayerSpectating and Y_Classes
#6

pawn Код:
CMD:pzu(playerid,params[])
{
    new id;
    if(pInfo[playerid][AdminLevel] < 1 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,RED,"Tu turi būti administratorius kad galėtum naudoti љią komandą!");
    if(SpectatingPlayer[playerid] != INVALID_PLAYER_ID)
    {
        set.WasSpectating[playerid]=true;
        TogglePlayerSpectating(playerid,false);
        SendClientMessage(playerid,ORANGE,"Baigėte priћiūrėjimą!");
        SpectatingPlayer[playerid] = INVALID_PLAYER_ID;
                            SetPlayerPos(playerid,pos[0],pos[1],pos[2]);
        return 1;
    }
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,RED,"Naudojimas /pzu [ЋaidėjoID/DalisVardo]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,RED,"Tokio ћaidėjo nėra!");
    new Float:pos[3];
    GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
    TogglePlayerSpectating(playerid,true);
    SpectatingPlayer[playerid] = id;
    PlayerSpectatePlayer(playerid,id);
    SendClientMessage(playerid,RED,"Pradėjote prieћiūrą, norėdami ją baigti raљykite /pzu");
    return 1;
}
Try this.
Reply


Messages In This Thread
TogglePlayerSpectating and Y_Classes - by dusk - 15.12.2013, 12:27
Re: TogglePlayerSpectating and Y_Classes - by Zamora - 15.12.2013, 12:52
Re: TogglePlayerSpectating and Y_Classes - by dusk - 15.12.2013, 12:58
Re: TogglePlayerSpectating and Y_Classes - by Zamora - 15.12.2013, 13:09
Re: TogglePlayerSpectating and Y_Classes - by dusk - 15.12.2013, 13:22
Re: TogglePlayerSpectating and Y_Classes - by Zamora - 15.12.2013, 13:54
Re: TogglePlayerSpectating and Y_Classes - by dusk - 15.12.2013, 14:56
Re: TogglePlayerSpectating and Y_Classes - by dusk - 17.12.2013, 15:22
Re: TogglePlayerSpectating and Y_Classes - by dusk - 19.12.2013, 09:41
Re: TogglePlayerSpectating and Y_Classes - by dusk - 24.12.2013, 11:39

Forum Jump:


Users browsing this thread: 1 Guest(s)