robbery system problem
#7

I used a loop for adding objects, then i used if(IsPlayerInRangeOfObject) for making the robbery command work


after that, I used loop for different making objects for EXAMPLE
Код:
ENUM

{

POSES LIKE XYZ
}

new SafeMoney[][MoneyOfSafe] =
{
    {382.519470, -56.520069, 1000.847290, 0.000000, 0.000000, -3.399998},
then the robbery command

Код:
 	{
 	if(SafeRecentlyRobbed[playerid] == 1)
	{
	format(str, 128, "{FF0000}[ERROR] {FFFFFF}This store has recently been robbed, please wait before robbing it again.");
	return SendClientMessage(playerid, -1, str);
	}
	if(SafeBeingRobbed[playerid] == 1)
	return SendClientMessage(playerid, -1, "{FF0000}[ERROR] {FFFFFF}You're already robbing a safe.");

	for(new i = 0; i < sizeof(StoreSafeMoney); i++)
	{



	if (IsPlayerInRangeOfPoint(playerid, 2.0, SafeMoney[i][SafeX], SafeMoney[i][SafeY], SafeMoney[i][SafeZ]))
    {
    SetPlayerLookAt(playerid, SafeMoney[i][SafeX], SafeMoney[i][SafeY]);
	ClearAnimations(playerid);
	SetTimer("RobberyStart", 0, false);
then the textdraws

Then, at the END,


SafeRecentlyRobbed[i] = 1;


then a 5 min timer, then the saferecentlyrobbed will be 0;


But it's not adding a COOLDOWN to THAT PARTICULAR SHOP/SAFE, it's adding cooldown to EVERY SAFE present in the ENUMS
Reply


Messages In This Thread
robbery system problem - by div - 23.06.2018, 07:21
Re: robbery system problem - by JasonRiggs - 23.06.2018, 07:24
Re: robbery system problem - by div - 23.06.2018, 07:50
Re: robbery system problem - by JasonRiggs - 23.06.2018, 07:58
Re: robbery system problem - by div - 23.06.2018, 08:01
Re: robbery system problem - by JasonRiggs - 23.06.2018, 08:06
Re: robbery system problem - by div - 23.06.2018, 08:17

Forum Jump:


Users browsing this thread: 4 Guest(s)