how to MAke this auto gate on command
#1

So i have this code i got from a tutorial the gate works fine but i want it so that it only opens if i use a certain cmd

code i have so far -
Quote:

#include <a_samp>
forward GateCheck();
new AutomaticGate;

public OnGameModeInit()
{
SetTimer("GateCheck", 1000, true);
AutomaticGate = CreateObject(186, -766.9352, 92.1028, 192.3989, 0, 0, 0);
return 1;
}
public GateCheck()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 10.0, -766.9352, 92.1028, 192.3989))
{
MoveObject(AutomaticGate, -766.9352, 92.1028, 192.3989, 5.0);
}
else
{
MoveObject(AutomaticGate, -766.9352, 92.1028, 202.3989, 5.0);
}
}
}
}

Reply


Messages In This Thread
how to MAke this auto gate on command - by peterRook - 21.04.2011, 03:00
Re: how to MAke this auto gate on command - by Kitten - 21.04.2011, 05:29
Re: how to MAke this auto gate on command - by peterRook - 21.04.2011, 13:31
Re: how to MAke this auto gate on command - by Max_Coldheart - 21.04.2011, 13:36

Forum Jump:


Users browsing this thread: 1 Guest(s)