[Ajuda] Ver todos Cmd's
#15

pawn Код:
// OnPlayerConnect
SetPVarInt(playerid, "VendoCmds", 0);

// --
CMD:vercmds(playerid)
{
    if(!IsPlayerAdmin(playerid)) return 1;
    if(GetPVarInt(playerid, "VendoCmds") == 0)
    {
        SetPVarInt(playerid, "VendoCmds", 1);
        SendClientMessage(playerid, -1, "Vendo comandos ativado.");
    }
    else if(GetPVarInt(playerid, "VendoCmds") == 1)
    {
        SetPVarInt(playerid, "VendoCmds", 0);
        SendClientMessage(playerid, -1, "Vendo comandos desativado.");
    }
    return 1;
}

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    new myam_Name[MAX_PLAYER_NAME], String[125];
    GetPlayerName(playerid, myam_Name, sizeof(myam_Name));
    if(success){
        format(String, sizeof(String), "** %s digitou o comando %s {00FF00}[existente]", myam_Name, cmdtext);
        for(new my = 0; my<MAX_PLAYERS; my++){
            if(IsPlayerConnected(my)){
                if(IsPlayerAdmin(my) && GetPVarInt(my, "VendoCmds") == 1){
                    SendClientMessage(my, -1, String);
                }
            }
        }
    }
    if(!success){
        format(String, sizeof(String), "** %s digitou o comando %s {FF0000}[inexistente]", myam_Name, cmdtext);
        for(new my = 0; my<MAX_PLAYERS; my++){
            if(IsPlayerConnected(my)){
                if(IsPlayerAdmin(my) && GetPVarInt(my, "VendoCmds") == 1){
                    SendClientMessage(my, -1, String);
                }
            }
        }
    }
    return 1;
}
Acredito que funcione .
Reply


Messages In This Thread
Ver todos Cmd's - by Stroon - 06.03.2014, 00:25
Re: Ver todos Cmd's - by yNexus - 06.03.2014, 00:39
Re: Ver todos Cmd's - by Stroon - 06.03.2014, 00:51
Re: Ver todos Cmd's - by yNexus - 06.03.2014, 01:02
Re: Ver todos Cmd's - by Stroon - 06.03.2014, 01:07
Re: Ver todos Cmd's - by yNexus - 06.03.2014, 01:23
Re: Ver todos Cmd's - by Stroon - 06.03.2014, 01:26
Re: Ver todos Cmd's - by Schocc - 06.03.2014, 01:51
Re: Ver todos Cmd's - by Input - 06.03.2014, 01:54
Re: Ver todos Cmd's - by Stroon - 06.03.2014, 02:05
Re: Ver todos Cmd's - by Schocc - 06.03.2014, 02:13
Re: Ver todos Cmd's - by Stroon - 06.03.2014, 02:14
Re: Ver todos Cmd's - by Myam - 06.03.2014, 10:23
Re: Ver todos Cmd's - by Stroon - 06.03.2014, 11:44
Re: Ver todos Cmd's - by Myam - 06.03.2014, 11:58
Re: Ver todos Cmd's - by Stroon - 06.03.2014, 12:57
Re: Ver todos Cmd's - by Myam - 06.03.2014, 13:12
Re: Ver todos Cmd's - by Stroon - 06.03.2014, 13:43

Forum Jump:


Users browsing this thread: 1 Guest(s)