StreetSaintz Posted November 12, 2014 Share Posted November 12, 2014 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
SkatCh Posted November 12, 2014 Share Posted November 12, 2014 (edited) 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 November 13, 2014 by Guest Link to comment
StreetSaintz Posted November 12, 2014 Author Share Posted November 12, 2014 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 line 293; http://i.imgur.com/xkqd1RU.png Link to comment
SkatCh Posted November 13, 2014 Share Posted November 13, 2014 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
StreetSaintz Posted November 14, 2014 Author Share Posted November 14, 2014 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now