#[K]iLLeR<3 Posted February 28, 2018 Author Share Posted February 28, 2018 16 hours ago, DABL said: يوو نسيت احط الأقواس . function checkArmor ( ) value = false if getPedArmor ( localPlayer ) >= 15 then value = true triggerServerEvent ( 'getArmor' , localPlayer , getPedArmor ( localPlayer ) - 15 ) elseif getPedArmor ( localPlayer ) < 15 then triggerServerEvent ( 'getArmor' , localPlayer , 0 ) value = true elseif getPedArmor ( localPlayer ) == 0 then value = false end return value end function zombieattack ( attacker, weapon, bodypart ) if (attacker) then if getElementType ( attacker ) == "ped" then if (getElementData (attacker, "zombie") == true) then local playerHealth = getElementHealth ( getLocalPlayer() ) if ( checkArmor ( ) == true ) then return end if playerHealth > 15 then setElementHealth ( source, playerHealth - 15 ) else triggerServerEvent ("playereaten", source, source, attacker, weapon, bodypart ) end end end end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), zombieattack ) مشكووووووور يالغالي تمت الافادة 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