Robbery system help
#1

Guys, I have a cnr GM, While robbing a store, dialog box appears and makes player unable to move. So i want to remove dialog and put textdraw counter and if player moves out of checkpoint, robbery should fail. Can anyone please help with the following code
Код:
if(getCheckpointType(playerid) == CP_ZipMain)
	{
		if(zones[current_zone][zone_name] == zones[49][zone_name] || zones[current_zone][zone_name] == zones[50][zone_name] ||
		zones[current_zone][zone_name] == zones[51][zone_name] || zones[current_zone][zone_name] == zones[52][zone_name] ||
		zones[current_zone][zone_name] == zones[53][zone_name] || zones[current_zone][zone_name] == zones[54][zone_name])
	    {
		    if(DownZipRobbedRecently >= 1)
		    {
		        SendClientMessage(playerid,COLOR_ERROR,"The Downtown Zip has been robbed recently.");
		        return 1;
			}
			if(rrand <= 30)
			{
			    SendClientMessage(playerid,COLOR_ERROR,"Downtown Zip robbery failed.");
			    DownZipRobbedRecently =320;
			    return 1;
			}
			DownZipRobbedRecently =320;
			RobbingDownZip[playerid] =25;
			IncreaseWantedLevel(playerid,4);
			IncreasePlayerScore(playerid,1);
			format(string,sizeof(string),"Robbing Zip.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingDownZip[playerid]);
			ShowPlayerDialog(playerid,DIALOG_ZIP,DIALOG_STYLE_MSGBOX,"{FF0000}Zip Robbery",string,"Ok","Cancel");

			format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Downtown Zip! Get To Zip and arrest the suspect.",PlayerName(playerid),playerid);
			SendClientMessageToAllCops(string);

			format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Zip ..",PlayerName(playerid),playerid);
			SendClientMessageToAll(COLOR_RED,string);

			format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Zip ..",PlayerName(playerid),playerid);
			IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
			return 1;
		}
		return 1;
	}
Reply


Messages In This Thread
Robbery system help - by ponagandlamanoj - 25.02.2014, 17:34
Re: Robbery system help - by amirab - 25.02.2014, 17:46
Re: Robbery system help - by ponagandlamanoj - 25.02.2014, 17:57
Respuesta: Robbery system help - by CuervO - 25.02.2014, 18:01
Re: Robbery system help - by ponagandlamanoj - 25.02.2014, 18:02
Respuesta: Re: Robbery system help - by CuervO - 25.02.2014, 18:07
Re: Robbery system help - by ponagandlamanoj - 25.02.2014, 18:15

Forum Jump:


Users browsing this thread: 1 Guest(s)