Where are my errors ? (This is the server.lua, I must create a client.lua for this to work ? And what should I put in it ?)
------------------------------ Message de salutations ------------------------------
AddEventHandler('onPlayerJoin', root,
local oldAllowed = wasAllowedList[player]
local newAllowed = isPlayerAllowedHere(player)
wasAllowedList[player] = newAllowed
if newAllowed and not oldAllowed then
outputChatBox("Bienvenue sur GuilAndreas", value, 25, 45, 35, false)
if oldAllowed and not newAllowed then
function outputChatBox(joueur)
outputChatBox("Salut, "..getPlayerName(joueur).." content de te revoir !", value, 35, 45, 25, false)
end
end
end
)
------------------------------ Message d'arrivée ------------------------------
AddEventHandler('onPlayerLogin', root,
function outputChatBox(joueur)
outputChatBox(..getPlayerName(joueur).."s'est connécté !", value, 0, 255, 0, true)
end
)
------------------------------ Message de déconnexion ------------------------------
AddEventHandler('onPlayerQuit', root,
function outputChatBox(joueur)
outputChatBox(..getPlayerName(joueur).."s'est déconnécté !", value, 255, 0, 0, true)
end
)
------------------------------ Message de connexion ------------------------------
AddEventHandler('onPlayerLogin', root,
local
outputChatBox("Vous êtes maintenent en ligne", value, 100, 255, 100, false)
end
)
------------------------------ Message de déconnexion ------------------------------
AddEventHandler('onPlayerLogout', root,
local
outputChatBox("Vous êtes maintenent hors ligne", value, 255, 100, 100, false)
end
)