SA-MP Forums Archive
OPEN GATE BUT HE DOESNT EXIST :s HELP TO FIX ! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OPEN GATE BUT HE DOESNT EXIST :s HELP TO FIX ! (/showthread.php?tid=111510)



OPEN GATE BUT HE DOESNT EXIST :s HELP TO FIX ! - buonggiorno - 02.12.2009

Hi, i made gate at airport in ls, and cmd for open it.
So cmd for pd is /pao for open and /pac for close. On server gate doesnt exist, nobody see it but when pd type cmd /pao he get message YOU OPEN AIRPORT GATE.

Cmd is compile without errors and this is the first time i get this problem, i have gates on another place i made and everywhere work perfect, now we can see it but server told to us that we open gate.

what is problem? how to fix?


Re: OPEN GATE BUT HE DOESNT EXIST :s HELP TO FIX ! - Mike Garber - 02.12.2009

Hold on, there's no way we can help you If you don't show your code.


Re: OPEN GATE BUT HE DOESNT EXIST :s HELP TO FIX ! - buonggiorno - 02.12.2009

first i make new gate
Code:
new lsgate;
after that i make object for lsgate

Code:
lsgate = CreateObject(980,1961.690,-2189.593,15.320,0.0,0.0,0.0);
and after that make cmd...

Code:
if (strcmp(cmdtext, "/plso", true)==0)
	{
		if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
		{
  		MoveObject(lsgate,1950.704,-2190.906,15.328, 8.0);
			SendClientMessage(playerid, COLOR_GREEN, "GATE OPEN);
		}
		else return SendClientMessage(playerid, COLOR_GREEN, "NOT A COP.");
	}
	if (strcmp(cmdtext, "/plsc", true)==0)
	{
		if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
		{
  		      MoveObject(lsgate,1961.126,-2189.706,15.320, 8.0);
			SendClientMessage(playerid, COLOR_GREEN, "GATE CLOSE.");
		}
		else return SendClientMessage(playerid, COLOR_GREEN, "NOT A COP.");
	}
this way i make more gates and everyone work