SA-MP Forums Archive
Not-Enterable vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Not-Enterable vehicle (/showthread.php?tid=521139)



Not-Enterable vehicle - Bek_Loking - 21.06.2014

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!


Re: Not-Enterable vehicle - iCuttah - 21.06.2014

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.


Re: Not-Enterable vehicle - Threshold - 21.06.2014

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.


Re: Not-Enterable vehicle - Bek_Loking - 22.06.2014

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


Re: Not-Enterable vehicle - Threshold - 22.06.2014

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.