DRW Posted August 10, 2015 Share Posted August 10, 2015 Hello, I have a problem. I'm using custom weapons with createWeapon, I'm going to explain the problem: First of all, I create a weapon and set an ElementData to this weapon, something like this: weapon1 = createWeapon ("minigun",x,y,z) setElementData(weapon1,"owner",getPlayerName(localPlayer)) then when a weapon kills the ped use this onClientPedWasted: local pyer = getPlayerFromName(getElementData(weapon1,"owner")) setElementData(pyer,"kills",getElementData(pyer,"kills")+1) As you see, the script is ok, but onClientPedWasted only supports player and vehicle elements, what can I do? I've tried using onClientWeaponFire to check if a ped is dead and then setting the "kills" elementData but somehow it adds more kills than 1. 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