jeremaniak Posted November 11, 2014 Posted November 11, 2014 Hi, Is there any way you can make it where you can check if the player is in a plane or that he is in a car or that he is in a boat?
The Don Posted November 11, 2014 Posted November 11, 2014 -- Wiki Example and some edit from me function addHelmetOnEnter ( thePlayer, seat, jacked ) if ( getElementModel ( source ) == 522 ) then -- if its a nrg outputChatBox("You entered the NRG-500 Vehicle",thePlayer,255,255,0) end end addEventHandler ( "onVehicleEnter", getRootElement(), addHelmetOnEnter ) Vehicles ID https://wiki.multitheftauto.com/wiki/Vehicle_IDs
jeremaniak Posted November 11, 2014 Author Posted November 11, 2014 is there also a way to make it that you check for vehicle type?
Moderators IIYAMA Posted November 11, 2014 Moderators Posted November 11, 2014 https://wiki.multitheftauto.com/wiki/GetVehicleType
Bilal135 Posted November 11, 2014 Posted November 11, 2014 (edited) function myVehicleType(theVehicle, seat, jacked) outputChatBox("Your vehicle type is:" ..getVehicleType(theVehicle)..".", source, 255, 0, 0) end addEventHandler("onVehicleEnter", root, myVehicleType) Edited November 11, 2014 by Guest
Anubhav Posted November 11, 2014 Posted November 11, 2014 function myVehicleType(player, seat, jacked) outputChatBox("Your vehicle type is:" ..getVehicleType(source)..".", player, 255, 0, 0) end addEventHandler("onVehicleEnter", root, myVehicleType) Are you dreaming boss? thePlayer: A player element representing the player who is entering the vehicle Is the first parameter? Idk what's wrong and Player not defined!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now