Setcash
#5

Quote:
Originally Posted by ue_falconx
Посмотреть сообщение
Most Probably copied from the LuxAdmin ^^

Well don't take it as an offense, just kidding.

I recommend you to use sscanf and Zcmd and ZCMD is the most fastest command processor in SAMP and sscanf is better and more efficient then other things.

pawn Код:
dcmd_setcash(playerid, params[])
{
    new pID, cash;
    if(IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "ud", pID, cash)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setcash [playerid] [amount of money]");
        if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
        ResetPlayerMoney(pID);
        GivePlayerMoney(pID,cash);
    }
    else
    {
            SendClientMessage(playerid, COLOR_RED, "You must be administrator to use that command!");
     }
}
Made a rough one, test if this works, made fast from phone.

-FalconX
I Wasn't Know How To Use This tmp2 and i copied it......
but any way the sscanf is really easy i learned it now by this cmd
and it's working fine thnx i am going to convert the all cmds to sccanf
Reply


Messages In This Thread
Setcash - by misho1 - 04.03.2012, 18:32
Re: Setcash - by Ballu Miaa - 04.03.2012, 18:35
Re: Setcash - by Konstantinos - 04.03.2012, 18:36
Re: Setcash - by FalconX - 04.03.2012, 18:38
Re: Setcash - by misho1 - 04.03.2012, 19:11
Re: Setcash - by FalconX - 04.03.2012, 19:59
Re: Setcash - by misho1 - 04.03.2012, 20:26
Re: Setcash - by misho1 - 05.03.2012, 20:28
Re: Setcash - by Chrillzen - 05.03.2012, 20:57
Re: Setcash - by MadeMan - 08.03.2012, 17:40

Forum Jump:


Users browsing this thread: 1 Guest(s)