Jump to content

Change weapon damage [DELETE]


EvoGT

Recommended Posts

Posted (edited)

Hello mta community,

how to change weapon damage. Weapons are to strong for me, i need to make them with low damage.

Edited by Guest
Posted
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.

Posted

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

Posted

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 ? :(

Posted

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

Posted

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.

Posted
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

  • Moderators
Posted

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.

  • 2 years later...
Posted

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 ) 
  

Posted
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.

Posted
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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...