[Ajuda] Bug's
#2

tenta assim:
PHP код:
//----------------------------------[cnn]-----------------------------------------------
    
if(strcmp(cmd"/cnn"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerInfo[playerid][pAdmin] >= 1)
            {
                if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1341)
                {
                    
MSGPLAYER(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/jogar)");
                    return 
1;
                }
                
GetPlayerName(playeridsendernamesizeof(sendername));
                new 
length strlen(cmdtext);
                while ((
idx length) && (cmdtext[idx] <= ' '))
                {
                    
idx++;
                }
                new 
offset idx;
                new 
result[64];
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                {
                    
result[idx offset] = cmdtext[idx];
                    
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                {
                    
MSGPLAYER(playeridCOLOR_GRAD2"USE: /cnn [cnn formato ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo ~l~=Preto]");
                    return 
1;
                }
                if(
admtrampando[playerid] == && admhide[playerid] == 1)
                {
                    
format(stringsizeof(string), "~b~felipe_mr: ~w~%s",result);
                }
                else
                {
                    
format(stringsizeof(string), "~b~%s: ~w~%s",sendername,result);
                }
                for(new 
0MAX_PLAYERSi++)
                {
                    if(
IsPlayerConnected(i))
                    {
                        
GameTextForPlayer(istring50003);
                    }
                }
                return 
1;
            }
            else
            {
                
MSGPLAYER(playeridCOLOR_GRAD1"   Vocк nгo estб autorizado a usar este comando!");
                return 
1;
            }
        }
        return 
1;
    }
    if(
strcmp(cmd"/cnnn"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerInfo[playerid][pAdmin] >= 1337)
            {
                
tmp strtok(cmdtextidx);
                new 
txtid;
                if(!
strlen(tmp))
                {
                    
MSGPLAYER(playeridCOLOR_GRAD2"USE: /cnnn <Digite> ");
                    return 
1;
                }
                
txtid strval(tmp);
                if(
txtid == 2)
                {
                    
MSGPLAYER(playeridCOLOR_GRAD2"Nгo existe 2! sу 0,1,3,4!");
                    return 
1;
                }
                new 
length strlen(cmdtext);
                while ((
idx length) && (cmdtext[idx] <= ' '))
                {
                    
idx++;
                }
                new 
offset idx;
                new 
result[64];
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                {
                    
result[idx offset] = cmdtext[idx];
                    
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                {
                    
MSGPLAYER(playeridCOLOR_GRAD2"USE: /cnnn <Digite> [cnnc formato ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo ~l~=Preto]");
                    return 
1;
                }
                
format(stringsizeof(string), "~w~%s",result);
                for(new 
0MAX_PLAYERSi++)
                {
                    if(
IsPlayerConnected(i) == 1)
                    {
                        
GameTextForPlayer(istring5000txtid);
                    }
                }
                return 
1;
            }
            else
            {
                
MSGPLAYER(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
                return 
1;
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread
[Ajuda] Bug's - by Vitor_Marfioso - 06.01.2012, 01:44
Re: [Duvida] Bug's - by felipe_mr - 06.01.2012, 01:49
Re: [Duvida] Bug's - by Vitor_Marfioso - 06.01.2012, 01:53
Re: [Duvida] Bug's - by Ricop522 - 06.01.2012, 01:58

Forum Jump:


Users browsing this thread: 2 Guest(s)