Jump to content

whats wrong here


StreetSaintz

Recommended Posts

Hey guys, i'm trying to add country flags to my joinquits but i don't know if i am allowed to use 2 functions after each other

this is what i got:

addEventHandler('onClientPlayerJoin', root, showcountry) 
    function reason() 
    function showcountry() 
            local flag = exports.admin:getPlayerCountry ( source ) 
                     if flag then 
        AddingS("join", getPlayerName(source).."#FFFFFF has joined the game#FF4000[#FFFFFF :admin/client/images/flags/"..flag..".png #FF4000]") 
        else 
                     flag = "N/A"  
                     end 
    end 
) 

Link to comment

Why you need to use 2 function ???

addEventHandler('onClientPlayerJoin', root, 
    function () 
            local flag = exports.admin:getPlayerCountry ( source ) 
                     if flag then 
        AddingS("join", getPlayerName(source).." has joined the game":admin/client/images/flags/"..flag..".png") 
              else 
       flag = "N/A" 
end 
) 
 

Edited by Guest
Link to comment
Why you need to use 2 function ???
addEventHandler('onClientPlayerJoin', root, 
    function () 
            local flag = exports.admin:getPlayerCountry ( source ) 
                     if flag then 
        AddingS("join", getPlayerName(source).."#FFFFFF has joined the game#FF4000[#FFFFFF :admin/client/images/flags/"..flag..".png #FF4000]") 
              else 
       flag = "N/A" 
end 
) 

i don't know, that was my question if i am allowed to use 2 functions

and i am getting these errors

aEWFgqO.png

line 293; http://i.imgur.com/xkqd1RU.png

xkqd1RU.png

Link to comment

You need to add un other end :

addEventHandler('onClientPlayerJoin', root, 
    function () 
            local flag = exports.admin:getPlayerCountry ( source ) 
                     if flag then 
        AddingS("join", getPlayerName(source).."#FFFFFF has joined the game#FF4000[#FFFFFF :admin/client/images/flags/"..flag..".png #FF4000]") 
              else 
       flag = "N/A" 
end 
end 
) 

Link to comment
You need to add un other end :
addEventHandler('onClientPlayerJoin', root, 
    function () 
            local flag = exports.admin:getPlayerCountry ( source ) 
                     if flag then 
        AddingS("join", getPlayerName(source).."#FFFFFF has joined the game#FF4000[#FFFFFF :admin/client/images/flags/"..flag..".png #FF4000]") 
              else 
       flag = "N/A" 
end 
end 
) 

yeahn i've added another end now so i don't get any errors anymore but it doesn't show anything when a player joins the server

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...