addEventHandler('onPlayerQuit', root,
function(reason)
outputChatBox('* ' .. getPlayerName(source) .. ' Has left the game [' .. reason .. ']',getRootElement(), 255, 0, 0)
end
)
function a ()
local flag = call(getResourceFromName("admin"), "getPlayerCountry", source)
local ip = getPlayerIP( source )
setElementData(source,"Country",flag)
outputChatBox(getPlayerName(source).."Has Join The Game From"..flag..", IP: "..ip..,root, 255,255,255)
end
addEventHandler("onPlayerJoin",getRootElement(),a)
Not tested.
EDIT:You didn't finished a string somewhere but i can't see where.(Give us some debug)
EDIT2:Now it should work.(probably)