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


Author Topic: Hit Stop mod  (Read 2736 times)

0 Members and 3 Guests are viewing this topic.

Offline Ming

  • Full Member
  • ***
  • Posts: 154
  • Gender: Male
  • 抽刀斷水水更流,舉杯消愁愁更愁
    • View Profile
Hit Stop mod
« on: July 15, 2021, 12:25:01 AM »
Code: [Select]
function HitStop()
 Time = 150
 while true do
  for NPC,Ped2 in {PedFindInAreaXYZ(0, 0, 0, 99999)} do
   if PedIsHit(Ped2) and PedIsValid(Ped2) then
    if PedGetWhoHitMeLast(Ped2) == gPlayer then
     PlayerSpeed = GameGetPedStat(gPlayer, 20)
     PedSpeed = GameGetPedStat(Ped2, 20)
     GameSetPedStat(gPlayer, 20, 30)
     GameSetPedStat(Ped2, 20, 30)
     Wait(Time)
     GameSetPedStat(gPlayer, 20, PlayerSpeed)
     GameSetPedStat(Ped2, 20, PedSpeed)
end
   end
  end
  Wait(0)
 end
end
It doesn't work :unsure:
Can someone help ?
« Last Edit: July 15, 2021, 12:26:39 AM by Ming »

Offline mhdt

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Hit Stop mod
« Reply #1 on: July 15, 2021, 02:05:57 AM »
You have published the correct version in QQ, why do you want to publish the broken version here?

Offline Ming

  • Full Member
  • ***
  • Posts: 154
  • Gender: Male
  • 抽刀斷水水更流,舉杯消愁愁更愁
    • View Profile
Re: Hit Stop mod
« Reply #2 on: July 15, 2021, 03:14:21 AM »
You have published the correct version in QQ, why do you want to publish the broken version here?
講中文就好了

Offline Ming

  • Full Member
  • ***
  • Posts: 154
  • Gender: Male
  • 抽刀斷水水更流,舉杯消愁愁更愁
    • View Profile
Re: Hit Stop mod
« Reply #3 on: July 15, 2021, 03:15:57 AM »
以前那個版本沒法每次都觸發,這個是用了PedIsHit() function,這個算是增加打擊感mod v2

Offline mhdt

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Hit Stop mod
« Reply #4 on: July 15, 2021, 06:17:54 PM »
你只使用PedIsHit(Ped2)游戏会识别成任何形式的攻击,你应该改为PedIsHit(Ped2, 2)游戏会识别成近战,下面代码亲测可行
Code: [Select]
function HitStop()
 Time = 150
 while true do
  for NPC,Ped2 in {PedFindInAreaXYZ(0, 0, 0, 99999)} do
   if PedIsHit(Ped2, 2) and PedGetWhoHitMeLast(Ped2) == gPlayer then
     PlayerSpeed = GameGetPedStat(gPlayer, 20)
     PedSpeed = GameGetPedStat(Ped2, 20)
     GameSetPedStat(gPlayer, 20, 30)
     GameSetPedStat(Ped2, 20, 30)
     Wait(Time)
     GameSetPedStat(gPlayer, 20, PlayerSpeed)
     GameSetPedStat(Ped2, 20, PedSpeed)
 end
   end
  Wait(0)
 end
end

Offline mhdt

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Hit Stop mod
« Reply #5 on: July 15, 2021, 06:18:31 PM »
不过我并没有觉得因此会提升打击感?

Offline mhdt

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Hit Stop mod
« Reply #6 on: July 15, 2021, 06:25:50 PM »
好吧,并不只识别近战伤害

Offline Ming

  • Full Member
  • ***
  • Posts: 154
  • Gender: Male
  • 抽刀斷水水更流,舉杯消愁愁更愁
    • View Profile
Re: Hit Stop mod
« Reply #7 on: July 15, 2021, 08:53:14 PM »
好吧,并不只识别近战伤害
那PedIsHit(Ped2, 2)裡面的2是什麼意思

Offline mhdt

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Hit Stop mod
« Reply #8 on: July 15, 2021, 11:43:02 PM »
不知道,我看到某个任务lua中有这个我就按照它这样放了上去

Offline Ming

  • Full Member
  • ***
  • Posts: 154
  • Gender: Male
  • 抽刀斷水水更流,舉杯消愁愁更愁
    • View Profile
Re: Hit Stop mod
« Reply #9 on: July 16, 2021, 04:47:51 AM »
不知道,我看到某个任务lua中有这个我就按照它这样放了上去
了解,感謝