[Ajuda] strcmp parameter.
#4

PHP код:
ALTCOMMAND:i->inventario
COMMAND:inventario(playeridparams[])
{
    new
        
subcmd[128],
        
subcmd2[128];
    
    if (
sscanf(params"s[24]S()[128]S()[128]"paramssubcmdsubcmd2))
    {
        
Inventario(playerid);
        return 
SendClientMessage(playeridCOLOR_SEAGREEN"USE: (/i)nventario (utilizar ou dropar).");
    }
    if (!
strcmp(params"dropar"))
    {
        new 
dropitem[32];
        if (
IsPlayerInAnyVehicle(playerid))
            return 
SendClientMessage(playeridCOLOR_LIGHTRED"ERRO: Vocк nгo pode usar este comando em um veнculo.");
        if (
sscanf(subcmd"s[32]"dropitem))
            return 
SendClientMessage(playeridCOLOR_WHITE2"USE: (/i)nventario dropar [nome]");
        if (!
strcmp("dinheiro"dropitemtrue))
        {
            new 
amount;
            if (
sscanf(subcmd2"d"amount))
                return 
SendClientMessage(playeridCOLOR_WHITE2"USE: (/i)nventario dropar dinheiro [quatidade]");
                
            if (
GetPlayerMoney(playerid) < amount)
                return 
SendClientMessage(playeridCOLOR_LIGHTRED"ERRO: Vocк nгo possui essa quantia em mгos.");
                
            
// Dropar
        
}
    }
    return 
1;

Reply


Messages In This Thread
strcmp parameter. - by SukMathcuck - 30.12.2016, 17:10
Re: strcmp parameter. - by Whoo - 30.12.2016, 17:16
Re: strcmp parameter. - by SukMathcuck - 30.12.2016, 17:38
Re: strcmp parameter. - by 1sbedx - 30.12.2016, 19:53

Forum Jump:


Users browsing this thread: 1 Guest(s)