RobbyAJM Posted November 17, 2016 Posted November 17, 2016 Hello, my name is Robby, I'm here for asking abot MTA DayZ gamemodes, my gamemodes can't dead, idk why, can you tell me wich lua must re-edited? thank you.
Tekken Posted November 17, 2016 Posted November 17, 2016 Search for onClientPlayerDamage most of the times you will find it on survivorSystem_client.lua but that really depends on how it's your gamemode scripted.
RobbyAJM Posted November 17, 2016 Author Posted November 17, 2016 Spoiler addEventHandler ( "onClientPlayerDamage", getLocalPlayer (), playerGetDamageDayZ ) function pedGetDamageDayZ ( attacker, weapon, bodypart, loss ) cancelEvent() if attacker and attacker == getLocalPlayer() then damage = 100 if weapon == 37 then return end if weapon == 63 or weapon == 51 or weapon == 19 then setElementData(source,"blood",0) if getElementData(source,"blood") <= 0 then triggerServerEvent("onZombieGetsKilled",source,attacker) end elseif weapon and weapon > 1 and attacker and getElementType(attacker) == "player" then damage = getWeaponDamage (weapon) if bodypart == 9 then damage = damage*1.5 headshot = true end setElementData(source,"blood",getElementData(source,"blood")-math.random(damage*0.75,damage*1.25)) if getElementData(source,"blood") <= 0 then triggerServerEvent("onZombieGetsKilled",source,attacker,headshot) end end end end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ That my survivorSystem_client, can you tell me which script must fixed?
Tekken Posted November 17, 2016 Posted November 17, 2016 Try this one (not sure): addEventHandler ( "onClientPlayerDamage", getLocalPlayer (), playerGetDamageDayZ ) function pedGetDamageDayZ ( attacker, weapon, bodypart, loss ) cancelEvent() if attacker and attacker == getLocalPlayer() then damage = 100 if weapon == 37 then return end if weapon == 63 or weapon == 51 or weapon == 19 then setElementData(source,"blood",0) if getElementData(source,"blood") <= 0 then triggerServerEvent("kilLDayZPlayer",source,attacker) end elseif weapon and weapon > 1 and attacker and getElementType(attacker) == "player" then damage = getWeaponDamage (weapon) if bodypart == 9 then damage = damage*1.5 headshot = true end setElementData(source,"blood",getElementData(source,"blood")-math.random(damage*0.75,damage*1.25)) if getElementData(source,"blood") <= 0 then triggerServerEvent("kilLDayZPlayer",source,attacker,headshot) end end end end
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