Spectate Script not working
#7

Do you mean ZCMD?

here you go:

pawn Код:
CMD:spec(playerid,params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id;
        if(sscanf(params,"u",id))return SendClientMessage(playerid,0xFF0000FF,"Usage: /spec[ID]");
        if(!IsPlayerConnected(id))return SendClientMessage(playerid,0xFF0000FF,"Player ID/Name not found!");
        if(id == playerid)return SendClientMessage(playerid,0xFF0000FF,"You can't spectate yourself!");
        if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid,0xFF0000FF,"Invalid PlayerID!");
        new string[64],name[24];
        GetPlayerName(id,name,24);
        SetPlayerInterior(playerid,GetPlayerInterior(id));
        TogglePlayerSpectating(playerid,true);
        PlayerSpectatePlayer(playerid,id);
        format(string,sizeof(string),"You are now spectating player: %s",name);
        SendClientMessage(playerid,0xFF0000FF,string);
    }else return SendClientMessage(playerid, 0xFF0000FF, "You are not an admin!");
    return 1;
}
CMD:specoff(playerid,params[])
{
    #pragma unused params
    if(IsPlayerAdmin(playerid))
    {
        TogglePlayerSpectating(playerid,false);
        SetCameraBehindPlayer(playerid);
        SendClientMessage(playerid,0xFF0000FF,"You have turned the spectating mode off.");
    }else return SendClientMessage(playerid, 0xFF0000FF, "You are not an admin!");
    return 1;
}
Reply


Messages In This Thread
Spectate Script not working - by SplinteX - 17.12.2013, 20:20
Re: Spectate Script not working - by jakejohnsonusa - 17.12.2013, 20:45
Re: Spectate Script not working - by SplinteX - 17.12.2013, 20:52
Re: Spectate Script not working - by SplinteX - 17.12.2013, 21:44
Re: Spectate Script not working - by BlackWolf120 - 17.12.2013, 21:53
Re: Spectate Script not working - by SplinteX - 17.12.2013, 21:57
Re: Spectate Script not working - by BlackWolf120 - 17.12.2013, 22:03
Re: Spectate Script not working - by SplinteX - 18.12.2013, 13:01

Forum Jump:


Users browsing this thread: 1 Guest(s)