SA-MP Forums Archive
Why that happens? - 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: Why that happens? (/showthread.php?tid=370839)



Why that happens? - Liepaajnieks - 21.08.2012

Hi all, im not english so i hope u all understand what i wrote here.


So.. I created gates for faction "Yamaguchi" in Ravens RP gamemode script, i think i did all right but seems its not right so i ask for help.
Here is script, that all is not just in one place, all is where it needs to be.
Код:
forward GateClose7();

public GateClose7()
{
      MoveDynamicObject(yamaguchigate1, 785.20001220703,-1152.5,25.299999237061, 3.5);
      MoveDynamicObject(yamaguchigate2, 659.90002441406,-1227.3000488281,17.700000762939, 3.5);
      yamag = 0;
      yamag2 = 0;
      return 1;
}

else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
		{
	 		if (IsPlayerInRangeOfPoint(playerid, 15,785.20001220703,-1152.5,25.299999237061))
			{
				if(yamag2 == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
		      	MoveDynamicObject(yamaguchigate2,664.5,-1218.0999755859,17.700000762939, 3.5);
		      	SetTimer("GateClose7", 7000, 0);
		      	SendClientMessage(playerid, COLOR_BLUE,"Yamaguchi gate is opened and will close in 7 seconds.");

		      	format(string, sizeof(string), "* %s takes his/her remote and opens Yamaguchi gate.", sendername);
		      	ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      	yamag2 = 1;
			}
			else if (IsPlayerInRangeOfPoint(playerid, 15,659.90002441406,-1227.3000488281,17.700000762939))
			{
				if(yamag == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
		      	MoveDynamicObject(yamaguchigate1,785.5,-1163.1999511719,25.299999237061, 3.5);
		      	SetTimer("GateClose7", 7000, 0);
		      	SendClientMessage(playerid, COLOR_BLUE,"Yamaguchi gate is opened and will close in 7 seconds.");

		      	format(string, sizeof(string), "* %s takes his/her remote and opens Yamaguchi gate.", sendername);
		      	ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      	yamag = 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY,"* Not near a Gate that you can use.");
				return 1;
			}
		}
The problem is, when i compile (without errors) and go in game and try to open the gates, it opens BUT verticaly and on the same place where gates are placed. screenshot lower..



In screenshot have just one gates, but in script are two gates. just for ur knownledge..


Re: Why that happens? - Gangster-rocks - 21.08.2012

You have to update Object.inc


Re: Why that happens? - Liepaajnieks - 21.08.2012

Hmm.. thx for info, but u can tell where i can do that? tell me the website where i can do that, i rly appreciate it


Re: Why that happens? - Sig Hansen - 21.08.2012

****** it.


Re: Why that happens? - Liepaajnieks - 21.08.2012

U mean a_objects.inc in pawno/includes ? i just downloaded newest server and replaced a_object.inc

And CreateDynamicObject / MoveDynamicObject is in Streamer, so why and how i need/can update a_objects.inc?


Re: Why that happens? - Liepaajnieks - 21.08.2012

Okey thx for trying to help me, but i figured it out myself, i just updated streamer plugin and include, now all is okay