bartje01 Posted November 8, 2010 Posted November 8, 2010 Hey guys. I'm trying to make deagle kills with one bullet. It's not working addEventHandler ("onClientPedWeaponFire",getRootElement(), function(weap,ammo,_,_,_,_,player) if isElement (player) and(weapon == 24) and (getElementType (player) == "player") then setElementHealth (player,0) end end) addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc ) I don't know what's wrong. it just has no effect. Please help
Castillo Posted November 8, 2010 Posted November 8, 2010 function playerDamage_text ( attacker, weapon, bodypart, loss ) if ( weapon == 24 ) then killPed ( source ) end end addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage_text ) try this, not tested. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted November 8, 2010 Posted November 8, 2010 function playerDamage_text ( attacker, weapon, bodypart, loss ) if ( weapon == 24 ) then killPed ( source, attacker, weapon, bodypart, false ) end end addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage_text ) is better (you can get proper informations on onPedWasted or onPlayerWasted events Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Castillo Posted November 9, 2010 Posted November 9, 2010 varez, i was at my mother's computer, i made fast San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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