Jump to content

Question


IIYAMA

Recommended Posts

  • Moderators

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

Link to comment
  • Moderators

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.

Link to comment
  • Moderators

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.

Link to comment

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) 

Link to comment
  • Moderators
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

Link to comment

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