[Ajuda] Trocar texto comando
#1

Como que se faz pra mudar o comando por exemplo
/admins
ai aparecerб uma caixa de diбlogo
e como que faz pro mesmo comando nao ser diбlogo mas aparecer texto no chat do servidor

cуdigo do comando + dialog:

PHP код:
if(strcmp(cmd"/admins"true) == 0)
    {
        new 
str[1000], count 0;
        for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
admin[i])
                {
                    if(
pAdmin[i] == 1)
                    {
                        
format(strsizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[MOD]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrsizeof(string));
                    }
                    if(
pAdmin[i] == 2)
                    {
                        
format(strsizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[ADM]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrsizeof(string));
                    }
                    if(
pAdmin[i] == 3)
                    {
                        
format(strsizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Chefe]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrsizeof(string));
                    }
                    if(
pAdmin[i] == 4)
                    {
                        
format(strsizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Guardiгo]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrsizeof(string));
                    }
                    if(
pAdmin[i] == 5)
                    {
                        
format(strsizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Dono]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrsizeof(string));
                    }
                    
count++;
                }
            }
        }
        if(
count == 0)
        {
            
ShowPlayerDialog(playeridplayersimpDIALOG_STYLE_MSGBOX".:: - ADM's Online - ::.""{FF0000}Nгo hб ADM's online no momento.""OK""");
        }
        else
        {
            
ShowPlayerDialog(playeridplayersimpDIALOG_STYLE_MSGBOX".:: - ADM's Online - ::."string"OK""");
        }
        return 
1;
    } 
cуdigo dialog:

PHP код:
if(count == 0)
        {
            
ShowPlayerDialog(playeridplayersimpDIALOG_STYLE_MSGBOX".:: - ADM's Online - ::.""{FF0000}Nгo hб ADM's online no momento.""OK""");
        }
        else
        {
            
ShowPlayerDialog(playeridplayersimpDIALOG_STYLE_MSGBOX".:: - ADM's Online - ::."string"OK""");
        }
        return 
1;
    } 
Reply


Messages In This Thread
Trocar texto comando - by Andelux - 06.12.2015, 19:23
Re: Trocar texto comando - by BykiLler - 06.12.2015, 19:36
Re: Trocar texto comando - by Andelux - 06.12.2015, 19:38
Re: Trocar texto comando - by BykiLler - 06.12.2015, 19:42
Re: Trocar texto comando - by Andelux - 06.12.2015, 19:45

Forum Jump:


Users browsing this thread: 1 Guest(s)