Guy 1 is the Ped's name
for example, when u want to spawn a ped and later on do commands on him you write this:
local Guy1 = nil
local Guy2 = nil
then when u want to perform commands such as the ped attacks and stuff like that you do :
PedAttack(Guy1 , Guy2).
I will write you here the script I have made so you will learn better.
Script :
ImportScript("\\Library\\LibTable.lua") -- imports the LibTable library
ImportScript("\\Library\\LibPed.lua") -- imports the LibPed library
local l_0_0 = false
MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
local Guy1 = nil
local Guy2 = nil
local Guy3 = nil
local Guy4 = nil
AreaTransitionXYZ(0, -34, -92, 1.001125435)
PlayerSetHealth(200) -- gives the player 200 health
Wait(1000)
AreaTransitionXYZ(0, 163, 18, 6.2859478)
Guy1 = PedCreateXYZ(6, 164, 18, 6.2859478)
end
MissionCleanup = function()
end -- end statement
main = function() -- Main mission function
F_LoadAnimations()
end
After the Guy1 = PedCreateXYZ command which creates the ped where you want to can make him do stuff.
Like perform animations, attack, run, wander, ect...
Remember to put them AFTER the pedcreate command, and always make sure that his local name and the name before the = pedcreateXYZ thing, is always the same, or else it will crash.