How to edit this
#3

this is a combination of zcmd && sscanf

pawn Код:
CMD:givemoney(playerid, params[])
{
    new string[128], playerb, amount;
    if(sscanf(params, "ui", playerb, amount)) return SendClientMessage(playerid, -1, "USAGE: /givemoney [playerid] [amount]");
    if(amount <= 0) return SendClientMessage(playerid, -1, "Invalid money amount.");
    if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid, -1, "You don't have that much on you right now.");
    GivePlayerMoney(playerid, -amount);
    GivePlayerMoney(playerb, amount);
    return 1;
}
Reply


Messages In This Thread
How to edit this - by RiChArD_A - 27.01.2013, 15:52
AW: How to edit this - by Blackazur - 27.01.2013, 17:10
Re: How to edit this - by Glad2BeHere - 27.01.2013, 17:24
Re: How to edit this - by denNorske - 27.01.2013, 17:45
Re: How to edit this - by DaRk_RaiN - 27.01.2013, 18:17
Respuesta: Re: How to edit this - by RiChArD_A - 27.01.2013, 23:30
Re: Respuesta: Re: How to edit this - by denNorske - 28.01.2013, 05:31
Respuesta: Re: Respuesta: Re: How to edit this - by RiChArD_A - 29.01.2013, 03:07
Re: How to edit this - by Threshold - 29.01.2013, 03:12
Respuesta: Re: How to edit this - by RiChArD_A - 29.01.2013, 03:13

Forum Jump:


Users browsing this thread: 3 Guest(s)