[help]givemoney
#3

Full code will look like this.
I took this code from previous post.
Also be sure that you have 'ZCMD' include and sscanf include.
It is possible to define sscanf with native:
pawn Код:
native sscanf(const data[], const format[], {Float,_}:...);
pawn Код:
CMD:givemoney(playerid, params[])
{
    new
        giveplayerid,
        cash
    ;
    if(sscanf(params, "ud", giveplayerid, cash))
        return SendClientMessage(playerid, 0xAAAAAA, "Usage: /givemoney [playerid] [money]");
    if(!IsPlayerConnected(giveplayerid)) // here
        return SendClientMessage(playerid, 0xAAAAAA, "Player not connected");
    if(giveplayerid == playerid)
        return SendClientMessage(playerid, 0xAAAAAA, "You cannot give money to yourself");
       
    GivePlayerMoney(giveplayerid, cash);
    return 1;
}
Reply


Messages In This Thread
[help]givemoney - by omer5198 - 29.01.2011, 16:03
Re: [help]givemoney - by Mean - 29.01.2011, 16:12
Re: [help]givemoney - by FreshDoubleX - 29.01.2011, 16:54
Re: [help]givemoney - by Mean - 29.01.2011, 20:06

Forum Jump:


Users browsing this thread: 1 Guest(s)