Apo Posted March 15, 2016 Posted March 15, 2016 hi guys please help me for make script if player no in the vehilce , vehicle no damaged esle vehicle damaged please give me resource only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله
MIKI785 Posted March 15, 2016 Posted March 15, 2016 Use setVehicleDamageProof in conjunction with onVehicleEnter and onVehicleExit. Btw. this is not how you ask for help in this forum. Lua Scripter Owner of mshost.cz MTA portal.
Apo Posted March 15, 2016 Author Posted March 15, 2016 ty man can you give me resource i am new scripting vehicle undamaged when player no in the vehicle not damaged by weapon , car etc... When the player is in the vehicle car damaged only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله
MIKI785 Posted March 15, 2016 Posted March 15, 2016 Again, this is not a request forum. Read this: https://forum.multitheftauto.com/viewtopic.php?f=91&t=47897 especially this part: NOTE: Please remember that this is not a forum for requests. We can help you with your code or question but we will not script for you This isn't how you "learn" to script, by having someone else post the whole thing for you and learn nothing. Lua Scripter Owner of mshost.cz MTA portal.
Apo Posted March 15, 2016 Author Posted March 15, 2016 help me for my code function vehicledamaged (thePlayer) if isPedInVehicle (thePlayer) then local vehicle = getPedOccupiedVehicle (thePlayer) setVehicleDamageProof (vehicle, false) end end addEventHandler ( "onVehicleEnter", getRootElement(), vehicledamaged ) function vehicleundamaged (thePlayer) if isPedInVehicle (thePlayer) then local vehicle = getPedOccupiedVehicle (thePlayer) setVehicleDamageProof (vehicle, true) fixVehicle (vehicle) end end addEventHandler ( "onVehicleExit", getRootElement(), vehicleundamaged ) only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله
manawydan Posted March 15, 2016 Posted March 15, 2016 try this: function vehicledamaged (thePlayer) -- source is the vehicle setVehicleDamageProof (source, false) -- damagable fixVehicle (source) end addEventHandler ( "onVehicleEnter", getRootElement(), vehicledamaged ) function vehicleundamaged (thePlayer) setVehicleDamageProof (source, true) -- not damagable fixVehicle (source) end addEventHandler ( "onVehicleExit", getRootElement(), vehicleundamaged ) "Querer não é poder, mas tentar é avançar"!
Apo Posted March 15, 2016 Author Posted March 15, 2016 not work only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله
swedishboy Posted March 15, 2016 Posted March 15, 2016 try this function damageNo (player) setVehicleDamageProof(source, true) end addEventHandler("onVehicleEnter", getRootElement(), damageNo) function damageYes (player) setVehicleDamageProof(source, false) end addEventHandler("onVehicleExit", getRootElement(), damageYes)
Apo Posted March 16, 2016 Author Posted March 16, 2016 thank you only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله
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