Not-Enterable vehicle
#1

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!
Reply
#2

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
-> https://sampforum.blast.hk/showthread.php?tid=337173 And ofcourse just script it onto the vehicles you're using not the police ones.
Reply
#3

pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(vehicleid == DealerShipVehicle) //Replace 'DealerShipVehicle' with your bike etc.
    {
        SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
    }
    return 1;
}
Sources:
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx
https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer
https://sampwiki.blast.hk/wiki/OnVehicleStreamIn

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.
Reply
#4

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)