EvoGT Posted February 26, 2013 Share Posted February 26, 2013 (edited) Hello mta community, how to change weapon damage. Weapons are to strong for me, i need to make them with low damage. Edited February 26, 2013 by Guest Link to comment
DNL291 Posted February 26, 2013 Share Posted February 26, 2013 Use setWeaponProperty. Link to comment
EvoGT Posted February 26, 2013 Author Share Posted February 26, 2013 Use setWeaponProperty. Thanks. Could yuo make an example? Im bad at scripting Link to comment
DNL291 Posted February 26, 2013 Share Posted February 26, 2013 setWeaponProperty(weaponID, "poor", "damage", value) The 'value' argument is a number you want for the damage. The player must have the "poor" skill set to have the effect. Link to comment
EvoGT Posted February 26, 2013 Author Share Posted February 26, 2013 Eh my bad english. That "poor" the skill? If i change the damage, and then shot to car, will it changes? Link to comment
EvoGT Posted February 26, 2013 Author Share Posted February 26, 2013 I think nobody knows what i want : x okey. Like i shot with ak47 in to car, and destroy it in 10seconds, ( shoting until it burns) and i wanna make lower damage, and destroy like in 20secs Link to comment
PaiN^ Posted February 26, 2013 Share Posted February 26, 2013 I didn't try it before, But i think it should .. Link to comment
EvoGT Posted February 26, 2013 Author Share Posted February 26, 2013 setWeaponProperty(30, "poor", "damage", 1) i tryed , nothing changed i destroy car ( with ak47 in the same 10 sec time ) nothing changed. What to do ? Link to comment
EvoGT Posted February 26, 2013 Author Share Posted February 26, 2013 Rly, nobody understands me Heres what im trying to do: I wanna make Ak47 damage lower. Becouse, when i shot with ak47 into vehicle, it blows too fast. is it possible to make damage lower when i shotting to vehicles Link to comment
50p Posted February 26, 2013 Share Posted February 26, 2013 I guess you don't read what people tell you. There is only 1 function that will change weapon's properties and it's setWeaponProperty. If you want the property to be changeable depending on its target then you will have to getPedTarget and check if it's specific type of element (or you can use onPlayerTarget) and then change player's weapon skill level. setWeaponProperty will change weapon's property for all players, if you change it client-side it may cause trouble for other players, so this is why you should change weapon's property for specific level and then change player's level depending on what he's aiming at. Link to comment
EvoGT Posted February 26, 2013 Author Share Posted February 26, 2013 I guess you don't read what people tell you. There is only 1 function that will change weapon's properties and it's setWeaponProperty. If you want the property to be changeable depending on its target then you will have to getPedTarget and check if it's specific type of element (or you can use onPlayerTarget) and then change player's weapon skill level. setWeaponProperty will change weapon's property for all players, if you change it client-side it may cause trouble for other players, so this is why you should change weapon's property for specific level and then change player's level depending on what he's aiming at. Well, i talking not about aiming. I talking about this : https://community.multitheftauto.com/ind ... ls&id=5711 And i tryed, setWeaponProperty(30, "poor", "damage", 1) But it dont work Link to comment
Moderators IIYAMA Posted February 26, 2013 Moderators Share Posted February 26, 2013 50P change player's weapon skill level setWeaponProperty(30, "pro", "damage", 1) setWeaponProperty(30, "std", "damage", 1) setWeaponProperty(30, "poor", "damage", 1) -- "poor","std" and "pro" The reason why it did not work in the first place is that all weapons in freeroam(probably) start with differed skill levels. When you change the weapon damage, it will also change the damage vs peds and players. It is possible to reduce it without change the default value, but that will require much and much more scripting skills. I made it, but of course I won't give it to you, because it cost me lots of time. Link to comment
Xwad Posted April 12, 2015 Share Posted April 12, 2015 ok i made it but itw not wroking:( pls help function giveAmmo ( thePlayer, theVehicle, theTeam ) if (getElementModel(source) == 433) then giveWeapon ( source, 31, 200 ) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), giveAmmo ) Link to comment
ViPeR- Posted April 12, 2015 Share Posted April 12, 2015 ok i made it but itw not wroking:( pls help function giveAmmo ( thePlayer, theVehicle, theTeam ) if (getElementModel(source) == 433) then giveWeapon ( source, 31, 200 ) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), giveAmmo ) Of course it's not working , open the wiki page of onPlayerVehicleEnter and see what is the source of this event. Link to comment
yesyesok Posted April 12, 2015 Share Posted April 12, 2015 ok i made it but itw not wroking:( pls help function giveAmmo ( thePlayer, theVehicle, theTeam ) if (getElementModel(source) == 433) then giveWeapon ( source, 31, 200 ) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), giveAmmo ) Why are you bumping an old topic and posting your problem? Link to comment
Xwad Posted April 13, 2015 Share Posted April 13, 2015 Noo I wrote this to the wrong post!! 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