Youtube Divoras Posted February 20, 2019 Share Posted February 20, 2019 Need help. Not working Quote yasaklar = { [520] = true,--hydra [432] = true,--rhino } addEventHandler("onClientPlayerVehicleEnter",localPlayer,function(arac) local model = getElementModel(arac) if yasaklar[model] then toggleControl("vehicle_fire",false) end end) Link to comment
itHyperoX Posted February 22, 2019 Share Posted February 22, 2019 local List = { [520] = true, --hydra [432] = true, --rhino } function checkVehicles(theVehicle) local vehicleModel = getElementModel(theVehicle) if List[vehicleModel] then setVehicleGunsEnabled(theVehicle, false ) end end addEventHandler("onClientPlayerVehicleEnter",getRootElement(),checkVehicles) Link to comment
KillerX Posted February 22, 2019 Share Posted February 22, 2019 4 hours ago, TheMOG said: local List = { [520] = true, --hydra [432] = true, --rhino } function checkVehicles(theVehicle) local vehicleModel = getElementModel(theVehicle) if List[vehicleModel] then setVehicleGunsEnabled(theVehicle, false ) end end addEventHandler("onClientPlayerVehicleEnter",getRootElement(),checkVehicles) setVehicleGunsEnabled Shared function This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. Please use ToggleControl instead. Link to comment
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