(/command [id] [time]) how can i add another variable?
#6

wow this is class:
pawn Код:
CMD:setmoney(playerid,params[])
{
    new
        target,
        money;

    if(sscanf(params,"ui",target,money))
    {
        return SendClientMessage(playerid,COLOR_LIGHTGRAY,"USAGE: /setmoney [playerid] [amount]");
    }
    else
    {
        ResetPlayerMoney(target);
        GivePlayerMoney(target,money);
    }
    return 1;
}
but can i use it like this:

pawn Код:
if command bla bla?
{
    new
        target,
        money;

    if(sscanf(params,"ui",target,money))
    {
        return SendClientMessage(playerid,COLOR_LIGHTGRAY,"USAGE: /setmoney [playerid] [amount]");
    }
    else
    {
        ResetPlayerMoney(target);
        GivePlayerMoney(target,money);
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)