[AJUDA] faser comando /gmx e quando digitar comando errado, surgir messgem ( comando inexistest)
#1

e so isso

pois n sei faser comando de gmx

e tambem n sei faser o negosso

que quando a pessoa digita um comando errado

de um messagem dizendo ( Comando inexistente )

obrigado pessoal
Reply
#2

pawn Код:
if(strcmp(cmd, "/gmx", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= /* LEVE DE ADM */)
            {

                SendClientMessageToAll(VERDECLARO, "[Gmx] O servidor foi reiniciado. Aguarde alguns segundos para logar novamente!");


                GameModeExit();
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando !");
            }
        }
        return 1;
    }
Espero ter ajudado.
Reply
#3

Mensagem de Comando inexistente:

Troque o 'return false;' de seu 'OnPlayerCommandText' para isso:
PHP код:
return SendClientMessage(playerid,-1,"Comando inexistente"); 
Comando GMX:

PHP код:
    if (strcmp(cmdtext,"/gmx",true) == 0)
    {
        if (!
IsPlayerAdmin(playerid)) // Checka se esta logado na RCON
            
return SendClientMessage(playerid,-1,"Vocк nгo й um Administrador RCON"); // Manda mensagem
    
        
SendClientMessageToAll(-1,"O Servidor esta sendo Reiniciado"); // Mensagem para todos jogadores , avisando que esta tendo GMX
        
SendRconCommand("Gmx"); // GMX
        
return true;
    } 
Reply
#4

Quote:
Originally Posted by Dark.Angel
Посмотреть сообщение
Mensagem de Comando inexistente:

Troque o 'return false;' de seu 'OnPlayerCommandText' para isso:
PHP код:
return SendClientMessage(playerid,-1,"Comando inexistente"); 
Comando GMX:

PHP код:
    if (strcmp(cmdtext,"/gmx",true) == 0)
    {
        if (!
IsPlayerAdmin(playerid)) // Checka se esta logado na RCON
            
return SendClientMessage(playerid,-1,"Vocк nгo й um Administrador RCON"); // Manda mensagem
    
        
SendClientMessageToAll(-1,"O Servidor esta sendo Reiniciado"); // Mensagem para todos jogadores , avisando que esta tendo GMX
        
SendRconCommand("Gmx"); // GMX
        
return true;
    } 
use o do dark, porque o do aKz somente executa oque estб na public OnGameModeExit.
Reply
#5

o SendRconCommand Muda nada Suyanw...



__________________________________________

...Meus Trabalhos...
[FisterScripts]
Sistema de Admin e Helper Simples
Sistema de Viagem v0.5

[Includes]
Nenhum...

[GameModes]
Nenhum...

[Tutoriais]
Nenhum...

[Maps]
W.D.A. ( Water Dylan Airport )

Se meu post lhe ajudou , lhe deixou confuso Clique nesta imagem >> << abaixo do meu avatar

[Ass] Assinatura feita por JORGE_HARD


Reply
#6

pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
pawn Код:
dcmd(gmx, 3, cmdtext); // OnPlayerCommandtext
pawn Код:
dcmd_gmx(playerid, params[]) // End Gamemode
{
     #pragma unused params
     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[!] You're not is Admin RCON!");
     GameModeExit();
     SendClientMessage(playerid, 0xFFFFFF, "You restarted the server!");
     return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)