OnPlayerKeyStateChange Open gate..
#1

Hey guys if sombody can help me i will be happy so this is the problem i want to do like this,to open my gate in the button like JUMP button so i hope you guys wiil help me thanks..
Reply
#2

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_JUMP) && IsPlayerInRangeOfPoint(playerid, x, y ,z)) //insert your gate coordinates instead of x y z
	{
	    MoveObject(gateid, movex, movey, movez, 0.5) //put new gate coordinates instead of movex, movey...
	}
}
This code will open gate but it will not close it afterwards, you'd have to add timer that closes gate after few seconds
Reply
#3

Woo tankes man but i attempt this in my pawn but it's shuting down my pawn and it's stick my computer your command looking good but is not working you can help me?.
Reply
#4

Sorry on the duble but guys sombody can help me it's not work me the way he give so pleas somebody.
Reply
#5

How is it not working? It's not a copy-paste, you have to edit it for your own script, if you don't know how, then you should learn some basic scripting before you even think about the gates.
Reply
#6

Help me pleas....
Reply
#7

STOP BUMPING YOUR TOPIC!!

b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old, and it needs to have useful information about your problem.


Reference: Read Before Posting Post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)