[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
#2

to ligado nisso

Quote:

switch (padmin)
{
case 1:
{
}
case 2:
{

}
case 3:
{

}
case 4:
{

}
case 5:
{

}
}

Reply
#3

onde coloco isso? sou novato
Reply
#4

Voce sabe formatar uma string ?
Reply
#5

nao !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)