Bank Robbery - 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: Bank Robbery (
/showthread.php?tid=527462)
Bank Robbery -
ScriptFohLife - 22.07.2014
Hello SA-MP Forums, i'm using this robbery system but if you rob the bank you don't get any money and if you leave the bank, you still robbing it, please help!
Код:
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)
{
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!");
}
Re: Bank Robbery -
Sammi_Jackson - 22.07.2014
I've had this robbank script 2 and i had the same problem with the money. My problem was, i got the money but they lost them again 1 sec after. The reason was that i had anti money hack in the script so it wouldn't work unless i used GivePlayerCash instead of GivePlayerMoney
Re: Bank Robbery -
LivingLikeYouDo - 22.07.2014
pawn Код:
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);
}
Re: Bank Robbery -
ScriptFohLife - 22.07.2014
You only get the money like 1 sec then it go down, i got this error when i changed to GivePlayerCash instead of GivePlayerMoney
Код:
error 017: undefined symbol "GivePlayerCash"
Re: Bank Robbery -
DavidKember - 22.07.2014
It's the "server side money" problem. therefore you need good aknowledge on scripting to fix your issue, i can't teach you how.
Re: Bank Robbery -
driftpower - 22.07.2014
use the moneyhax include