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

Quote:
Originally Posted by Undef1ned
View Post
PHP Code:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_DRIVER)
    {
        new 
vmodel GetVehicleModel(GetPlayerVehicleID(playerid));
        if(
vmodel == 520 && User[playerid][accountVIP] <= 0)
        {
            
RemovePlayerFromVehicle(playerid);
            
SendClientMessage(playerid, -1"I'm sorry, but this car has been reserved for Admins only!");
        }
    }
    return 
1;

Get Player Vehicle ID
You don't need to use GetVehicleModel...

pawn Code:
if(GetPlayerVehicleID(playerid) == 520...
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: 2 Guest(s)