Delete Please
#1

Ok, at the area 51 entrance, theres a lil' hole to go through.
This is a fs with a gate you have to type a command with to open it:

Код:
#include <a_samp>

#pragma dynamic 8192
#pragma tabsize 0

#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_LIGHTGREEN 0x9ACD32AA

forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

new a51gs_status = 1;
new a51gs;
new a51_liftstatus = 1;
new a51_lift1;
new a51_lift2;
new a51_lift3;
new a51_lift4;
new a51gstatus = 1;
new a51g;
new obj1;
new obj2;

public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
  if(IsPlayerConnected(playerid))
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}

public OnFilterScriptInit()
{
	print("/****************************************/");
	print("/ [FS] Area 51 Gates - By Jack Sparrow /");
	print("/****************************************/");
	a51gs = CreateObject(10184, 214.337631, 1875.739136, 13.162411, 0.0000, 0.0000, 270.0000);//Area 51 Garage Shutter
	a51_lift1 = CreateObject(985, 281.667694, 1821.519043, 16.701317, 270.6186, 0.0000, 270.0000);//Area 51 Lift1
	a51_lift2 = CreateObject(986, 290.248383, 1821.519043, 16.651318, 270.6186, 0.0000, 90.0000);//Area 51 Lift2
	a51_lift3 = CreateObject(985, 275.712830, 1821.519043, 16.701317, 270.6186, 0.0000, 270.0000);//Area 51 Lift3
	a51_lift4 = CreateObject(986, 296.168213, 1821.519043, 16.701317, 270.6186, 0.0000, 90.0000);//Area 51 Lift4
	a51g = CreateObject(985, 96.669350, 1920.033936, 18.855873, 0.0000, 0.0000, 90.0000);//Area 51 Gate
	obj1 = CreateObject(3279, 103.999695, 1932.790771, 16.758234, 0.0000, 0.0000, 0.0000);//Area 51 Loookout Post
	obj2 = CreateObject(987, 340.080139, 1794.643188, 15.133865, 0.0000, 0.0000, 33.7500);//Area 51 East Blockade
	return 1;
}

public OnFilterScriptExit()
{
	DestroyObject(a51gs);
	DestroyObject(a51_lift1);
	DestroyObject(a51_lift2);
	DestroyObject(a51_lift3);
	DestroyObject(a51_lift4);
	DestroyObject(a51g);
	DestroyObject(obj1);
	DestroyObject(obj2);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp("/gate", cmdtext, true) == 0)
	{
		if(PlayerToPoint(15, playerid, 96.669350, 1920.033936, 18.855873))
		{
			if(GetPlayerSkin(playerid) == 287)
			{
				if(a51gstatus == 1)
				{
					MoveObject(a51g, 96.669350, 1925.953735, 18.855873, 4);
					SendClientMessage(playerid, COLOR_LIGHTGREEN, "*	Area51 Gate Open");
					a51gstatus = 0;
				}
				else if(a51gstatus == 0)
				{
					MoveObject(a51g, 96.669350, 1920.033936, 18.855873, 4);
					SendClientMessage(playerid, COLOR_LIGHTRED, "*	Area51 Gate Closed");
					a51gstatus = 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_LIGHTRED, "	You are not a Soldier");
			}
		}
	return 1;
	}
	if(strcmp("/gate1", cmdtext, true) == 0)
	{
		if(PlayerToPoint(10, playerid, 214.337631, 1875.739136, 13.162411))
		{
		  if(GetPlayerSkin(playerid) == 287)
		  {
		    if(a51gs_status == 1)
		    {
		      MoveObject(a51gs, 214.337631, 1875.739136, 9.000, 4);
		      SendClientMessage(playerid, COLOR_LIGHTGREEN, "*  Area51 Garage Open");
		      a51gs_status = 0;
				}
				else if(a51gs_status == 0)
				{
				  MoveObject(a51gs, 214.337631, 1875.739136, 13.162411, 4);
				  SendClientMessage(playerid, COLOR_LIGHTRED, "* Area51 Garage Closed");
				  a51gs_status = 1;
				}
			}
			else
			{
			  SendClientMessage(playerid, COLOR_LIGHTRED, "  You are not a Soldier");
			}
		}
		return 1;
	}
	if(strcmp("/gate2", cmdtext, true, 8) == 0)
	{
	  if(PlayerToPoint(25, playerid, 281.667694, 1821.519043, 16.701317))
	  {
	    if(GetPlayerSkin(playerid) == 287)
	    {
	      if(a51_liftstatus == 1)
	      {
	        MoveObject(a51_lift1, 281.667694, 1821.519043, 23.451214, 4);
	        MoveObject(a51_lift2, 290.248383, 1821.519043, 23.451214, 4);
	        MoveObject(a51_lift3, 275.712830, 1821.519043, 23.451214, 4);
	        MoveObject(a51_lift4, 296.168213, 1821.519043, 23.451214, 4);
	        SendClientMessage(playerid, COLOR_LIGHTGREEN, "*  Area51 Lift Going Up");
	        a51_liftstatus = 0;
				}
				else if(a51_liftstatus == 0)
				{
				  MoveObject(a51_lift1, 281.667694, 1821.519043, 16.701317, 4);
				  MoveObject(a51_lift2, 290.248383, 1821.519043, 16.701317, 4);
				  MoveObject(a51_lift3, 275.712830, 1821.519043, 16.701317, 4);
				  MoveObject(a51_lift4, 296.168213, 1821.519043, 16.701317, 4);
				  SendClientMessage(playerid, COLOR_LIGHTRED, "* Area51 Lift Going Down");
				  a51_liftstatus = 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_LIGHTRED, "  You are not a Soldier");
			}
		}
		return 1;
	}
	return 0;
}
Can anyone make a FS that has the lil' gate auto-open? Thanks.
Reply
#2

Quote:
Originally Posted by DeltaAirlines12
Can anyone make a FS that has the lil' gate auto-open? Thanks.
-> Script request topic.
Reply
#3

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by DeltaAirlines12
Can anyone make a FS that has the lil' gate auto-open? Thanks.
-> Script request topic.
Everyone keeps telling me that........ I will just try to do it myself.....
Reply
#4

Quote:
Originally Posted by DeltaAirlines12
Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by DeltaAirlines12
Can anyone make a FS that has the lil' gate auto-open? Thanks.
-> Script request topic.
Everyone keeps telling me that........ I will just try to do it myself.....
That will be awesome .. Good luck
Reply
#5

Quote:
Originally Posted by DeltaAirlines12
Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by DeltaAirlines12
Can anyone make a FS that has the lil' gate auto-open? Thanks.
-> Script request topic.
Everyone keeps telling me that........ I will just try to do it myself.....
Of course they're telling you that because you're requesting a code, and that's why we have a stickied topic for code requests.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)