31
Modding Questions/Help Archives / Re: luac: luascript.lua:1: unexpected symbol near `∩'
« on: July 15, 2016, 01:11:24 AM »
Try this, an example using three peds
Code: [Select]
MissionSetup = function()
AreaTransitionXYZ(0, 480.52, -200.43, 2.91)
PlayerSetHealth(2000)
end
MissionCleanup = function()
end
main = function()
Peanut = PedCreateXYZ(21, 478.22 , -200.73 , 2.95)
PedSetHealth(Peanut, 100)
PedSetPedToTypeAttitude(Peanut,13,0)
PedAttackPlayer(Peanut,1)
Hal = PedCreateXYZ(22, 475.22 , -202.22 , 3.00)
PedSetHealth(Hal, 100)
PedSetPedToTypeAttitude(Hal,13,0)
PedAttackPlayer(Hal,1)
Johnny = PedCreateXYZ(23, 473.29 , -203.48 , 3.05)
PedSetHealth(Johnny, 100)
PedSetPedToTypeAttitude(Johnny,13,0)
PedAttackPlayer(Johnny,1)
repeat
Wait(0)
until (not PedIsValid(Peanut) or PedIsDead(Peanut)) and
(not PedIsValid(Hal) or PedIsDead(Hal)) and
(not PedIsValid(Johnny) or PedIsDead(Johnny))
MissionSucceed()
end