Hi guys.
Back after a long time of in-activity on MTA, i decided i wanted to learn to script in Lua.
However the tutorials i found are a bit outdated, since the scripts ( i literally copied them, just to try it out ) don't work anymore.
If anyone could link me to any tutorial on lua that works with the current MTA, that would be nice.
Greets, WallMart
EDIT: i figured i should post the code too, maybe i did something horribly wrong.
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10
function joinHandler()
spawnPlayer(source, spawnX, spawnY, spawnZ)
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox("Welcome to My Server", source)
end
addEventHandler("onPlayerJoin", getRootElement(), joinHandler)