Jump to content

[Solved] Help me please


Valentin3526

Recommended Posts

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 
) 

Edited by Guest
Link to comment
    ------------------------------ 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 
    ) 

Link to comment
  
 ------------------------------ Message de salutations ------------------------------ 
    addEventHandler('onPlayerJoin', root, 
       function() 
        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 
        end 
    ) 
      
    ------------------------------ Message d'arrivée ------------------------------ 
    addEventHandler('onPlayerLogin', root, 
        function() 
        function outputChatBox(joueur) 
            outputChatBox(..getPlayerName(joueur).."s'est connécté !", value, 0, 255, 0, true) 
             end 
        end 
    ) 
      
    ------------------------------ Message de déconnexion ------------------------------ 
    addEventHandler('onPlayerQuit', root, 
        function() 
        function outputChatBox(joueur) 
            outputChatBox(..getPlayerName(joueur).."s'est déconnécté !", value, 255, 0, 0, true) 
            end 
        end 
    ) 
      
    ------------------------------ Message de connexion ------------------------------ 
    addEventHandler('onPlayerLogin', root, 
         function() 
                    outputChatBox("Vous êtes maintenent en ligne", value, 100, 255, 100, false) 
          end 
    ) 
      
    ------------------------------ Message de déconnexion ------------------------------ 
    addEventHandler('onPlayerLogout', root, 
        function() 
            outputChatBox("Vous êtes maintenent hors ligne", value, 255, 100, 100, false) 
        end 
    ) 

try it, I am not sure if it will work

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...