Robbank system HELP - 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: Robbank system HELP (
/showthread.php?tid=175092)
Robbank system HELP -
Karl1195 - 08.09.2010
i got this robbank system from raven's i am using ravens... i would like to do it that when u go to a check point u get the money and not when u type /robbank you get the money can some one help me please thanks a lot...
Код:
i am trying to do it as u can see but when u go to the checpoint u get $0
Код:
public RobBank(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 2, 2309.6060,-4.0211,26.7422))
{
if(RobbingTime[playerid] > 0)
{
RobbingTime[playerid] --;
GameTextForPlayer(playerid, "~w~Remain in the ~r~Pickup ~w~until the time ends!", 1000,4);
}
else
{
KillTimer(RobBankTimer);
RobbingTime[playerid] = 1337;
WantedPoints[playerid] = 5;
SetPlayerCriminal(playerid,255, "Robbing the Bank");
SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
new money = random(21826);
GivePlayerMoney(playerid,money);
SendClientMessage(playerid, COLOR_GREY, "Your friends have taken the money to a safe spot.");
SendClientMessage(playerid, COLOR_GREY, "Now, go to the checkpoint to get the money! (Go outside)");
}
}
else
{
GameTextForPlayer(playerid, "~rYou Left The Checkpoint!", 2000,4);
RobbingTime[playerid] = 0;
KillTimer(RobBankTimer);
}
}
Re: Robbank system HELP -
Karl1195 - 08.09.2010
help please?
Re: Robbank system HELP -
Andrejs - 08.09.2010
You giving money to player when you SetPlayerCheckpoint
If you want to do like you want, you need to give money in public OnPlayerEnterCheckpoint