try it now
EDITED : yea he can't use the function after the eventhandler .
marker = createMarker ( 1808.4814453125, -1909.2841796875, 13.571605682373, "cylinder", 1.1, 0, 255, 0)
addEventHandler ("onMarkerHit", marker, function()
if (getElementType (hitElement) == "player") then
local team = getPlayerTeam (hitElement)
if getTeamName (team) ~= "Civilians" then
local teamName = getTeamName (team)
exports["FFS-TopBar"]:outputTopBar( "You have to be Civilian before using Bus Driver Job (/civilian)", hitElement, 255, 246, 7 )
else
setElementData( source, "Occupation", "Bus Driver", true )
exports["FFS-TopBar"]:outputTopBar( "You are now a Bus Driver", source, 0, 255, 43 )
setPlayerNametagColor(source, 255, 246, 7)
end
end
end)