SA-MP Forums Archive
Robbank 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)
+--- Thread: Robbank Help (/showthread.php?tid=335168)



Robbank Help ((+Rep)) - Unknown1195 - 17.04.2012

Hello guys I have tried to edit the raven's robbank system but the gamemode kinda disconnected couldn't compile, all I added is that cops can't rob the bank and that to rob a bank you must have a mask anyways I might placed them wrong, thats why I am asking here.

This is the current working rob bank system:

Код:
//========Rob bank system==============
	if(strcmp(cmd, "/robbank", true) == 0)
	{
	    new success = random(2);
	    if(BankRobbedRecently == 1)
		{
		    SendClientMessage(playerid, COLOR_GREY, "* This location was robbed recently, try again later");
		    return 1;
		}
		if(PlayerInfo[playerid][pRobTime] >= 1)
		{
		    SendClientMessage(playerid, COLOR_GREY, "* You already attempted or robbed a place recently, please wait.");
		    return 1;
		}
	    if(IsPlayerInRangeOfPoint(playerid, 2, 345.2971,111.9458,1007.8197))
	    {
	        if(GetPlayerWeapon(playerid) >= 24 && GetPlayerWeapon(playerid) <= 40)
			{
		        if(PlayerInfo[playerid][pDuty] == 0)
				{
			        if(success == 1)
					{
				        SendClientMessage(playerid, COLOR_ORANGE, "* You are now Robbing the Los Santos Bank, please remain in the checkpoint for 95 Seconds!");
	                    RobbingTime[playerid] = 95;
						RobBankTimer = SetTimerEx("RobBank",1000,true,"i",playerid);
			            WantedPoints[playerid] = 5;
			            SetPlayerCriminal(playerid,255, "Robbing the Bank");
			            PlayerInfo[playerid][pRobTime] = 900;
			            BankRobbedRecently = 1;
						SetTimer("UnsetBankRob",1500000,false);
						OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
					}
					else
					{
					    SendClientMessage(playerid, COLOR_ORANGE, "* You failed to rob the Bank!");
					    WantedPoints[playerid] = 2;
			            SetPlayerCriminal(playerid,255, "Attempting to rob the Bank");
						PlayerInfo[playerid][pRobTime] = 500;
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* Go Off duty first!");
				    return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You need a deadly weapon to perform this Act!");
			    return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_GREY, "* You're not at the Bank Rob Point!");
		    return 1;
		}
		return 1;
	}
//============================================
Other codes:
Код:
if(PlayerInfo[playerid][pLeader] == 1)
if(PlayerInfo[playerid][pLeader] == 2)
if(PlayerInfo[playerid][pLeader] == 3)
if(PlayerInfo[playerid][pMember] == 1)
if(PlayerInfo[playerid][pMember] == 2)
if(PlayerInfo[playerid][pMember] == 3)


		{
		    SendClientMessage(playerid, COLOR_GREY, "Cops are not allowed to rob the bank");
		    return 1;
		}
Код:
if(PlayerInfo[i][pMaskuse] == 1)
- When you wearing a Mask I guess


Re: Robbank Help - AMEENAMEEN - 17.04.2012

why dont u try pmember only because the leader is already a member


Re: Robbank Help - Unknown1195 - 17.04.2012

Yah your right but that's not the problem I don't know what's wrong since it's kinda crashing. So I need some one to add that for me and I test it and I can see what I did wrong.


Re: Robbank Help - Unknown1195 - 17.04.2012

>Anyone?