How to edit this
#10

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Well then it's highly recommended you use sscanf for this kind of command.
Download the latest SSCANF include/plugin and add
pawn Код:
#include <sscanf2>
to the top of your script. Then your command should be:
pawn Код:
CMD:givemoney(playerid, params[])
{
    new 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(amount > GetPlayerMoney(playerid)) return SendClientMessage(playerid, -1, "You don't have that much money.");
    GivePlayerMoney(playerb, amount);
    return 1;
}
Yep but I don't like to use sscanf
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: 4 Guest(s)