Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //RobBank FS by Harexe
- #include <a_samp>
- #include <ocmd>
- #define COLOR_WHITE 0xFFFFFFAA
- new kill;
- forward robtimer(playerid);
- forward waittimer();
- new robpossible;
- public OnFilterScriptInit()
- {
- CreatePickup(1274, 0, 1467.6721,-1013.2075,1301.1060, -1);
- Create3DTextLabel("LosSantos Banka\nCMD:\n/robbank", 0x008080FF, 1467.6721,-1013.2075,1301.1060,50.00, 0, 0);
- robpossible = 1;
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- ocmd:robbank(playerid, params[])
- {
- if(robpossible == 1)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1467.6721,-1013.2075,1301.1060))
- {
- robpossible = 0;
- SetTimer("waittimer", 600000, false);
- kill = SetTimer("robtimer", 300000, false);
- SendClientMessage(playerid, COLOR_WHITE, "Poceo si pljackat banku policijaje obavjestena");
- SendClientMessage(playerid, COLOR_WHITE, "Moras cekat 5min da opljakas banku!");
- TogglePlayerControllable(playerid,0);
- }
- } else {
- SendClientMessage(playerid, COLOR_WHITE, "You can't rob the bank right now!");
- }
- return 1;
- }
- public robtimer(playerid)
- {
- new string[128];
- new cash = random(200000);
- GivePlayerMoney(playerid, cash);
- format(string, sizeof(string), "Uspjasno si opljacko $%d !", cash);
- TogglePlayerControllable(playerid,1);
- SendClientMessage(playerid, COLOR_WHITE, string);
- KillTimer(kill);
- }
- public waittimer()
- {
- robpossible = 1;
- SendClientMessageToAll(COLOR_WHITE, "Banka je opet spremna za pljacku!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement