So this is a script I'm making just to mess around with LUA and learn as I go:
MissionSetup = function()
local l_1_0 = 277.3605042
local l_1_1 = -139.8320007
local l_1_2 = 6.10990
PlayerSetHealth(1000)
AreaTransitionXYZ(0,l_1_0, l_1_1, l_1_2 )
end
SpawnEnemy1 = function()
local l_1_0 = 269.8130188
local l_1_1 = -140.7661591
local l_1_2 = 6.10990
PedCreateXYZ(26, l_1_0, l_1_1, l_1_2)
PedAttack(Lucky,gPlayer,1)
end
SpawnEnemy2 = function()
local l_1_0 = 209.5122375
local l_1_1 = -138.3591766
local l_1_2 = 6.10990
PedCreateXYZ(28, l_1_0, l_1_1, l_1_2)
PedAttack(Ricky,gPlayer,1)
end
WinMission = function()
if PedGetHealth(Lucky) <= 0 and if PedGetHealth(Ricky) <= 0 then -- Dunno what to do at this part either.
MissionCleanup = function()
end
main = function()
SpawnEnemy1()
SpawnEnemy2()
end
But everytime I start the script by going to the Arcade machine, I spawn at the location I set and so does Lucky and Ricky, then the game crashes and I'm not sure why can someone tell me what it is, i'm sure it is something REALLY obvious lmao