[ajuda] Como fazer um cmd de GMX?
#1

Queria aprender a fazer um CMD de GMX
Reply
#2

primeiro vc tem aprender as variaveis, arryays etc.. gmx e um cmd bem simples

pawn Код:
if(strcmp(cmd, "/gmx", true) == 0 || strcmp(cmd, "/restart", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] > 1337)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342) { return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)"); }
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    { OnPlayerSave(i); }
                }
                GameModeExitFunc();
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para dar GMX!");
            }
        }
        return 1;
    }
Se te ajudei REP se nao Fail
Reply
#3

SendRconCommand("gmx");
Reply
#4

deu um erro
Quote:

C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(90) : warning 201: redefinition of constant/macro (symbol "DIALOG_INFO")
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(48547) : error 017: undefined symbol "admtrampando"
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(48547) : warning 215: expression has no effect
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(48547) : error 001: expected token: ";", but found "]"
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(48547) : error 029: invalid expression, assumed zero
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(48547) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#5

й so por isso no meio do "comando" que voce deseja...
pawn Код:
SendRconCommand("gmx");
facepalms
Reply
#6

pawn Код:
if(!strcmp(cmdtext,"/dargmx",true))
{
    SendRconCommand("gmx");
    return true;
}
Reply
#7

pawn Код:
if (strcmp("/gmx", cmdtext, true, 10) == 0)
{
    SendRconCommand("gmx");
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "[ GMX ] O Administrador %s reiniciou o Servidor!!", pname);
    SendClientMessageToAll(-1, string);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)