SA-MP Forums Archive
/givemoney - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /givemoney (/showthread.php?tid=249167)



/givemoney - NitoPSG - 17.04.2011

Please guys i can't find a simple working /givemoney command, please give me a very simple command please!! (pawno code)


Re: /givemoney - ElieJabbour - 17.04.2011

If i knew where to post the /giveme coded command, i would've done it .. :P I suck at Coding


Re: /givemoney - Anteino - 17.04.2011

Quote:
Originally Posted by NitoPSG
Посмотреть сообщение
Please guys i can't find a simple working /givemoney command, please give me a very simple command please!! (pawno code)
you wan't a script to get money yourself or to give it to another player?


Re: /givemoney - admantis - 17.04.2011

pawn Код:
CMD:givemoney(playerid, params[]) // Give Money by admantis
{
    new
        Destination,
        Ammount,
        PlayerName[24],
        DestName[24],
        String[128];
    if (sscanf(params, "ui", Destination, Ammount))
        return SendClientMessage(playerid, -1, "  Usage: /givemoney <playerid> <ammount>");

    if (!IsPlayerConnected(Destination))
        return SendClientMessage(playerid, -1, "  Player is not connected !");
       
    if (GetPlayerMoney(playerid) < Ammount)
        return SendClientMessage(playerid, -1, "  Insufficent funds !");

    GetPlayerName(playerid, PlayerName, 24);
    GetPlayerName(Destination, DestName, 24);
    format(String, 128, "%s(%d) has sent you %d$", PlayerName, playerid, Ammount);
    SendClientMessage(Destination, -1, String);
    format(String, 128, "You've sent %d$ to %s(%d)", Ammount, DestName, Destination);
    SendClientMessage(playerid, -1, String);
   
    GivePlayerMoney(Destination, Ammount);
    GivePlayerMoney(playerid, -Ammount);
    return 1;
}
However if it's about giving to yourself..
pawn Код:
CMD:money(playerid, params[])
{
    GivePlayerMoney(playerid, params);
    new String[88];
    format(String, 88, "You gave %d$ to yourself!");
    SendClientMessage(playerid, -1, String);
    return 1;
}
Next time in Script Request thread.


Re: /givemoney - [ADC]Aldi96 - 17.04.2011

Search in ****** and oyu can find Givecash & givemoney command!!!!!!!!
Thats is just my help!!!!!!!!!!!!


Re: /givemoney - admantis - 17.04.2011

Quote:
Originally Posted by [ADC]Aldi96
Посмотреть сообщение
Search in ****** and oyu can find Givecash & givemoney command!!!!!!!!
Thats is just my help!!!!!!!!!!!!
Bother to respond when I clearly gave him his requested command, and to enworse stuff, with a useless answer?