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
PlayerSetHealth(200) -- gives the player 200 health
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2) -- teleports the player to the sidewalk outside the boys dorm
end
F_Davis = function()
Davis = PedCreateXYZ(99, 301.498993, -72.504997, 6.003000)
DavisBlip = AddBlipForChar(Davis, 6, 2, 2)
end
F_Davis2 = function()
if PedInRectangle(gplayer, 326.8171387, -103.0250931, 323.7320557, -95.51804352) then
PedRecruitAlly(gplayer, Davis)
end
end
MissionCleanup = function()
collectgarbage()
end -- end statement
main = function()
F_Davis() -- Function Call
repeat
F_Davis2()
Wait(0)
until not Alive
end
There.
If it still dosn't work, then post here and I will show you a diffrent technique, as the technique I gave you now with the "if" for the PedInRectangle is buggy and may work in delay.