So this is the code
main_client.lua
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Memo = {}
GUIEditor_Image = {}
function giveWeapon(wID, wAmmo)
triggerServerEvent("giveW", getLocalPlayer(), wID, ammo)
end
function showWelcomeMessage()
GUIEditor_Window[1] = guiCreateWindow(208,274,343,289,"Stanopolo",false)
guiWindowSetMovable(GUIEditor_Window[1],false)
guiWindowSetSizable(GUIEditor_Window[1],false)
GUIEditor_Image[1] = guiCreateStaticImage(68,40,203,40,"images/logo.png",false,GUIEditor_Window[1])
GUIEditor_Memo[1] = guiCreateMemo(13,78,316,169,"Welcome to the Stanopolo server.\n\n\nCurrent Version: [Alpha 1.0]",false,GUIEditor_Window[1])
GUIEditor_Button[1] = guiCreateButton(122,260,92,20,"OK",false,GUIEditor_Window[1])
addEventHandler("onClientGUIClick", GUIEditor_Button[1], btnOK_Click, false)
end
function btnOK_Click()
guiSetVisible(GUIEditor_Window[1], false)
end
main_server.lua
function PlayerLogin()
local x = 1949
local y = -3223
local z = 5
local name = getPlayerName(source)
spawnPlayer(source, x, y, z)
fadeCamera(source, true)
setCameraTarget(source, source)
setElementModel(source, 288)
gW(8, 1)
outputChatBox("Welcome to the Stanopolo " .. name, source)
showMessage()
end
addEventHandler("onPlayerLogin", getRootElement(), PlayerLogin)
function gW(gid, gammo)
giveWeapon( source, tostring(gid), tostring(gammo) )
end
addEvent("giveW", true)
addEventHandler("giveW", getRootElement(), gW)
The error is
attempt to call global 'showWelcomeMessage' (a nil value)