Gate problem with Gang Need help
#1

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;
}
Reply
#2

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

i cant understand it im newbie :S
Reply
#4

Another methode please ..
Reply
#5

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.
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)