Help with this command please?
#1

I'm trying to make it, so if a person does /loan then the target they did /loan on would have to "/take loan" In order to receive it. How would I add it to this?

pawn Код:
CMD:loan(playerid, params[])
{
    new Target, Amount;
    if( !sscanf(params, "ui", Target, Amount) )
    {
        if( Amount < 5000 ) return SendClientMessage(playerid, -1, "You can only pay a minimum ammount of 5000");
        if( Target == INVALID_PLAYER_ID ) return SendClientMessage(playerid, -1, "That person is Offline");
        if( Target == playerid ) return SendClientMessage(playerid, -1, "You can not give a loan to yourself!");
        if( GetPlayerMoney(playerid) < Amount ) return SendClientMessage(playerid, -1, "You don't have enough cash.");
        GivePlayerMoney(playerid, -Amount);
        GivePlayerMoney(Target, Amount);

    } else return SendClientMessage(playerid, -1, "Usage: /loan [playerid] [amount]");
    return 1;
}
Thanks for your help.
Reply


Messages In This Thread
Help with this command please? - by rangerxxll - 18.10.2011, 04:51
Re: Help with this command please? - by Ensconce - 18.10.2011, 04:58

Forum Jump:


Users browsing this thread: 1 Guest(s)