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


Author Topic: Lua PedGet??  (Read 1982 times)

0 Members and 2 Guests are viewing this topic.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Lua PedGet??
« on: May 17, 2014, 06:20:10 AM »
is there anyone can explain me about This PedGet?
like :
PedGetHealth,
PedGetModel,
PedGetLastVehicle,
PedGetPosXYZ,
PedGetWeapon,
PedGetTargetPed,
PedGetFlag,
PedGetMaxHealth


can some one explain that all? pleasee, i need information all about pedget!

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Lua PedGet??
« Reply #1 on: May 17, 2014, 11:53:22 AM »
All PedGet commands are usually supplying the game information and updates information that was already being given to the game.


PedGetHealth - It tells the game how much health a ped has. It can also be used as a condition if written like this :

if PedGetHealth(Ped) <= HP then

PedGetModel - Tells the game which Model ID or Model Name the ped is using (which character is that ped)

PedGetLastVehicle - Tells the game what was the last vehicle used by that ped.

PedGetPosXYZ - Tells the game what coords the ped is at, where he is now on the map.

PedGetWeapon - Tells the game which weapon the ped has.

PedGetTargetPed - Tells the game which ped is the chosen ped is locking on, used to apply codes on free roam peds which do not involve Ide.img editing through LUA.

PedGetFlag - I haven't investigated about this command yet.

PedGetMaxHealth - Tells the game what is the Maximum health this ped can have.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Lua PedGet??
« Reply #2 on: May 18, 2014, 06:04:13 AM »
PedGetHealth
PedGetModel
PedGetLastVehicle
PedGetPosXYZ
PedGetWeapon
PedGetMaxHealth
are that above. need TextPrintString??

PedGetTargetPed
Thx for the info. but if i using it like this will be work?
Code: [Select]
PedSetActionNode(PedGetTargetPed, " Haymaker", "act")
this just example,the haymaker it's will not running .are its will be work like this? and if table insert like this?
Code: [Select]
PedGetTargetPed = table.insert(Actions,{"Haymaker", "act", "Johnny Throatgrab"})

are my example like that will work about PedGetTargetPed? Thx :)

PedGetFlag
Don't worry about it :D

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: Lua PedGet??
« Reply #3 on: May 18, 2014, 06:18:15 AM »
  nah i think you will have to make like this.

 local LockOnPed = PedGetTargetPed()

  PedSetActionNode(LockOnPed, "/Global/Freaks/PaintedMan", "Globals/FreakShow.act")


Thats how it works! :)

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Lua PedGet??
« Reply #4 on: May 19, 2014, 06:11:16 AM »
Thx Dude I will Try it.