[Tutorial] Simple Automatic Gate [No Command Need]
#1

GATE TUTORIAL

Quote:

new mygate;

define it

Quote:

SetTimer("mygate",3500,true); //speed of the gate opend

Now,Create The GatesWhere You Gate..

Quote:

mygate = CreateObject(980, 898.536437, 2088.507324, 10.820312, 0.000000, 0.000000, 90.000000);//gate closed

AUTO OPEND

Quote:

public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0 ,x,y,z))//example 898.536437,2088.507324,10.820312)) 5.0 is size of range
{
MoveObject(mygate,898.536437, 2076.507324, 10.820311,2.5);//then,,gate was closed
return 1;
}
}

Gate Opend

Quote:

forward mygate(playerid);
public mygate(playerid)
{
MoveObject(mygate, 898.536437, 2088.507324, 10.820312,2.5);//2.5 is speed
return 1;
}

OK TNX XD
Reply


Messages In This Thread
Simple Automatic Gate [No Command Need] - by Fitri - 22.03.2013, 09:26
Re: Simple Automatic Gate [No Command Need] - by Ryan_Bowe - 22.03.2013, 11:53
Re: Simple Automatic Gate [No Command Need] - by Yves - 23.03.2013, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)