Bully-Board

Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started by: denifarropilha on November 03, 2013, 09:40:25 PM

Title: What is the lua command to change the peds health?
Post by: denifarropilha 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?
Title: Re: What is the lua command to change the peds health?
Post by: c00ld0c26 on November 04, 2013, 12:58:01 AM
PedSetHealth(PEDNAME,HEALTH)

200 = Jimmy's default health
Title: Re: What is the lua command to change the peds health?
Post by: GaryHarrington on November 04, 2013, 02:36:13 AM
 :cool: you can also change it via pedstat.dat
Title: Re: What is the lua command to change the peds health?
Post by: Black Norton 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)  :)
Title: Re: What is the lua command to change the peds health?
Post by: SWEGTA on November 04, 2013, 05:39:22 AM
Would it be possible to make Jimmy able to have an almost infinite amount of health?
Title: Re: What is the lua command to change the peds health?
Post by: c00ld0c26 on November 04, 2013, 06:16:11 AM
It's possible if u repeat the command with the repeat function.
Title: Re: What is the lua command to change the peds health?
Post by: Walter20210 on November 04, 2013, 06:43:51 AM
or using a number like this one "999999999999999999999"
Title: Re: What is the lua command to change the peds health?
Post by: DaBOSS54320 on November 04, 2013, 06:56:18 AM
Or just the PlayerSetInvulnerable(true)
Title: Re: What is the lua command to change the peds health?
Post by: Walter20210 on November 04, 2013, 08:41:52 AM
Yeah that can work too.
Title: Re: What is the lua command to change the peds health?
Post by: denifarropilha on November 04, 2013, 10:08:58 AM
Wow , Thanks everyone.
Title: Re: What is the lua command to change the peds health?
Post by: Unknownsoldier 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