[Pedido] Colocar comando no chat admin!
#1

Olб! entгo eu tenho um chat exclusivo para administraзгo. Porem para falar no chat й preciso fazer: "# [Mensagem]" e eu gostaria que fosse algo como "/aa [Mensagem]" Alguйm poderia me ajudar a criar esse cmd? Obrigado.

PHP код:
public OnPlayerText(playeridtext[])
{
        if(
text[0] == '#' && PlayerInfo[playerid][Level] >= 1) {
        new 
string[128]; GetPlayerName(playerid,string,sizeof(string));
        
format(string,sizeof(string),"| Admin Chat | %s[%i]:%s",string,playerid,text[1]); MessageToAdmins(COLOR_NOVO,string);
        return 
0;
    }
    
    if(
ServerInfo[MustLogin] == && PlayerInfo[playerid][Registered] == && PlayerInfo[playerid][LoggedIn] == 0)
    {
    
SendClientMessage(playerid,red,"| ERRO | Vocк nгo estб Logado!");
    return 
0;
    }
    if(
ServerInfo[DisableChat] == 1) {
        
SendClientMessage(playerid,red,"| ERRO | O chat esta Desativado!");
         return 
0;
    } 
Lembrando meu sistema de comando й "DCMD" Grato!
Reply
#2

PHP код:
dcmd:aa(playeridparams[])
{
    new 
texto[120], string[120], nome[MAX_PLAYER_NAME];
    if(
sscanf(params"u"texto)) return SendClientMessage(playerid, -1"[CORRETOR] - Use /aa [mensagem]");
    
GetPlayerName(playeridnome24);
    
format(stringsizeof(string), "[CHAT ADMIN] %s - %s"nome ,texto);
    
MessageToAdmins(-1string);
    return 
1;

Reply
#3

PHP код:
CMD:aa(playeridparams[])
{      
       
PlayerInfo[playerid][Level] >= 1) { 
        new 
string[128]; GetPlayerName(playerid,string,sizeof(string)); 
        
format(string,sizeof(string),"| Admin Chat | %s[%i]:%s",string,playerid,text[1]); MessageToAdmins(COLOR_NOVO,string); 
        return 
0
    } 
     
    if(
ServerInfo[MustLogin] == && PlayerInfo[playerid][Registered] == && PlayerInfo[playerid][LoggedIn] == 0
    { 
    
SendClientMessage(playerid,red,"| ERRO | Vocк nгo estб Logado!"); 
    return 
0
    } 
    if(
ServerInfo[DisableChat] == 1) { 
        
SendClientMessage(playerid,red,"| ERRO | O chat esta Desativado!"); 
         return 
0
    } 
Tente assim.
Reply
#4

Obrigado a tds! Resolvido.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)