News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: J_Melee,Crazy_Basic and J_Mascot 0 damage fix  (Read 1208 times)

0 Members and 1 Guest are viewing this topic.

Offline mhdt

  • Jr. Member
  • **
  • Posts: 93
  • 中国!中国!中国!
    • View Profile
J_Melee,Crazy_Basic and J_Mascot 0 damage fix
« on: June 02, 2022, 11:41:49 PM »
Code: [Select]
local isHitedPed = {}
main = function()
while not SystemIsReady() or AreaIsLoading() do
Wait(0)
end
while true do
for i,ped in {PedFindInAreaXYZ(0, 0, 0, 99999)} do
if (HitIsPlaying(ped,"/Global/J_Mascot/Offense/Medium/Strikes/LightAttacks/WindMill_R/WindMill_L") or HitIsPlaying(ped,"/Global/Crazy_Basic/Offense/Short/Short/Strikes/LightAttacks/WindMill_R/WindMill_L")) and PedGetNodeTime(ped) >= 0.12 and not PedMePlaying(PedGetWhoHitMeLast(ped)"SwingPunch_R",true)and not PedIsBlocking(ped)and not PedIsPlaying(ped,"/Global/HitTree/Standing/Melee/Generic/Left/HEADHOOK",true)then
PedApplyDamage(ped,15 * PedGetDamageGivenMultiplier(ped, 2))
isHitedPed[ped] = true
end
if HitIsPlaying(ped,"/Global/J_Melee_A/Offense/Medium/Strikes/HeavyAttacks/HeavyRight") and not PedIsBlocking(ped)and not PedIsPlaying(ped,"/Global/HitTree/Standing/Melee/Generic/Straight/HEAVYSTRAIGHT2",true)then
PedApplyDamage(ped,30 * PedGetDamageGivenMultiplier(ped, 2))
isHitedPed[ped] = true
end
end
for ped,v in pairs(isHitedPed)do
if (PedGetNodeTime(PedGetWhoHitMeLast(ped)) <= 0.1 and not PedIsPlaying(PedGetWhoHitMeLast(ped),"/Global/J_Melee_A/Offense/Medium/Strikes/HeavyAttacks/HeavyRight/HeavyRight_LAND",true)) or not PedIsValid(PedGetWhoHitMeLast(ped)) or PedGetHealth(ped) <= 0 then
isHitedPed[ped] = nil
end
end
Wait(0)
end
end
function PedIsBlocking(ped)
if not PedMePlaying(ped,"Block",true)or not PedMePlaying(ped,"0_BLOCK_0",true)then
return false
end
return true
end
function HitIsPlaying(ped,node)
return PedGetHealth(ped) > 0 and PedIsHit(ped,2,200) and PedIsValid(PedGetWhoHitMeLast(ped)) and PedIsPlaying(PedGetWhoHitMeLast(ped),node,true) and not PedMePlaying(ped,"Cars",true)and isHitedPed[ped] == nil
end
« Last Edit: June 24, 2022, 06:38:43 AM by mhdt »