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


Author Topic: What is the lua command to change the peds health?  (Read 2899 times)

0 Members and 1 Guest are viewing this topic.

Offline denifarropilha

  • LUA Modder 8)
  • Jr. Member
  • **
  • Posts: 24
  • Gender: Male
  • I'm a friendly brazilian bully modder :D
    • View Profile
What is the lua command to change the peds health?
« on: November 03, 2013, 09:40:25 PM »
I started lua , and i need to change a character health, can someone help me with that?

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: What is the lua command to change the peds health?
« Reply #1 on: November 04, 2013, 12:58:01 AM »
PedSetHealth(PEDNAME,HEALTH)

200 = Jimmy's default health

Offline GaryHarrington

  • A Guy Who Likes Open World and FPS Games
  • Sr. Member
  • ***
  • Posts: 515
  • Gender: Male
  • Just Love Bully and GTA ...Nothing Interested
    • View Profile
Re: What is the lua command to change the peds health?
« Reply #2 on: November 04, 2013, 02:36:13 AM »
 :cool: you can also change it via pedstat.dat

Offline Black Norton

  • Keep Calm
  • Jr. Member
  • **
  • Posts: 86
  • Gender: Male
  • Peace For Respect
    • View Profile
Re: What is the lua command to change the peds health?
« Reply #3 on: November 04, 2013, 05:19:39 AM »
PedSetHealth(PEDNAME,HEALTH)

200 = Jimmy's default health

don't forget about set the max health
PedSetMaxHealth(PEDNAME,HEALTH)  :)

Offline SWEGTA

  • Da Forum Luffs Me!
  • *****
  • Posts: 6,423
  • Gender: Male
  • Swee Gee Tee Ayy
    • View Profile
    • Bully & GTA videos
Re: What is the lua command to change the peds health?
« Reply #4 on: November 04, 2013, 05:39:22 AM »
Would it be possible to make Jimmy able to have an almost infinite amount of health?

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: What is the lua command to change the peds health?
« Reply #5 on: November 04, 2013, 06:16:11 AM »
It's possible if u repeat the command with the repeat function.

Offline Walter20210

  • Hero Member
  • ****
  • Posts: 1,102
  • Gender: Male
  • I keep loving the old things :P
    • View Profile
    • YouTube Account
Re: What is the lua command to change the peds health?
« Reply #6 on: November 04, 2013, 06:43:51 AM »
or using a number like this one "999999999999999999999"

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: What is the lua command to change the peds health?
« Reply #7 on: November 04, 2013, 06:56:18 AM »
Or just the PlayerSetInvulnerable(true)

Offline Walter20210

  • Hero Member
  • ****
  • Posts: 1,102
  • Gender: Male
  • I keep loving the old things :P
    • View Profile
    • YouTube Account
Re: What is the lua command to change the peds health?
« Reply #8 on: November 04, 2013, 08:41:52 AM »
Yeah that can work too.

Offline denifarropilha

  • LUA Modder 8)
  • Jr. Member
  • **
  • Posts: 24
  • Gender: Male
  • I'm a friendly brazilian bully modder :D
    • View Profile
Re: What is the lua command to change the peds health?
« Reply #9 on: November 04, 2013, 10:08:58 AM »
Wow , Thanks everyone.

Offline Unknownsoldier

  • Hero Member
  • ****
  • Posts: 2,773
    • View Profile
Re: What is the lua command to change the peds health?
« Reply #10 on: June 08, 2014, 12:19:41 AM »
To change Jimmy's health:

PlayerSetHealth(number)

Replace number with the amount of health u want.

To change a ped's health:

PedSetHealth(PedID, number)

replace PedID with name of ped