How can i restrict players from entering a specific vehicle?
#23

Hi Alex, in OnPlayerEnterVehicle:
Code:
if(GetVehicleModel(vehicleid) == 520 && User[playerid][accountVIP] <= 0)  
{  
	TogglePlayerControllable(playerid, false);
	TogglePlayerControllable(playerid, true);
	SendClientMessage(playerid, 0xFF0000FF, "[Error] Only VIPs are allowed to use a Hydra."); 
}
No need for anything else.

Edit:
You could additionally add a timer which checks for players in a Hydra, that are not allowed to be in there and slap them out. Lag or desync might let them enter the Hydra in any case. Respawning the Hydra would be efficient in this case too.
Reply


Messages In This Thread
How can i restrict players from entering a specific vehicle? - by alexjanjaj - 17.02.2019, 20:46
Re: How can i restrict players from entering a specific vehicle? - by rockys - 17.02.2019, 20:59
Re: How can i restrict players from entering a specific vehicle? - by The King's Bastard - 17.02.2019, 21:06
Re: How can i restrict players from entering a specific vehicle? - by Undef1ned - 17.02.2019, 22:04
Re: How can i restrict players from entering a specific vehicle? - by SymonClash - 17.02.2019, 23:02
Re: How can i restrict players from entering a specific vehicle? - by d3Pedro - 18.02.2019, 00:03
Re: How can i restrict players from entering a specific vehicle? - by Kasichok - 18.02.2019, 01:23
Re: How can i restrict players from entering a specific vehicle? - by d3Pedro - 18.02.2019, 01:57
Re: How can i restrict players from entering a specific vehicle? - by Kasichok - 18.02.2019, 02:10
Re: How can i restrict players from entering a specific vehicle? - by Kasichok - 18.02.2019, 02:31
Re: How can i restrict players from entering a specific vehicle? - by d3Pedro - 18.02.2019, 02:36
Re: How can i restrict players from entering a specific vehicle? - by Kane - 18.02.2019, 05:19
Re: How can i restrict players from entering a specific vehicle? - by BigETI - 18.02.2019, 06:22
Re: How can i restrict players from entering a specific vehicle? - by alexjanjaj - 18.02.2019, 19:58
Re: How can i restrict players from entering a specific vehicle? - by TheToretto - 18.02.2019, 20:32
Re: How can i restrict players from entering a specific vehicle? - by Kasichok - 18.02.2019, 20:40
Re: How can i restrict players from entering a specific vehicle? - by d3Pedro - 18.02.2019, 20:55
Re: How can i restrict players from entering a specific vehicle? - by Kasichok - 18.02.2019, 21:03
Re: How can i restrict players from entering a specific vehicle? - by alexjanjaj - 18.02.2019, 22:44
Re: How can i restrict players from entering a specific vehicle? - by TheToretto - 18.02.2019, 23:19
Re: How can i restrict players from entering a specific vehicle? - by Undef1ned - 19.02.2019, 01:09
Re: How can i restrict players from entering a specific vehicle? - by alexjanjaj - 19.02.2019, 13:28
Re: How can i restrict players from entering a specific vehicle? - by Jeffry - 21.02.2019, 16:29
Re: How can i restrict players from entering a specific vehicle? - by TheToretto - 21.02.2019, 17:58
Re: How can i restrict players from entering a specific vehicle? - by Jeffry - 21.02.2019, 18:13
Re: How can i restrict players from entering a specific vehicle? - by TheToretto - 21.02.2019, 18:51
Re: How can i restrict players from entering a specific vehicle? - by Pottus - 21.02.2019, 18:54
Re: How can i restrict players from entering a specific vehicle? - by Jeffry - 22.02.2019, 14:49
Re: How can i restrict players from entering a specific vehicle? - by TheToretto - 22.02.2019, 15:16
Re: How can i restrict players from entering a specific vehicle? - by Jeffry - 22.02.2019, 15:29
Re: How can i restrict players from entering a specific vehicle? - by Spoookymon - 22.02.2019, 15:57

Forum Jump:


Users browsing this thread: 3 Guest(s)