[Ajuda] Diminuir cуdigo
#1

Estou no estudo completo de todas as funзхes do pawn, entгo, fui desenvolver um comando de '/skin' em strfind kkk, serб que dб pra diminuir isso aqui?
PHP код:
if(!strfind(cmdtext"/skin"true))
{
    if(
cmdtext[5] == '\0' || cmdtext[5] == ' ')
    {
        if(
cmdtext[5] != ' ' || cmdtext[6] == '\0')
            return 
SendClientMessage(playerid, -1"Uso da funзгo incorreta. Utilize: /skin [ID DA SKIN]");
        for(new 
6cmdtext[i] != EOSi++)
        {
            if(
cmdtext[i] != ' ')
            {
                new 
str[4];
                
strcat(strcmdtext[i]);
                for(new 
0str[v] != EOSv++)
                {
                    if(
str[v] < '0' || str[v] > '9')
                    {
                        
SendClientMessage(playerid, -1"Uso de funзгo incorreta. Utilize: /skin [ID DA SKIN]");
                        return 
true;
                    }
                }
                new 
id_of_skin strval(cmdtext[i]);
                if(
id_of_skin 299)
                    return 
SendClientMessage(playerid, -1"O uso de id de skins, sгo vбlidos atй 299.");
                
SetPlayerSkin(playeridid_of_skin);
                
SendClientMessage(playerid, -1"Sua skin foi alterada.");
                return 
true;
            }
        }
        
SendClientMessage(playerid, -1"Uso de funзгo incorreta. Utilize: /skin [ID DA SKIN]");
        return 
true;
    }
    return 
true;

Reply


Messages In This Thread
Diminuir cуdigo - by Pool - 23.11.2017, 22:17
Re: Diminuir cуdigo - by Whoo - 23.11.2017, 22:29
Re: Diminuir cуdigo - by RodrigoMSR - 23.11.2017, 22:37
Re: Diminuir cуdigo - by Pool - 23.11.2017, 22:55
Re: Diminuir cуdigo - by RodrigoMSR - 23.11.2017, 23:37
Re: Diminuir cуdigo - by JoaoBorges - 24.11.2017, 14:11
Re: Diminuir cуdigo - by Pool - 24.11.2017, 14:14
Re: Diminuir cуdigo - by JoaoBorges - 24.11.2017, 15:33
Re: Diminuir cуdigo - by Pool - 24.11.2017, 15:36
Re: Diminuir cуdigo - by RDM - 26.11.2017, 12:41

Forum Jump:


Users browsing this thread: 3 Guest(s)