Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This filterscript was made by UnlimitedDeveloper on SA-MP Forums, credits to him. I made it better/edited it. / ScriptFohLife on SA-MP Forums.
- #include <a_samp>
- #include <zcmd>
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_TWBLUE 0x0000FFAA
- forward robtimer(playerid);
- forward waittimer();
- new robpossible;
- public OnFilterScriptInit()
- {
- robpossible = 1;
- return 1;
- }
- CMD:robbank(playerid, params[])
- {
- if(robpossible == 1)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 2309.1899,-8.4444,26.7422))
- {
- robpossible = 0;
- SetTimer("waittimer", 1200000, false);
- SetTimer("robtimer", 240000, false);
- SendClientMessage(playerid, COLOR_WHITE, "You gotta stay 2 minutes in the bank in order to rob it!");
- SendClientMessageToAll(COLOR_TWBLUE, "||----------------Latest News----------------||");
- SendClientMessageToAll(COLOR_GREEN, " Los Santos Bank Trust has Been Broken.");
- SendClientMessageToAll(COLOR_GREEN, " The Bank is Currentley getting Robbed. ");
- SendClientMessageToAll(COLOR_GREEN, " We will report more once we get more information.");
- SendClientMessageToAll(COLOR_TWBLUE, "||----------------Latest News----------------||");
- }
- } else {
- SendClientMessage(playerid, COLOR_WHITE, "You can't rob the bank right now!");
- }
- return 1;
- }
- public robtimer(playerid)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 4.0, 2309.1899,-8.4444,26.7422))
- {
- SendClientMessage(playerid, -1, "You failed to rob the bank!");
- return 1;
- }
- new string[128];
- new cash = random(200000);
- GivePlayerMoney(playerid, cash);
- format(string, sizeof(string), "You have successfully robbed $%d from the bank!", cash);
- SendClientMessage(playerid, COLOR_WHITE, string);
- }
- public waittimer()
- {
- robpossible = 1;
- SendClientMessageToAll(COLOR_WHITE, "The bank is now available for robbery!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement