[Tutorial] How to make a robbery system
#33

You've forgot about setting the Robbed recently to 0, Lemme do it for you. You can also set up this thing in 1 timer instead of timer for every different robbery. But this way is more easy.


Code:
CMD:robthis(playerid, params[])
{
    #pragma unused params // we dont need the params
    if(IsPlayerInDynamicCP(playerid, CP_tatoo)) // Checking if player is in the checkpoint
	{
	    if(tatoorobbedrecently >=1) //checking if tatoo shop has been robbed recently
	    {
	        SendClientMessage(playerid, COLOR_RED, "Tatoo Shop has been robbed recently"); // sending error message
                return 1;
		}
                 SetTimer("robbedrecently", 180000, false);//Set a timer of 180 seconds to set the recentlyrobbed to 0
		ROBBING_TATOO[playerid] = 60; // setting the robbery timer
		tatoorobbedrecently =180; // Time the players needs to wait for starting an another robbery in the same place
	}

public robbedrecently()
{
    tatoorobbedrecently = 0;//Sets it to zero
}
	return 1;
}
Reply


Messages In This Thread
How to make a robbery system - by superrobot48 - 10.04.2014, 15:35
Re: How to make a robbery system - by SupaFool - 11.04.2014, 06:54
Re: How to make a robbery system - by Mriss - 11.04.2014, 07:01
Re: How to make a robbery system - by superrobot48 - 11.04.2014, 07:13
Re: How to make a robbery system - by Mriss - 11.04.2014, 07:25
Re: How to make a robbery system - by superrobot48 - 11.04.2014, 07:54
Re: How to make a robbery system - by ThatThoseTheThy - 18.04.2014, 20:07
Re: How to make a robbery system - by [YU]Nikola - 19.04.2014, 14:23
Re: How to make a robbery system - by ThatThoseTheThy - 20.04.2014, 20:28
Re: How to make a robbery system - by Niko_boy - 20.04.2014, 21:11
Re: How to make a robbery system - by ThatThoseTheThy - 21.04.2014, 11:00
Re: How to make a robbery system - by Niko_boy - 21.04.2014, 13:07
Re: How to make a robbery system - by superrobot48 - 22.04.2014, 14:06
Re: How to make a robbery system - by superrobot48 - 22.04.2014, 14:09
Re: How to make a robbery system - by superrobot48 - 22.04.2014, 14:11
Re: How to make a robbery system - by biker122 - 24.04.2014, 12:35
Re: How to make a robbery system - by TazmaNiax - 15.05.2014, 06:41
Re: How to make a robbery system - by superrobot48 - 15.05.2014, 08:16
Re: How to make a robbery system - by itsCody - 15.05.2014, 08:21
Re: How to make a robbery system - by TazmaNiax - 15.05.2014, 10:54
Re: How to make a robbery system - by AiRaLoKa - 15.05.2014, 12:08
Re: How to make a robbery system - by TazmaNiax - 16.05.2014, 00:29
Re: How to make a robbery system - by AiRaLoKa - 16.05.2014, 06:23
Re: How to make a robbery system - by rockhopper - 18.05.2014, 04:59
Re: How to make a robbery system - by superrobot48 - 21.05.2014, 17:41
Re: How to make a robbery system - by rockhopper - 04.06.2014, 06:01
Re: How to make a robbery system - by superrobot48 - 04.06.2014, 11:07
Re: How to make a robbery system - by superrobot48 - 02.09.2014, 09:32
Re: How to make a robbery system - by Th3UnKnOwN - 28.11.2014, 05:36
Re: How to make a robbery system - by Arastair - 28.11.2014, 08:36
Re: How to make a robbery system - by MaxJohnson - 23.06.2015, 12:50
Re: How to make a robbery system - by Inn0cent - 23.06.2015, 19:44
Re: How to make a robbery system - by Inn0cent - 24.06.2015, 18:04
Re: How to make a robbery system - by joetang73 - 27.06.2015, 13:18

Forum Jump:


Users browsing this thread: 1 Guest(s)