How to do things when i am jumping off bike+Q about that
#1

When i am driving fast in with bike and i am pressing ENTER to jump of the bike its doesnt jumps its like tping me to the place that i was clicking there enter and its same with cars and such
how to fix this?
+ is there Public or anything like OnPlayerJumpVehicle or something?
Reply
#2

Public OnPlayerExitVehicle

Also, when you press enter it TPs you somewhere?
Reply
#3

yeah i was thinking about that too and checked this nothing found i wills search again and here is those publics:
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    new string[256];
    new sendername[MAX_PLAYER_NAME];

    for(new i=0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(Spectate[i] != 255)
			{
    			PlayerSpectatePlayer(i,playerid);
			}
		}
	}
	if (GetPlayerState(playerid) == 1)
	{
		return 1;
	}
	TextDrawHideForPlayer(playerid, Textdraw53[playerid]);
	if(IsAnOwnableCar(vehicleid))
	{
	   	new Float:x,Float:y,Float:z;
		new Float:a;
		GetVehiclePos(vehicleid, x, y, z);
		GetVehicleZAngle(vehicleid, a);
		CarInfo[vehicleid][cLocationx] = x;
		CarInfo[vehicleid][cLocationy] = y;
		CarInfo[vehicleid][cLocationz] = z;
		CarInfo[vehicleid][cAngle] = a;
		OnPropUpdate(4,vehicleid);
	}
/*	if(CarAutolock[vehicleid] == 1)
	{
	    for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if (IsPlayerConnected(i))
			{
				SetVehicleParamsForPlayer(vehicleid,i,0,1);
				GameTextForPlayer(playerid,"~w~Car~n~~r~Autolocked",2500,3);
				return 1;
			}
		}
	}*/
