I'm currently learning lua scripting, and I've run into a problem I just don't know how to fix. I'm trying to spawn Johnny with a bat, and with 200 health. I've just been messing around so I have know idea what I am doing, I'm into that self teaching kinda thing, ya know.
Heres what I have so far.
function MissionSetup()
PlayerSetPosXYZArea(270,-110,6,0)
PlayerSetHealth(300)
end
function main()
PedSetWeapon(23,300,1)
PedSetHealth(23,2000)
PedSetHealth(21,33)
PedSetWeapon(23,395,1)
TextPrintString("Defeat the Greasers", 5, 1)
enemy = PedCreateXYZ(23,265,-110,6)
PedSetPedToTypeAttitude(enemy,13,0)
PedAttackPlayer(enemy,3)
enemy = PedCreateXYZ(21,265,-110,6)
PedSetPedToTypeAttitude(enemy,13,0)
PedAttackPlayer(enemy,3)
repeat
Wait(0)
until PedIsDead(enemy)
MissionSucceed()
end
One more question I've been wondering about is does the spacing matter in sentences or not?