Moderators IIYAMA Posted March 13, 2012 Moderators Posted March 13, 2012 Hello My Question: Is it possible to let 1 player kill another player by script? I mean a kind of slap script that slaps this player by another player. It must be also visible in killmessage. Player > kills > Player.
Moderators IIYAMA Posted March 13, 2012 Author Moderators Posted March 13, 2012 but it is not possible to set damage? They must be make a handler..... onElementDamage... -_-" or onElementGetHitByExplosion.. damn... Damn I love the resource syncro with its damage syncs... Only I hate the anti bug use script.
Agon Posted March 14, 2012 Posted March 14, 2012 Well if you want to kill a player, why do you want to set its health? Just kill him..
Moderators IIYAMA Posted March 14, 2012 Author Moderators Posted March 14, 2012 hmmm Well I was building a anti teamkill fire(motove) script. So I checked the owner of the explosion. Checked distance and slapped it. This did not work. (no attacker) But I have a better idea now.
Agon Posted March 14, 2012 Posted March 14, 2012 Maybe this? function slapHim (attacker, weapon, victim) if ( weapon == 38 ) then -- 38 is minigun sorry i dont remember molotove if getElementType(victim) == "player" then setElementHealth(attacker, getElementHealth(attacker) - 20) end end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), slapHim)
Moderators IIYAMA Posted March 14, 2012 Author Moderators Posted March 14, 2012 function slapHim (attacker, weapon, bodypart) if ( weapon == 37 ) then -- it is 37(flame weapon) The motovo weapon it self is not a weapon that makes damage. setElementHealth(attacker, getElementHealth(attacker) - 20) end end addEventHandler("onClientPlayerDamage", getLocalPlayer(), slapHim) And no your wrong this script does not work. Because attackers don't exist with weapon 37. see: http://bugs.mtasa.com/view.php?id=4925 For now it s only syncro that can sync that. But I am going to try it on a easy way. Syncro by Bigbadbutler (chaose) https://community.multitheftauto.com/index.php?p= ... ls&id=1065
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