/*	new keycar = PlayerInfo[playerid][pPcarkey];
	new vehicle = GetPlayerVehicleID(playerid);
	if(IsAnOwnableCar(vehicleid))
	{
	   	if(keycar == vehicleid)
		{
	   		for(new i = 0; i < MAX_PLAYERS; i++)
			{
			    if (IsPlayerConnected(i))
			    {
			       	SetVehicleParamsForPlayer(vehicleid,i,0,1);
			    }
				GameTextForPlayer(playerid, "~w~Vehicle~n~~r~Auto-Locked", 10000, 3);
				CarInfo[keycar][cLock] = 1;
   			}
		}
		else if(keycar2 == vehicleid)
		{
	   		for(new i = 0; i < MAX_PLAYERS; i++)
			{
			    if (IsPlayerConnected(i))
			    {
			       	SetVehicleParamsForPlayer(vehicleid,i,0,1);
			    }
				GameTextForPlayer(playerid, "~w~Vehicle~n~~r~Auto-Locked", 10000, 3);
				CarInfo[keycar2][cLock] = 1;
   			}
		}
		else if(keycar3 == vehicleid)
		{
	   		for(new i = 0; i < MAX_PLAYERS; i++)
			{
			    if (IsPlayerConnected(i))
			    {
			       	SetVehicleParamsForPlayer(vehicleid,i,0,1);
			    }
				GameTextForPlayer(playerid, "~w~Vehicle~n~~r~Auto-Locked", 10000, 3);
				CarInfo[keycar3][cLock] = 1;
   			}
		}
	}*/
	TextDrawHideForPlayer(playerid, Textdraw39[playerid]);
	TextDrawHideForPlayer(playerid, Textdraw40[playerid]);
	if(WearHelmet[playerid] == 1)
	{
		if(PlayerInfo[playerid][pHelmet] == 1)
		{
		RemovePlayerAttachedObject(playerid, helmet0[playerid]);
		}
		if(PlayerInfo[playerid][pHelmet] == 2)
		{
		RemovePlayerAttachedObject(playerid, helmet1[playerid]);
		}
		if(PlayerInfo[playerid][pHelmet] == 3)
		{
		RemovePlayerAttachedObject(playerid, helmet2[playerid]);
		}
		if(PlayerInfo[playerid][pHelmet] == 5)
		{
		RemovePlayerAttachedObject(playerid, helmet3[playerid]);
		}
		if(PlayerInfo[playerid][pHelmet] == 6)
		{
		RemovePlayerAttachedObject(playerid, helmet4[playerid]);
		}
		new sendername2[MAX_PLAYER_NAME];
		GetPlayerName(playerid, sendername2, sizeof(sendername2));
		SendClientMessage(playerid, TEAM_CYAN_COLOR, "* You just have remove your helmet.");
		format(string, sizeof(string), "* %s Removes his Helmet.", sendername2);
		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		UsingBelt[playerid] = 0;
		WearHelmet[playerid] = 0;
	}
	if(UsingBelt[playerid] == 1)
	{
		SendClientMessage(playerid, COLOR_GREY, "* You had Your seatbelt/helmet on, you removed it to exit the vehicle");
		UsingBelt[playerid] = 0;
		
	}
	if(IsAHarvest(vehicleid))
	{
	    if(FarmerVar[playerid] == 1)
	    {
			SetTimer("FarmerExit", 7000, 0);
			GameTextForPlayer(playerid, "~n~~w~You have ~r~7~w~ seconds~n~to get back on a harvest", 5000, 3);
	    }
	}
	if(IsADrugHarvest(vehicleid))
	{
	    if(DrugFarmerVar[playerid] == 1)
	    {
			SetTimer("DrugFarmerExit", 7000, 0);
			GameTextForPlayer(playerid, "~n~~w~You have ~b~7~w~ seconds~n~to get back on a harvest", 5000, 3);
	    }
	}
	if(IsASmuggleCar(vehicleid))
	{
	    if(SmugglerWork[playerid] == 1)
	    {
	        SetTimer("SmugglerExit", 7000, 0);
	        GameTextForPlayer(playerid, "~n~~w~You have ~r~7~w~ seconds~n~to get back in car", 5000, 3);
		}
	}
	if(gGas[playerid] == 1)
	{
	    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Left car", 500, 3);
	}
	if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0)
	{
		BusrouteEnd(playerid, vehicleid);
	}
	if (IsABus(vehicleid))
	{
		for (new i=0; i<=MAX_PLAYERS; i++)
		{
			if (IsPlayerConnected(i))
			{
				if (BusrouteEast[i][0] != 0 && BusrouteEast[i][1] == vehicleid)
				{
					//BusrouteEast[i][2] --;
					GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~g~Passenger Left The Bus", 5000, 3);
				}
				else if (BusrouteWest[i][0] != 0 && BusrouteWest[i][1] == vehicleid)
				{
					//BusrouteWest[i][2] --;
					GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~g~Passenger Left The Bus", 5000, 3);
				}
			}
		}
	}
	if(IsPlayerInAnyVehicle(playerid) == 1 && Seatbelt[playerid] == 1)
	{
        GetPlayerName(playerid, sendername, sizeof(sendername));
		Seatbelt[playerid] = 0;
		SendClientMessage(playerid, COLOR_WHITE, "You have taken off your seatbelt");
		format(string, sizeof(string), "* %s extends his arm unbuckling his seatbelt.", sendername);
	}
 	else if(IsPlayerInAnyVehicle(playerid) == 1 && Seatbelt[playerid] == 0)
	{
 	Seatbelt[playerid] = 0;
 	return 1;
	}
	ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	printf("%s", string);
	return 1;
}
Код:
else if ( PRESSED(KEY_SECONDARY_ATTACK) )
	{
	    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(gEngine[playerid] == 0 && engineOn[newcar] == 0)
            {
				SafeRemovePlayerFromVehicle(playerid);
				TogglePlayerControllable(playerid, 1);
				return 1;
            }
            else if(NoFuel[playerid] == 1)
			{
			    TogglePlayerControllable(playerid, 1);
				SafeRemovePlayerFromVehicle(playerid);
				NoFuel[playerid] = 0;
				return 1;
			}
        }
	    if(!IsPlayerInAnyVehicle(playerid))
	    {
	        if(GetPlayerSpecialAction(playerid) == 20)
			{
				PlayerDrankBeer[playerid] = 0;
			}
	        else if(GetPlayerSpecialAction(playerid) == 22)
			{
				PlayerDrankWine[playerid] = 0;
			}
	        else if(GetPlayerSpecialAction(playerid) == 23)
			{
				PlayerDrankSprunk[playerid] = 0;
			}
	        else if(GetPlayerSpecialAction(playerid) == 21)
			{
				PlayerSmokedCig[playerid] = 0;
				IsSmoking[playerid] = 0;
	            GetPlayerName(playerid, sendername, sizeof(sendername));
	            if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s takes a cigarette from his mouth and drops it on the ground.", sendername); }
	            else { format(string, sizeof(string), "* %s takes a cigarette from her mouth and drops it on the ground.", sendername); }
	            ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
	            if(UsingSmokeAnim[playerid] == 1)
	            {
	                ClearAnimations(playerid);
	            }
			}
		}
	    if(IsAtCandySprunk(playerid))
        {
            if(TookSprunk[playerid] == 0)
            {
                new Float:health;
                GetPlayerHealth(playerid, health);
                if(health != 0)
                {
		            SetRealMoney(playerid, (ScriptMoney[playerid] - 25));
		            SendClientMessage(playerid, COLOR_GREY, "* You paid 25$ to the Machine");
					TookSprunk[playerid] = 1;
		            SetTimerEx("SetHP",3750,false, "i", playerid);
				}
			}
		}
	    if (OfficerCourseStep[playerid] != 255)
		{
			if(OfficerCourseStep[playerid] == 1)
		    {
      			OfficerCourseStep[playerid] = 2;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- Brief Explanation of the Job ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"As Security Guard, you will have rights to wear an Uniform and carry Statal Issued Weapons.");
				SendClientMessage(playerid, COLOR_WHITE,"Abusing your weapons (Using them to DM) will result in a Suspension from Cop Duty.");
				SendClientMessage(playerid, COLOR_WHITE,"If you are suspended from cop duty, you wont be able to use your Security Guards Rights anymore till unbaned.");
				SendClientMessage(playerid, COLOR_WHITE,"As Officer, you will have to arrest all the Suspects (Orange), But Be careful! Do not Metagame!");
				SendClientMessage(playerid, COLOR_WHITE,"You will be able to open the doors of the LSPD, drive their cars and Use some commands such /radio");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 2)
		    {
		       	OfficerCourseStep[playerid] = 3;
		       	ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- What to do as a Security Guard ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"As Security Guard, Your job will be to take minor suspects into Custody with your Weapons (If Needed).");
				SendClientMessage(playerid, COLOR_WHITE,"You will be allowed to issue tickets, which will be your mayor job on the position apart of arresting.");
				SendClientMessage(playerid, COLOR_WHITE,"You can get hired as a security guard to secure places, BUT this requieres an officer approval first.");
				SendClientMessage(playerid, COLOR_WHITE,"You must bring Suspects (Oranges) down to the jail, Once they Surrender (Dark Orange) You may not attack them.");
				SendClientMessage(playerid, COLOR_WHITE,"You must use your RADIO to comunicate with the other officers if you are in trouble, always.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 3)
		    {
		        OfficerCourseStep[playerid] = 4;
		       	ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- What to NOT do as a Security Guard ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"As Security Guard, Your job wont be to take bribes and help criminals to fight the police or civilians.");
				SendClientMessage(playerid, COLOR_WHITE,"You are not allowed to issue tickets for no random reason nor abuse your /suspect Command for no reason.");
				SendClientMessage(playerid, COLOR_WHITE,"You may not take the cars and make a ferris wheel with them or leave then abandoned in the middle of nowhere.");
				SendClientMessage(playerid, COLOR_WHITE,"You may not use your weapons and cars to Deathmatch and carkill with them, that can lead to a server ban.");
				SendClientMessage(playerid, COLOR_WHITE,"You may not act like rambo and kill any suspect that you see on your TAB list, This is a roleplay server remember.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 4)
		    {
		        OfficerCourseStep[playerid] = 5;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- What can happen as a Corrupt Cop ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"You are considered corrupt if you break any server rule or law while carrying your uniform and are on duty.");
				SendClientMessage(playerid, COLOR_WHITE,"As a corrupt freecop, you can be hunted by the real police, the FBI or the Army if its really serious.");
				SendClientMessage(playerid, COLOR_WHITE,"If the police can't catch you, the administrators or the higher LEO will proceed to suspend you from cop duty.");
				SendClientMessage(playerid, COLOR_WHITE,"Repeatdely abuse of your weaponry / rights will lead to a server ban for Script Abuse, Deathmatching and Provoking.");
				SendClientMessage(playerid, COLOR_WHITE,"You can get Suspended from Active duty for more than a month, so be careful with your decissions, always.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 5)
		    {
		        OfficerCourseStep[playerid] = 6;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- What can happen as a Good Cop ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"You are considered a good cop if you don't break any law or server rule while on duty and you follow the protocol.");
				SendClientMessage(playerid, COLOR_WHITE,"As a good cop, your chances of being invited to the LSPD or getting accepted get increased a lot, by showing experience.");
				SendClientMessage(playerid, COLOR_WHITE,"As a non abusive cop, administrators will gain a good look of you and will start to trust you, even to make you a helper.");
				SendClientMessage(playerid, COLOR_WHITE,"If owners sees that you are good enough, they can even make you a platinium regular or master helper, or even a moderator.");
				SendClientMessage(playerid, COLOR_WHITE,"All these things can happen, so be careful with your decissions and take the correct ones, always!.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 6)
		    {
		        OfficerCourseStep[playerid] = 7;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- How to arrest a Suspect ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"First ask him to surrender, if he doesn't use the non lethal force until he surrenders, if he doesn't proceed to kill him.");
				SendClientMessage(playerid, COLOR_WHITE,"Once he surrenders, he will become in a darker orange name, so don't let them fool you, look at the radio and their names.");
				SendClientMessage(playerid, COLOR_WHITE,"Read his rights (/mir) And take him to the LSPD, if he tries to escape kill or report him to the administration, your choice.");
				SendClientMessage(playerid, COLOR_WHITE,"Once you are done with the processing, proceed to jail him depending the severity of his crime, 1-5 minutes, always be fair.");
				SendClientMessage(playerid, COLOR_WHITE,"If he asks for a lawyer, you must stay until the lawyer arrives to the PD and start the discussion about the crime.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 7)
		    {
		        OfficerCourseStep[playerid] = 8;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- How to Take down a suspect ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"If the suspect decides to use the force on you, by shooting you, you are allowed to shoot back without warning.");
				SendClientMessage(playerid, COLOR_WHITE,"Due the SA:MP Lag & Desync, always shoot to where he is heading, if he has low ping, depends on the ping.");
				SendClientMessage(playerid, COLOR_WHITE,"If there are more than two suspects and you are alone, RETREAT and call for backup, act like rambo if needed");
				SendClientMessage(playerid, COLOR_WHITE,"Do not waste your bullets on useless shoots, only fire if you are sure that you will give the suspect.");
				SendClientMessage(playerid, COLOR_WHITE,"To prevent them of escaping you can destroy the tires of their cars or shoot them thru the front glass.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 8)
		    {
		        OfficerCourseStep[playerid] = 9;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- How to rush to a place ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"If the suspect decides to hide on an interior, call for backup, you don't know if he is going to shoot you when you get in or not.");
				SendClientMessage(playerid, COLOR_WHITE,"If backups arrives, always follow your superiors' orders, if they tell you to stay outside, stay there and do not act like rambo.");
				SendClientMessage(playerid, COLOR_WHITE,"If they tell you to rush with them, take their weapons and NEVER get away from them, do not act like rambo and the team.");
				SendClientMessage(playerid, COLOR_WHITE,"Before entering, its recommended to pop the suspect(s)'s cars tires, get in the car and tell someone else to shoot the tires.");
				SendClientMessage(playerid, COLOR_WHITE,"After all if they try to escape, use your weapon, shoot at them until they decide to surrender, if they don't, kill them");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 9)
		    {
		        OfficerCourseStep[playerid] = 10;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- Some tips to be a great cop ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"Never give too high tickets, but not too low ones, if you give too much, people will hate, else they will think you are a fool.");
				SendClientMessage(playerid, COLOR_WHITE,"In a chase, use the tactic named 'lag pit', drive a bit ahead the suspect and try to ram them out of the road so you can slow them.");
				SendClientMessage(playerid, COLOR_WHITE,"If you are in an helicopter, always report yourself to the ATC and never Fly low, in case you are in low HP and kill everyone.");
				SendClientMessage(playerid, COLOR_WHITE,"Try to keep your Humour Sense and your Humour to the maximun, people will love that you threat them well and make a joke or two.");
				SendClientMessage(playerid, COLOR_WHITE,"Never do jokes such 'Pullover this is a cavity Search' or 'You're under arrest for being black', people hates such jokes.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 10)
		    {
		        OfficerCourseStep[playerid] = 11;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- How people will hate you ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"People will hate you if you always break the laws while on duty, such shooting to the air or wrecklessing driving.");
				SendClientMessage(playerid, COLOR_WHITE,"If you give someone a ticket for speeding, then you leave speeding, people will hate because you will abuse your sirens.");
				SendClientMessage(playerid, COLOR_WHITE,"Never exceed the ticket price, or the jail time, if someone pees on the plaza, doesn't means that you can give him 5 mins.");
				SendClientMessage(playerid, COLOR_WHITE,"Never abuse the suspect in any manner, sexually or phsycally, do not try to rape or hit them after they gave up, its DM...");
				SendClientMessage(playerid, COLOR_WHITE,"Doing jokes as suspect reasons or pulling someone for no reason can be annoying, people wont like you if you do that.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
			else if(OfficerCourseStep[playerid] == 11)
		    {
		        OfficerCourseStep[playerid] = 12;
		        ClearChatbox(playerid, 10);
				SendClientMessage(playerid, COLOR_GREEN,"--------------------------------- The End, Good Job! ---------------------------------");
				SendClientMessage(playerid, COLOR_WHITE,"Finally we arrived to the end, this means that if you payed enough atention you're ready for the test.");
				SendClientMessage(playerid, COLOR_WHITE,"The test for having a cop license will cost you 5000$, failed or passed you'll have to pay.");
				SendClientMessage(playerid, COLOR_WHITE,"If you pass, you will have the right to wear an uniform and call yourself a security officer.");
				SendClientMessage(playerid, COLOR_WHITE,"You need a driving license to do the test of course, and a passport to prevent illegal immigrants of this.");
				SendClientMessage(playerid, COLOR_WHITE,"Good luck with your test, we hope to see an officer like you in the future watching the streets!.");
				ClearChatbox(playerid, 3);
				SendClientMessage(playerid, COLOR_WHITE,"Press your defined VEHICLE ENTERING KEY to Continue, KEY SPRINT to return to the last one.");
			}
		}
	    if(AFK[playerid] == 1)
		{
			afkadmins --;
			AFK[playerid] = 0;
			TogglePlayerControllable(playerid, 1);
 			TextDrawHideForPlayer(playerid, Textdraw5);
			TextDrawHideForPlayer(playerid, Textdraw50);
			TextDrawShowForPlayer(playerid, Textdraw44);
			TextDrawShowForPlayer(playerid, Textdraw45);
			TextDrawShowForPlayer(playerid, Textdraw55);
			TextDrawShowForPlayer(playerid, Textdraw49[playerid]);
			TextDrawShowForPlayer(playerid, Textdraw51[playerid]);
			if(PlayerInfo[playerid][pWatch] == 1)
			{
				TextDrawShowForPlayer(playerid, Textdraw56);
				TextDrawShowForPlayer(playerid, Textdraw57);
				TextDrawShowForPlayer(playerid, Textdraw58);
			}
			if(!IsPlayerInAnyVehicle(playerid)) SafeSetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
            else SetVehiclePos(GetPlayerVehicleID(playerid), TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
 		}
		if(IsPlayerInRangeOfPoint(playerid, 1, -1423.8018,934.8103,1036.4380))
		{//DD Exit By CuervO_NegrO
			GameTextForPlayer(playerid, "~w~Blackfield, ~y~Las Venturas", 5000, 1);
			SafeSetPlayerInterior(playerid, 0);
			SafeSetPlayerPos(playerid,1090.9735,1606.6628,12.5469);
			SendClientMessage(playerid, TEAM_VAGOS_COLOR, "We Hope that You had Fun in the Stadium.");
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1,1462.1191,-1013.2958,26.8438))
		{//Bank enter.
			GameTextForPlayer(playerid, "~g~The Bank", 5000, 1);
			SafeSetPlayerInterior(playerid, 0);
			SafeSetPlayerPos(playerid,2306.4106,-13.9335,26.7422);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 2305.3479,-16.1179,26.7496))
		{//Bank exit.
			GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
			SafeSetPlayerInterior(playerid, 0);
			SafeSetPlayerPos(playerid,1457.3992,-1012.5910,26.8438);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 1554.9537,-1675.6584,16.1953))
		{//SAPD Entrance
			PlayerInfo[playerid][pInteriorNr] = 1;
			GameTextForPlayer(playerid, "~w~Police Department", 5000, 1);
			SafeSetPlayerInterior(playerid, 6);
			SafeSetPlayerPos(playerid,246.7079,66.2239,1003.6406);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 246.5325,62.4251,1003.6406))
		{//SAPD Exit
		    PlayerInfo[playerid][pInteriorNr] = 0;
			GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
			SafeSetPlayerInterior(playerid, 0);
			SafeSetPlayerPos(playerid,1552.3231,-1674.6780,16.1953);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 1154.0857,-1770.9600,16.5992))
		{//Ministery of Defense Entrance
			PlayerInfo[playerid][pInteriorNr] = 41;
			GameTextForPlayer(playerid, "~w~Ministery of Defense", 5000, 1);
			SafeSetPlayerInterior(playerid, 6);
			SafeSetPlayerPos(playerid,-667.9032,2615.0208,70.7787);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, -667.9032,2615.0208,70.7787))
		{//Ministery of Defense Exit
			PlayerInfo[playerid][pInteriorNr] = 0;
			GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
			SafeSetPlayerInterior(playerid, 0);
			SafeSetPlayerPos(playerid,1154.0857,-1770.9600,16.5992);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 478.0687,-1498.9708,20.4831))
		{//RPC Enter
			if(PlayerInfo[playerid][pRegularRank] >= 1 || PlayerInfo[playerid][pAdmin] >= 1)
			{
			    PlayerInfo[playerid][pInteriorNr] = 10;
				GameTextForPlayer(playerid, "~y~Welcome to... ~n~~w~The Regular Players Lounge ~n~~n~~n~~n~~n~~n~~n~~n~~n~ ~r~Crimes are Not Tolerated Here", 8500,3);
				SendClientMessage(playerid, COLOR_WHITE, "** Welcome, Get near the bar and type /drinks to get a list of Drinks");
				SendClientMessage(playerid, COLOR_WHITE, "** You Might want Explore, there are a few usefull pickups around");
	            SendClientMessage(playerid, COLOR_NICERED, "** Crimes are Forbidden, Any Crime Made here is equal to two hours of prison or jail.");
				SafeSetPlayerInterior(playerid, 3);
				SafeSetPlayerPos(playerid,-2638.7832,1403.1351,906.4609);
				SetPlayerVirtualWorld(playerid, 20);
				PlayerInfo[playerid][pVirWorld] = 20;
			}
			else return SendClientMessage(playerid, COLOR_GREY,"* You are not a Regular Player!");
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, -2636.8042,1402.9908,906.4609))
		{//RPC Exit
		PlayerInfo[playerid][pInteriorNr] = 0;
		GameTextForPlayer(playerid, "~w~Los Santos", 5000,1);
		SafeSetPlayerInterior(playerid, 0);
		SafeSetPlayerPos(playerid,478.9689,-1495.9681,20.4098);
		PlayerInfo[playerid][pVirWorld] = 0;
		SetPlayerVirtualWorld(playerid, 0);
		}

		else if (IsPlayerInRangeOfPoint(playerid, 1, 488.2531,-82.7632,998.7578))
		{
			//Misty/10 Green Toilets
			PlayerInfo[playerid][pInteriorNr] = 26;
			SafeSetPlayerPos(playerid, 2277.5942,-1139.8883,1050.8984);
			GameTextForPlayer(playerid, "~w~Restroom", 5000, 3);
			SafeSetPlayerInterior(playerid,11);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 2280.0476,-1139.5413,1050.8984))
		{
			//Misty/10 Green Toilets
			PlayerInfo[playerid][pInteriorNr] = 26;
			SafeSetPlayerPos(playerid, 490.9059,-81.4256,998.7578);
			GameTextForPlayer(playerid, "~w~Ten Green Bottles", 5000, 3);
			SafeSetPlayerInterior(playerid,11);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 306.2120,-141.8780,1004.0547))
		{
			GameTextForPlayer(playerid, "~w~Ammunation Training", 5000, 1);
			SafeSetPlayerPos(playerid, 301.2120,-141.8780,1004.0547);
			SetPlayerCheckpoint(playerid, 300.5705,-134.0464,1004.0625, 3);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1,304.2120,-141.8780,1004.0547))
		{
			GameTextForPlayer(playerid, "~w~Ammunation", 5000, 1);
			SafeSetPlayerPos(playerid, 308.2120,-141.8780,1004.0547);
			DisablePlayerCheckpoint(playerid);
		}

		else if (IsPlayerInRangeOfPoint(playerid, 1, 1518.5179,-1452.9224,14.2031))
		{
			//FBI Enter front
			PlayerInfo[playerid][pInteriorNr] = 4;
			SafeSetPlayerPos(playerid, 235.7598,142.4089,1003.0300);
			GameTextForPlayer(playerid, "~w~FBI Department",5000,1);
			SafeSetPlayerInterior(playerid,3);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1540.3314,-1484.3126,13.5493))
		{
			//FBI Enter back
			PlayerInfo[playerid][pInteriorNr] = 4;
			SafeSetPlayerPos(playerid, 288.7287,167.0377,1007.1719);
			GameTextForPlayer(playerid, "~w~FBI Department",5000,1);
			SafeSetPlayerInterior(playerid,3);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 288.7287,167.0377,1007.1719))
		{
			//FBI Exit back
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1540.3314,-1484.3126,13.54939);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 238.3001,138.9406,1003.0234))
		{
			//FBI Exit front
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1518.4724,-1450.2354,13.5469);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1,1173.2563,-1323.3102,15.3943))
		{
			//Hospital enter
			PlayerInfo[playerid][pInteriorNr] = 29;
			SafeSetPlayerPos(playerid, 1222.0614,-1250.3997,1287.8243);
			GameTextForPlayer(playerid, "~w~All Saints Hospital",5000,1);
			SafeSetPlayerInterior(playerid,6);
			SetPlayerFacingAngle(playerid, 0);
			TogglePlayerControllable(playerid, 0);
			SetTimerEx("Unfreezeply",3000,false,"i",playerid);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1,1219.6620,-1250.0331,1287.8243))
		{
			//Hospital exit
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1174.2563,-1323.3102,15.3943);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1,1298.7075,-798.5981,84.1406))
		{
			//La Famiglia Sinatra  gang hq
			if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
			{
				SafeSetPlayerPos(playerid, 1254.3436,-789.3809,1084.0078);
				GameTextForPlayer(playerid, "~w~La Famiglia Sinatra HQ",5000,1);
				SafeSetPlayerInterior(playerid,5);
				SetPlayerFacingAngle(playerid, 181);
				PlayerInfo[playerid][pInteriorNr] = 31;
			}
			else if(hqlock[luclock] == 0)
			{
			    SafeSetPlayerPos(playerid, 1254.3436,-789.3809,1084.0078);
				GameTextForPlayer(playerid, "~w~La Famiglia Sinatra HQ",5000,1);
				SafeSetPlayerInterior(playerid,5);
				SetPlayerFacingAngle(playerid, 181);
				PlayerInfo[playerid][pInteriorNr] = 31;
			}
			else
			{
			    GameTextForPlayer(playerid, "~r~Locked",5000,1);
			}
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 1252.5208,-789.2282,1084.0078))
		{
			//La Famiglia Sinatra gang hq
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1298.6263,-801.5491,84.1406);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 1);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1,691.5770,-1276.0026,13.5607))
		{
			//Yamaguchi  gang hq
			if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
			{
			    PlayerInfo[playerid][pInteriorNr] = 6;
				SafeSetPlayerPos(playerid, 962.0352,-53.4519,1001.1246);
				GameTextForPlayer(playerid, "~w~Yamaguchi HQ",5000,1);
				SafeSetPlayerInterior(playerid,3);
				SetPlayerFacingAngle(playerid, 181);
			}
			else if(hqlock[guclock] == 0)
			{
			    PlayerInfo[playerid][pInteriorNr] = 6;
			    SafeSetPlayerPos(playerid, 962.0352,-53.4519,1001.1246);
				GameTextForPlayer(playerid, "~w~Yamaguchi HQ",5000,1);
				SafeSetPlayerInterior(playerid,3);
				SetPlayerFacingAngle(playerid, 181);
			}
			else
			{
			    GameTextForPlayer(playerid, "~r~Locked",5000,1);
			}
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1,967.6099,-53.1411,1001.1246))
		{
			//Yamaguchi gang hq
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 689.8694,-1276.0619,13.5595);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 1);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1122.7406,-2037.0421,69.8942))
		{
			//Chornaya Bratva gang hq
			if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
			{
			    PlayerInfo[playerid][pInteriorNr] = 8;
				SafeSetPlayerPos(playerid, 2576.5076,-1300.3403,1060.9844);
				GameTextForPlayer(playerid, "~w~Chornaya Bratva HQ",5000,1);
				SafeSetPlayerInterior(playerid,2);
				SetPlayerFacingAngle(playerid, 181);
			}
			else if(hqlock[stlock] == 0)
			{
			    PlayerInfo[playerid][pInteriorNr] = 8;
			    SafeSetPlayerPos(playerid, 2576.5076,-1300.3403,1060.9844);
				GameTextForPlayer(playerid, "~w~Chornaya Bratva HQ",5000,1);
				SafeSetPlayerInterior(playerid,2);
				SetPlayerFacingAngle(playerid, 181);
			}
			else
			{
			    GameTextForPlayer(playerid, "~r~Locked",5000,1);
			}
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 2576.7900,-1284.8854,1054.6406))
		{
			//Chornaya Bratva gang hq
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1123.9808,-2037.0841,69.8855);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 1);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 168.2048,-1769.3395,4.4728))
		{
			//La Vice gang hq
			if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
			{
			    PlayerInfo[playerid][pInteriorNr] = 7;
				SafeSetPlayerPos(playerid, 446.9658,1399.1479,1084.3047);
				GameTextForPlayer(playerid, "~w~La Vice HQ",5000,1);
				SafeSetPlayerInterior(playerid,2);
				SetPlayerFacingAngle(playerid, 1);
			}
			else if(hqlock[iolock] == 0)
			{
			    PlayerInfo[playerid][pInteriorNr] = 7;
			    SafeSetPlayerPos(playerid, 446.9658,1399.1479,1084.3047);
				GameTextForPlayer(playerid, "~w~La Vice HQ",5000,1);
				SafeSetPlayerInterior(playerid,2);
				SetPlayerFacingAngle(playerid, 0);
			}
			else
			{
			    GameTextForPlayer(playerid, "~r~Locked",5000,1);
			}
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 447.0208,1397.4796,1084.3047))
		{
			//La Vice gang hq
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 172.9946,-1769.8417,4.4319);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 179);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1828.1594,-1980.4380,13.5469))
		{
			//Surenos HQ
			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
			{
			    PlayerInfo[playerid][pInteriorNr] = 9;
				SafeSetPlayerPos(playerid, 2351.0479,-1180.8905,1027.9766);
				GameTextForPlayer(playerid, "~w~Los Surenos 13 HQ",5000,1);
				SafeSetPlayerInterior(playerid,5);
				SetPlayerFacingAngle(playerid, 90);
			}
			else if(hqlock[surlock] == 0)
			{
			    PlayerInfo[playerid][pInteriorNr] = 9;
			    SafeSetPlayerPos(playerid, 2351.0479,-1180.8905,1027.9766);
				GameTextForPlayer(playerid, "~w~Los Surenos 13 HQ",5000,1);
				SafeSetPlayerInterior(playerid,5);
				SetPlayerFacingAngle(playerid, 90);
			}
			else
			{
			    GameTextForPlayer(playerid, "~r~Locked",5000,1);
			}
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 2352.9187,-1180.9679,1027.9766))
		{
			//Surenos HQ
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1830.1904,-1983.0223,13.5469);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 179);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1481.0206,-1771.1138,18.7958))
		{
			//City hall
			PlayerInfo[playerid][pInteriorNr] = 2;
			SafeSetPlayerPos(playerid, 386.2978,173.8582,1008.3828);
			SafeSetPlayerInterior(playerid,3);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 390.0630,173.5741,1008.3828))
		{
			//City hall
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1481.0206,-1769.5138,18.7958);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 681.6054,-473.7628,16.5363))
		{
			//anarchy hq
			PlayerInfo[playerid][pInteriorNr] = 40;
			SafeSetPlayerPos(playerid, 679.3209,-452.7324,-25.6172);
			GameTextForPlayer(playerid, "~w~Sons of Anarchy HQ",5000,1);
			SafeSetPlayerInterior(playerid, 1);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 681.5295,-450.8412,-25.6172))
		{
			//anarchy hq
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 683.2062,-473.8727,16.5363);
			GameTextForPlayer(playerid, "~w~Dillimore",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1784.58,-1297.52,13.37))
		{
			//ABC studio
			PlayerInfo[playerid][pInteriorNr] = 32;
			SafeSetPlayerPos(playerid, 1817.0708,-1297.3933,109.2669);
			GameTextForPlayer(playerid, "~w~ABC studio",5000,1);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1817.6517,-1294.2751,109.2697))
		{
			//ABC studio
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1787.6311,-1297.4938,13.3793);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1752.8452,-1894.1328,13.5573))
		{
			//LA Yellow Cab Co.
	        PlayerInfo[playerid][pInteriorNr] = 33;
			SafeSetPlayerPos(playerid, 371.8502,182.0368,1014.1875);
			GameTextForPlayer(playerid, "~w~LA Yellow Cab Co.",5000,1);
			SafeSetPlayerInterior(playerid,3);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 371.4523,180.2195,1014.1875))
		{
			//LA Yellow Cab Co.
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 1755.7578,-1894.1992,13.5566);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 2045.3928,-1908.0372,13.5469))
		{
			//DMW
	        PlayerInfo[playerid][pInteriorNr] = 11;
			SafeSetPlayerPos(playerid, 1494.6207,1305.2336,1093.2891);
			GameTextForPlayer(playerid, "~w~License center",5000,1);
			SafeSetPlayerInterior(playerid,3);
			SetPlayerFacingAngle(playerid, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1494.2778,1303.7288,1093.2891))
		{
			//DMW Exit
			PlayerInfo[playerid][pInteriorNr] = 0;
			SafeSetPlayerPos(playerid, 2046.8928,-1908.0372,13.5469);
			GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
			SafeSetPlayerInterior(playerid,0);
			SetPlayerFacingAngle(playerid, 280);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1524.5724,-1677.8043,6.2188))
		{
		    //PD Elevator
		    PlayerInfo[playerid][pInteriorNr] = 1;
		    SafeSetPlayerPos(playerid, 244.0099,66.4152,1003.6406);
		    GameTextForPlayer(playerid, "~w~Police Department",5000,1);
		    SafeSetPlayerInterior(playerid,6);
		    SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 1557.7257,-1675.2711,28.3955))
		{
		    //PD Elevator
		    PlayerInfo[playerid][pInteriorNr] = 1;
		    SafeSetPlayerPos(playerid, 244.0099,66.4152,1003.6406);
		    GameTextForPlayer(playerid, "~w~Police Department",5000,1);
		    SafeSetPlayerInterior(playerid,6);
		    SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 2730.4297,-2451.5000,17.5937))
		{
		    //Army Entrance
		    PlayerInfo[playerid][pInteriorNr] = 5;
		    SafeSetPlayerPos(playerid, 249.9911,108.3193,1003.2188);
		    GameTextForPlayer(playerid, "~g~Army Barracks",5000,1);
		    SafeSetPlayerInterior(playerid,10);
		    SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 246.7823,107.8988,1003.2188))
		{
		    //Army Exit
		    PlayerInfo[playerid][pInteriorNr] = 0;
		    SafeSetPlayerPos(playerid, 2734.6604,-2450.5486,17.5938);
		    GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
		    SafeSetPlayerInterior(playerid,0);
		    SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 616.7385,-1542.1398,15.3345))
		{
		    //Firemen Entrance
		    PlayerInfo[playerid][pInteriorNr] = 23;
		    SafeSetPlayerPos(playerid, 2807.619873,-1171.899902,1025.570312);
		    GameTextForPlayer(playerid, "~r~Firemen Barracks",5000,1);
		    SafeSetPlayerInterior(playerid,8);
		    SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 2807.6807,-1174.5410,1025.5703))
		{
		    //Firemen Exit
		    PlayerInfo[playerid][pInteriorNr] = 0;
		    SafeSetPlayerPos(playerid, 618.3007,-1537.3007,15.2589);
		    GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
		    SafeSetPlayerInterior(playerid,0);
		    SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 3, 2812.3806,-1163.9534,1029.1719))
		{
		    //Firemen Roof Entrance
		    SafeSetPlayerPos(playerid, 574.9918,-1491.9247,30.8906);
		    GameTextForPlayer(playerid, "~r~Firemen Barracks Roof",5000,1);
		    SafeSetPlayerInterior(playerid,0);
		    SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1, 571.4652,-1522.2427,30.8906))
		{
		    //Firemen Roof Entrance
		    PlayerInfo[playerid][pInteriorNr] = 23;
		    SafeSetPlayerPos(playerid, 2806.7979,-1161.3995,1029.1646);
		    GameTextForPlayer(playerid, "~r~Firemen Barracks",5000,1);
		    SafeSetPlayerInterior(playerid,8);
		    SetPlayerFacingAngle(playerid, 270);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1.5, 1570.3828,-1333.8882,16.4844))
		{
		    //Next to PD building
		    SafeSetPlayerPos(playerid, 1545.0068,-1366.5094,327.2868);
		    GameTextForPlayer(playerid, "~w~Roof of News building",5000,1);
		    SafeSetPlayerInterior(playerid,0);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 1.5, 1548.8167,-1366.2247,326.2109))
		{
		    //Next to PD building
		    SafeSetPlayerPos(playerid, 1572.1115,-1332.5288,16.4844);
		    GameTextForPlayer(playerid, "~w~News building",5000,1);
		    SafeSetPlayerInterior(playerid,0);
		}
	}
    else if ( PRESSED(KEY_LOOK_BEHIND) )
    {
		if(IsAnNg(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
	    {
	        if(IsPlayerInRangeOfPoint(playerid, 4,238.9703,112.8155,1003.2188))
			{
			    if(armyw1 == 0)
			    {
		      		MoveDynamicObject(armywindows1, 239.774,111.511,1000.61, 1.7500);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army Windows is Open, Please Close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the Windows.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		armyw1 = 1;
				}
				else
				{
		      		MoveDynamicObject(armywindows1, 239.774,111.511,1002.31, 3.0000);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army Windows is Closed, Thank You!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and closes the Windows.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		armyw1 = 0;
				}
			}
			else if(IsPlayerInRangeOfPoint(playerid, 2,253.8096,117.3113,1003.2188))
			{
			    if(armyw2 == 0)
			    {
		      		MoveDynamicObject(armywindows2, 253.050,116.195,1000.61, 1.7500);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army Windows is Open, Please Close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the Windows.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		armyw2 = 1;
				}
				else
				{
				    MoveDynamicObject(armywindows2, 253.050,116.195,1002.31, 3.0000);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army Windows is Closed, Thank You!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and closes the Windows.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
      		        armyw2 = 0;
				}
			}
		}
		if(IsAPDMember(playerid) || PlayerInfo[playerid][pAdmin] >= 6 || IsAFreecop(playerid))
		{
		    if(IsPlayerInRangeOfPoint(playerid, 4,251.2575,67.6536,1003.6406))
			{
			    if(lspdw == 0)
			    {
		      		MoveDynamicObject(lspdwindows, 250.524,67.650,1001.08, 3.0000);
		      		SendClientMessage(playerid, COLOR_BLUE,"SAPD Windows is Open, Please Close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the Windows.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
					lspdw = 1;
				}
				else
				{
				    MoveDynamicObject(lspdwindows, 250.524,67.650,1002.58, 3.0000);
		      		SendClientMessage(playerid, COLOR_BLUE,"SAPD Windows is Closed, Thank You!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and closes the Windows.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
					lspdw = 0;
				}
			}
		}
   		if(IsAPDMember(playerid) || IsAFreecop(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
	    {
	        if(IsPlayerInRangeOfPoint(playerid, 2,250.611,63.2995,1003.18))
			{
			    if(lspd1 == 0)
			    {
		      		MoveDynamicObject(lspddoor1, 250.611,63.2995,1000.64, 4.5000);
		      		SendClientMessage(playerid, COLOR_BLUE,"SAPD door is open, please close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		lspd1 = 1;
				}
				else
				{
		      		MoveDynamicObject(lspddoor1, 250.611,63.2995,1003.04, 4.5000);
		      		SendClientMessage(playerid, COLOR_BLUE,"SAPD door is closed, thank you!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		lspd1 = 0;
				}
			}
			else if(IsPlayerInRangeOfPoint(playerid, 2,246.228,72.4962,1003.04))
			{
			    if(lspd2 == 0)
			    {
		      		MoveDynamicObject(lspddoor2, 246.228,72.4962,1000.63, 4.5000);
		      		SendClientMessage(playerid, COLOR_BLUE,"SAPD door is open, please close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		lspd2 = 1;
				}
	      		else
				{
				    MoveDynamicObject(lspddoor2, 246.228,72.4962,1003.18, 4.5000);
		      		SendClientMessage(playerid, COLOR_BLUE,"SAPD Control door is closed, thank you!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and Closes the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		lspd2 = 0;
				}
			}
			else if(IsPlayerInRangeOfPoint(playerid, 2,1582.6205,-1638.0587,12.3776))
			{
			    if(lspd3 == 0)
			    {
		      		MoveDynamicObject(pdgate4, 1582.6205,-1638.0587,7.3776, 4.5000);
		      		SendClientMessage(playerid, COLOR_BLUE,"SAPD Garage is open, please close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		lspd3 = 1;
				}
	      		else
				{
				    MoveDynamicObject(pdgate4, 1582.6205,-1638.0587,12.3776, 4.5000);
		      		SendClientMessage(playerid, COLOR_BLUE,"SAPD Garage door is closed, thank you!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and Closes the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		lspd3 = 0;
				}
			}
		}
		if(IsAnNg(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
		{
		 	if(IsPlayerInRangeOfPoint(playerid, 2,239.5503,117.5205,1003.2188))
			{
				if(army1 == 0)
				{
		      		MoveDynamicObject(armydoor1, 239.591,118.098,1000.21, 4.0);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army door is open, please close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		army1 = 1;
				}
				else
				{
		      		MoveDynamicObject(armydoor1, 239.591,118.098,1003.01, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army door is closed, thank you!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		army1 = 0;
				}
			}
			else if(IsPlayerInRangeOfPoint(playerid, 2,239.5794,125.0337,1003.2188))
			{
				if(army2 == 0)
				{
		      		MoveDynamicObject(armydoor2, 239.635,125.544,1000.21, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army door is open, please close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		army2 = 1;
				}
				else
				{
				    MoveDynamicObject(armydoor2, 239.635,125.544,1003.21, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army door is closed, thank you!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		     		format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		army2 = 0;
				}
			}
			else if(IsPlayerInRangeOfPoint(playerid, 2,253.1278,109.1392,1003.2188))
			{
			    if(army3 == 0)
			    {
		      		MoveDynamicObject(armydoor3, 253.146,108.902,1000.21, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army door is open, please close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		army3 = 1;
				}
				else
				{
				    MoveDynamicObject(armydoor3, 253.146,108.902,1003.01, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"Army door is closed, thank you!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		army3 = 0;
				}
			}
		}
		if(IsAnFbi(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
		{
		 	if(IsPlayerInRangeOfPoint(playerid, 3,228.250,151.334,1002.67))
			{
			    if(fbi1 == 0)
			    {
		      		MoveDynamicObject(fbidoor1, 228.250,151.334,1000.02, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"FBI door is open, please close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		fbi1 = 1;
				}
				else
				{
		      		MoveDynamicObject(fbidoor1, 228.250,151.334,1002.67, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"FBI door is closed, thank you!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		fbi1 = 0;
				}
			}
			else if(IsPlayerInRangeOfPoint(playerid, 3,271.140,191.185,1008.97))
			{
			    if(fbi2 == 0)
				{
		      		MoveDynamicObject(fbidoor2, 271.140,191.185,1005.17, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"FBI door is open, please close it!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		fbi2 = 1;
				}
				else
				{
		      		MoveDynamicObject(fbidoor2, 271.140,191.185,1008.97, 4.5);
		      		SendClientMessage(playerid, COLOR_BLUE,"FBI door is closed, thank you!");
		      		GetPlayerName(playerid, sendername, sizeof(sendername));
		      		format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);
		      		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      		fbi2 = 0;
				}
			}
			else if(IsPlayerInRangeOfPoint(playerid, 3,238.784,193.768,1008.97))
			{
			    if(fbi3 == 0)
			    {
			   		MoveDynamicObject(fbidoor3, 238.784,193.768,1005.17, 4.5);
			   		SendClientMessage(playerid, COLOR_BLUE,"FBI door is open, please close it!");
			   		GetPlayerName(playerid, sendername, sizeof(sendername));
			  		format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
			   		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
			   		fbi3 = 1;
				}
				else
				{
			   		MoveDynamicObject(fbidoor3, 238.784,193.768,1008.97, 4.5);
			   		SendClientMessage(playerid, COLOR_BLUE,"FBI door is closed, thank you!");
			   		GetPlayerName(playerid, sendername, sizeof(sendername));
			   		format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);
			   		ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
			   		fbi3 = 0;
				}
			}
		}
	}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)