BieHDC Posted August 13, 2013 Share Posted August 13, 2013 Hello, i admin a dd server and there are some maps with random vehicle markers. the problem is that a bike cant be killed by minigun of RC Baron, Ruster... and that i wanna fix. i thought about a check if bike has less than 5 live and then to kill player, but i dont know what things to use. Can you please tell me what functions i should use? then i will try to script and if i fail i will post my script here. and i think its not only a problem on my server, so i am going to upload this to community. Thx Link to comment
isa_Khamdan Posted August 13, 2013 Share Posted August 13, 2013 Hello,i admin a dd server and there are some maps with random vehicle markers. the problem is that a bike cant be killed by minigun of RC Baron, Ruster... and that i wanna fix. i thought about a check if bike has less than 5 live and then to kill player, but i dont know what things to use. Can you please tell me what functions i should use? then i will try to script and if i fail i will post my script here. and i think its not only a problem on my server, so i am going to upload this to community. Thx If you want to report a bug/giltch in MTA then this is the wrong section. Link to comment
bandi94 Posted August 13, 2013 Share Posted August 13, 2013 try this. (Car's start burning around ~200HP , so i put 200 but you can make test's with bike's) It's server side function KillVehicleOwner() if getElementHealth(source) <= 200 and getVehicleType(source) == "BMX" then local thePlayer = getVehicleOccupant(source) killPed(thePlayer) end end addEventHandler("onVehicleDamage", getRootElement(), KillVehicleOwner) Link to comment
BieHDC Posted August 13, 2013 Author Share Posted August 13, 2013 So this kills a vehicle if health under 200? and its no bug report but you can report Link to comment
bandi94 Posted August 13, 2013 Share Posted August 13, 2013 it kill's the player who is in that vehicle. Link to comment
BieHDC Posted August 13, 2013 Author Share Posted August 13, 2013 ah ok^ and how would it be look if i wanna have all 3 bikes in it? Link to comment
Dealman Posted August 14, 2013 Share Posted August 14, 2013 @Bandi94: I don't think that will work, since bikes don't actually take any damage when shot on. Thus, your script won't be triggered. @BieHDC: Did you try the code Bandi gave you, and did it work? I believe BMX is a vehicle type which includes all bikes except motorbikes. Might be wrong though... D: Link to comment
bandi94 Posted August 14, 2013 Share Posted August 14, 2013 Yes "Dealman" BMX includes all bkies except motorbikes. Well i don't played to much with bike's , but if i remember well it have HP , only when it reach 0 it doesent make anything Link to comment
Dealman Posted August 14, 2013 Share Posted August 14, 2013 Yes "Dealman" BMX includes all bkies except motorbikes. Well i don't played to much with bike's , but if i remember well it have HP , only when it reach 0 it doesent make anything The bikes do have health like any vehicle, yes. But if I recall correctly they don't take any damage from weapons or collisions. Which might make it hard to accomplish what this guy wants. Link to comment
BieHDC Posted August 14, 2013 Author Share Posted August 14, 2013 But the vehicle health button is decreasing so they take damage BUT dont explode thats why and i give the script a try Link to comment
BieHDC Posted August 14, 2013 Author Share Posted August 14, 2013 Like Apache Server would say: It Works! ;D function KillVehicleOwner() if getElementHealth(source) <= 300 and getVehicleType(source) == "BMX" then local thePlayer = getVehicleOccupant(source) killPed(thePlayer) end end addEventHandler("onVehicleDamage", getRootElement(), KillVehicleOwner) Link to comment
BieHDC Posted August 14, 2013 Author Share Posted August 14, 2013 thx man^am i allowed to upload in commuity? Link to comment
BieHDC Posted August 15, 2013 Author Share Posted August 15, 2013 Link to community: https://community.multitheftauto.com/in ... ls&id=7743 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