Hi all,
My first little scriptje...yeeehhh....
I know for the most it is simple, but for me this is a personal victory, that i made something that actually works..
I will be honest, i think i've got 10 errors before it worked
, and then it worked backwards, so when you leave the transporter i 've got the sound
But i like to share it...
video:
and the script.
-- LUA Script - precede every function and global member with lowercase name of script + '_main'
local playingsound = 0
textinzone_name = {}
function textinzone_init_name(e,name)
textinzone_name[e] = name
end
function textinzone_main(e)
if g_Entity[e]['plrinzone']==1 then
if playingsound ==0 then
PlaySound(e,0)
playingsound = 1
end
local x = 50
local y = 50
Panel(x - 10, y, x + 10, y + 5)
TextCenterOnX(x,y+3,3,"Transporter offline")
else
playingsound = 0
end
end
Harry