how people do not enter in this car ID
#3

As Jelly23 said it would be better to use callback, in your stock you dont have playerid so you would have to loop through every player on server so it would take a while.
Insted you could use something like this in OnPlayerEnterVehicle callback
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(vehicleid==420 || vehicleid == 438)
	{
		RemovePlayerFromVehicle(playerid);
		// Or if he didn't enter already and is about to enter then it's an animation
		// then use ClearAnimations(playerid);
		return SendClientMessage(playerid, 0xFF0000FF, "You cant enter this vehicle");
	}   
}
Reply


Messages In This Thread
how people do not enter in this car ID - by Jihanz - 24.03.2017, 10:18
Re: how people do not enter in this car ID - by Jelly23 - 24.03.2017, 11:02
Re: how people do not enter in this car ID - by w1z4rd - 24.03.2017, 11:24
Re: how people do not enter in this car ID - by Jihanz - 24.03.2017, 12:14
Re: how people do not enter in this car ID - by ISmokezU - 24.03.2017, 12:45
Re: how people do not enter in this car ID - by Mencent - 24.03.2017, 13:21
Re: how people do not enter in this car ID - by jasperschellekens - 24.03.2017, 14:03
Re: how people do not enter in this car ID - by Jihanz - 24.03.2017, 14:38

Forum Jump:


Users browsing this thread: 2 Guest(s)