[Tutorial] How to make a moving gate on command
#7

ALlright Joe, i got one more question.
Iґm trying to make it that a gate opens, when you come near it with a specific vehicle.
The vehicle i want it to open with is the Camper - vehicle id 483, it's the only vehicle in my script atm.
I have tried some things myself but it doesnt seem to work.

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(IsPlayerInVehicle(playerid,0))
	{
	  if(IsPlayerInRangeOfPoint(playerid, 5, 2351.5935058594, -659.27545166016, 127.52456665039))
		{
		  MoveObject(garage, 2351.5935058594, -659.27545166016, 125.0, 1);
		}
	}
	else
	{
	MoveObject(garage,2351.5935058594, -659.27545166016, 127.52456665039, 1);
	}
	
	return 1;
}
I dunno if its in the right public thingy.
Could you tell me how to fix this, explenation would be awsome
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)