SA-MP Forums Archive
[Help]Robbank Command - 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)
+--- Thread: [Help]Robbank Command (/showthread.php?tid=425519)



[Help]Robbank Command - Zumba - 25.03.2013

How to make command for robbank to give randommoney,to have playertopoint, rank 5 or 6 to use this command just and to can use this command only one time in 3h and to make sendclientmessage on pLeader 1,2 pMember 1, admins and testers variable for admin and tester are: pAdmin and pTester.


Re: [Help]Robbank Command - kamzaf - 25.03.2013

to make the random money:
pawn Код:
new money = random(5000);
to make your rank 5 or 6 + is player near point use:
pawn Код:
if(blah blah > 5 && IsPlayerInRangeOfPoint(playerid, x,y,y))
{
   // command here
}
make a timer by using SetTimerEx("CommandTimer", 10800000, 0 ,"i",playerid); // 10800000 == 3h.


Re: [Help]Robbank Command - Zumba - 25.03.2013

I dont understand am beginner if you can do this for me i will be very thanks on you.
and if you can make command in zcmd please


Re: [Help]Robbank Command - Zumba - 25.03.2013

Someone to help please ??


Re: [Help]Robbank Command - kiloman3 - 26.03.2013

pawn Код:
#include <a_samp>
new cash = random(10000);
new money;

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/robbank", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 30, X, Y, Z) // replace XYZ with bank coordinates.  
        {
        format(money, 5, "You have robbed the bank and receive $%d", cash);
        SendClientMessage(playerid, 0xFFFFFFFF, money);
        GivePlayerMoney(playerid, cash);
        }
        return 1;

       }
    return 0;
}