22.02.2012, 17:51
Queria aprender a fazer um CMD de GMX
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;
}
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. |
SendRconCommand("gmx");
if(!strcmp(cmdtext,"/dargmx",true))
{
SendRconCommand("gmx");
return true;
}
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;
}