-.Paradox.- Posted April 20, 2014 Share Posted April 20, 2014 Hello, is it possible to check if the player ip is (e.i: 142.168.42.44) and then setElementData to a (e.i flag.png)? Because there is some players without country flag, And i'm trying to do it in a stupid way That's my code. exports.scoreboard:addScoreboardColumn('Home') function showcountry() local flag = exports.admin:getPlayerCountry ( source ) local ip = getPlayerIP( source ) if flag then setElementData(source,"Home",":admin/client/images/flags/"..flag..".png") elseif ip == 142.168.42.44 then setElementData(source,"Home",":admin/client/images/flags/flag.png") else flag ="N/A" end end addEventHandler("onPlayerJoin",getRootElement(), showcountry) Link to comment
Alexs Posted April 20, 2014 Share Posted April 20, 2014 'getPlayerIP' returns a string, not a 'malformed number'. Link to comment
-.Paradox.- Posted April 20, 2014 Author Share Posted April 20, 2014 And how i can define the player ip? Link to comment
Alexs Posted April 20, 2014 Share Posted April 20, 2014 And how i can define the player ip? elseif ip == "142.168.42.44" then --strings "" Link to comment
-.Paradox.- Posted April 20, 2014 Author Share Posted April 20, 2014 And how i can define the player ip? elseif ip == "142.168.42.44" then --strings "" Thanks. 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