SA-MP Forums Archive
Checkpoint 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: Checkpoint help (/showthread.php?tid=171660)



Checkpoint help - Karl1195 - 27.08.2010

I scripting some thing of my own that to rob the bank you have to do /robbank then it sends you to a checkpoint to pick your money. Now the problem is that when you go to the checkpoint you won't get any money.


This is the script:


Код:
//--------Robbank Checkpoint---------------

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);
			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);
	}
}
//---------------End here----------------------



Re: Checkpoint help - Karl1195 - 27.08.2010

help please


Re: Checkpoint help - Karl1195 - 27.08.2010

no one? PLEEASEEE


Re: Checkpoint help - Dime - 27.08.2010

Try put thus GivePlayerMoney(playerid,money); under
Quote:

new money = random(21826);

And stop spam.