Not-Enterable vehicle

How do I make an non-enterable vehicle? I scripted a bike - dealership, so I wanted some bikes to be parked on it's parking lot but when someone tries to enter them it returns something like: You can't enter this vehicle!

Are you looking forward to lock them or just an unenterable vehicle ? If you have a vehicle lock system scripted, apply one onto there however if you're looking to have completely unenterable cars you would like to look here
-> And ofcourse just script it onto the vehicles you're using not the police ones.

pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
    if(vehicleid == DealerShipVehicle) //Replace 'DealerShipVehicle' with your bike etc.
        SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
    return 1;

EDIT: However, player's will not get a message when they attempt to enter it. (Because they can't even attempt to enter it). Although you can use OnPlayerEnterVehicle to show the message regardless.

How do I make exactly he gets message - You can't access this vehicle
And that bugs other bikes that should be entered :S

No it won't. Vehicle ID is different from Vehicle Model ID. You can use OnPlayerEnterVehicle then ClearAnimations(playerid);, but it doesn't work 100% of the time.

Forum Jump:

Users browsing this thread: