[Ajuda] comando fail..
#1

olha tentei de varias formas mas nгo estб funcionando de maneira alguma.

se alguma alma abenзoada puder ajudar agradeзo

PHP код:
if(strcmp("/adm"cmdtrue) == 0)
    {
        if(
PlayerInfo[playerid][ADM] > || PlayerInfo[playerid][RCON] == true)
        {
            new 
outro[10];
            new 
nivelsenha[30], fileadm[60];
            if(
sscanf(cmdtext"s[10]s[10]"cmdoutro))
            {
                
SendClientMessage(playeridVermelho"Ops! Digite: /adm [dar | promover | tirar]");
                return 
1;
            }
            
            if(
strcmp(outro"tirar"true) == 0)
            {
                if(
sscanf(cmdtext"s[10]s[24]"cmdplid))
                {
                    
SendClientMessage(playeridVermelho"Ops! Digite: /adm tirar [usuario]");
                    return 
1;
                }
                
format(stringsizeof(string), "%s"plid);
                new 
us GetPlayerID(string);
                
format(fileadmsizeof(fileadm), ARQUIVO_STAFFSus);
                if(
dini_Exists(fileadm))
                {
                    if(
IsPlayerConnected(us))
                    {
                        
dini_Remove(fileadm);
                        
PlayerInfo[us][ADM] = 0;
                        
format(stringsizeof(string), "o staff %s, acaba de remover vocк de admin."jogador);
                        
SendClientMessage(usAzulClarostring);
                    }
                    else
                    {
                        
dini_Remove(fileadm);
                    }
                    
SendClientMessage(playeridVerde"jogador removido da staff com sucesso.");
                }
            }
            
            if(
strcmp(outro"dar"true) == 0)
            {
                if(
sscanf(cmdtext"s[10]s[24]ds[30]"cmdplidnivelsenha))
                {
                    
SendClientMessage(playeridVermelho"Ops! Digite: /adm dar [usuario] [nivel] [senha]");
                    return 
1;
                }
                
                
format(stringsizeof(string), "%s"plid);
                new 
us GetPlayerID(string);
                
                
format(fileadmsizeof(fileadm), ARQUIVO_STAFFSus);
                if(!
dini_Exists(fileadm))
                {
                    
CRIARADM(fileadmsenhanivel);
                    
PlayerInfo[us][ADM] = nivel;
                    
SendClientMessage(playeridVerde"jogador colocado como staff com sucesso.");
                    
format(stringsizeof(string), "o staff %s, acaba de colocar vocк como admin nivel %d."jogadornivel);
                    
SendClientMessage(usAzulClarostring);
                    
format(stringsizeof(string), "a senha de staff para vocк logar em sua conta й %s"dini_Get(fileadm"SENHA"));
                    
SendClientMessage(usAmarelostring);
                }
            }
            if(
strcmp(outro"promover"true) == 0)
            {
                if(
sscanf(cmdtext"s[10]s[24]d"cmdplidnivel))
                {
                    
SendClientMessage(playeridVermelho"Ops! Digite: /adm promover [usuario] [nivel]");
                    return 
1;
                }
                
                
format(stringsizeof(string), "%s"plid);
                new 
us GetPlayerID(string);
                
                if(
nivel || nivel 3)
                {
                    
SendClientMessage(playeridVermelho"desculpe, mas os niveis staff vгo de 0 a 3.");
                    return 
1;
                }
                
format(fileadmsizeof(fileadm), ARQUIVO_STAFFSus);
                if(
dini_Exists(fileadm))
                {
                    
dini_IntSet(fileadm"NIVEL"nivel);
                    
PlayerInfo[us][ADM] = nivel;
                    
SendClientMessage(playeridVerde"jogador colocado como staff com sucesso.");
                    
format(stringsizeof(string), "o staff %s, acaba de colocar vocк como admin nivel %d."jogadornivel);
                    
SendClientMessage(usAzulClarostring);
                    
format(stringsizeof(string), "a sua senha staff continua sendo %s"dini_Get(fileadm"SENHA"));
                    
SendClientMessage(usAmarelostring);
                }
            }
            
        }
        else
        {
            
SendClientMessage(playeridVermelho"desculpe, mas vocк nгo tem permissгo.");
        }
        return 
1;
    } 
Reply
#2

utilize strfind ao invйs de strcmp nos locais (dar, promover, tirar)
Reply
#3

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
utilize strfind ao invйs de strcmp nos locais (dar, promover, tirar)
continua a mesma coisa.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)