[Ajuda]comando de /tv
#2

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/tv"true) == 0)
    {
        if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"Vocк nгo estб logado na RCON.");
        new 
player strtok(cmdtextidx);
        if(!
strlen(player)) return SendClientMessage(playerid, -1"USO: /tv [ID]");
        new 
id strval(player);
        if(
id playerid) return SendClientMessage(playerid, -1"Vocк nгo se espiar !");
        if(!
IsPlayerConnected(id)) return SendClientMessage(playerid, -1"JOGADOR OFFLINE");
        
TogglePlayerSpectating(playerid1);
        
SetPVarInt(playerid"TV"1);
        if(
IsPlayerInAnyVehicle(id)) { PlayerSpectateVehicle(playeridGetPlayerVehicleID(id)); }
        else { 
PlayerSpectatePlayer(playeridid); }
        return 
1;
    }
    if(
strcmp(cmdtext"/tvsair"true) == 0)
    {
        if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"Vocк nгo estб logado na RCON.");
        if(
GetPVarInt(playerid"TV") == 1
        { 
            
TogglePlayerSpectating(playerid0);
            
DeletePVar(playerid"TV");
        }
        else { 
SendClientMessage(playerid, -1"Vocк nгo estб espiando ninguйm.");
        return 
1;
    }
    return 
0;

Reply


Messages In This Thread
[Ajuda]comando de /tv - by Andrew_Guiga - 18.06.2011, 13:12
Re: [Ajuda]comando de /tv - by Shadoww5 - 18.06.2011, 14:15
Re: [Ajuda]comando de /tv - by Andrew_Guiga - 18.06.2011, 19:42

Forum Jump:


Users browsing this thread: 1 Guest(s)