SA-MP Forums Archive
Gate problem with Gang Need 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: Gate problem with Gang Need help (/showthread.php?tid=414726)



Gate problem with Gang Need help - BloodRaven - 10.02.2013

Hello there,
i have a script for autogate and it work's fine.
But my want that the gate open only with Gang members, so if someone can help me it will be very helpfull thnx.
Here is the script:
Код:
new autogate;

forward close();
public close()
{
MoveObject(autogate, 1285.0999755859, -2056.1000976563, 61.700000762939,3);
return 1;
}

public OnGameModeInit()
	autogate = CreateObject(16775, 1285.0999755859, -2056.1000976563, 61.700000762939, 0, 0, 268);

public OnPlayerUpdate(playerid)
{
	if(IsPlayerInRangeOfPoint(playerid,8,1285.0999755859, -2056.1000976563, 61.700000762939))
	{
	MoveObject(autogate,1285.0999755859, -2056.1000976563, 53.5,3);
	SetTimer("close",4000,0);
	return 1;
	}
	return 1;
}



Re: Gate problem with Gang Need help - MP2 - 10.02.2013

I developed an include that makes this very easy: http://*******/m0asW


Re: Gate problem with Gang Need help - BloodRaven - 10.02.2013

i cant understand it im newbie :S


Re: Gate problem with Gang Need help - BloodRaven - 10.02.2013

Another methode please ..


Re: Gate problem with Gang Need help - MP2 - 10.02.2013

Don't double post and/or bump. There's an edit button for a reason.

The script above is more complicated (IMO) than my _single function_ include. I take it you didn't write that yourself.

Remove all of your current code for the gate and use my include and this code:

pawn Код:
CreateAutomaticGate(16775, 1285.09, -2056.1, 61.7, 0.0, 0.0, 270.0, 1285.1, -2056.1, 53.5, 0.0, 0.0, 270.0, 1285.1, -2056.1, 61.7, 8, 3, 1);
That will create the gate (it isn't done yet, it won't open until you use OnPlayerRequestGate), but I need to know how you detect what gang they are in.


Re: Gate problem with Gang Need help - BloodRaven - 10.02.2013

ok sry for double post, but i cant download the include can you help me for the instaletion? i did the instaletion from your topic but it dosesnt work.

My gang id is 15 if that helps you.
Im gating this error:
Код:
C:\Users\Stefanos\Desktop\RP\filterscripts\BratvaGate.pwn(7) : fatal error 100: cannot read from file: "mGates"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.