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


Author Topic: Lua help?  (Read 4152 times)

0 Members and 1 Guest are viewing this topic.

Offline Zerror

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Lua help?
« on: September 10, 2020, 11:32:13 PM »
I wanted to know how the PedSetDamageGivenMultiplier code works

Offline SimonBestia

  • Full Member
  • ***
  • Posts: 294
  • Gender: Male
  • Bully-Board's Best Weeb
    • View Profile
    • Youtube Channel
Re: Lua help?
« Reply #1 on: September 12, 2020, 03:37:24 PM »
PedSetDamageGivenMultiplier(ped, DamageTypeID, Amount)

Example:

Code: [Select]
PedSetDamageGivenMultiplier(gPlayer, 2, 3)
This multiplies Jimmy's melee damage by 3x.

0 is projectile damage.
1 I don't know.

Offline Zerror

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Lua help?
« Reply #2 on: September 12, 2020, 09:15:33 PM »
But this works on free roam? I tried this code

PedSetDamageGivenMultiplier(Damon, 2, 2.00)

and Damon's damage remains the same
« Last Edit: September 12, 2020, 09:18:35 PM by Zerror »

Offline SimonBestia

  • Full Member
  • ***
  • Posts: 294
  • Gender: Male
  • Bully-Board's Best Weeb
    • View Profile
    • Youtube Channel
Re: Lua help?
« Reply #3 on: September 13, 2020, 04:00:15 AM »
Just to be clear, the code works on a ped you've already created named Damon, not on every Damon that the game will spawn.
Also there's no need to type 2.00 when you can just type 2, unless you want to specify decimals.

Offline Zerror

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Lua help?
« Reply #4 on: September 13, 2020, 03:33:15 PM »
uh ok thanks SimonBestia