Get player's country

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Digger

Addon Developer
Jan 26, 2017
44
13
8
19
So, I'm trying to make a player info tracking system and I was wondering if it is possible to get a player's country?
 
give this a try
uses SkUtilities

obviously re-arrange to suit the needs of your code
code_language.skript:
command /test <player>:
    trigger:
        set {_ip} to ip of arg-1
        set {_text} to text from "http://ip-api.com/json/%{_ip}%"
        set {_text2} to content of json value "country" from text {_text}
        broadcast "%{_text2}%"
[doublepost=1529102652,1528845373][/doublepost]I also just found this
WOLVSK

This syntax
code_language.skript:
country of %player%

So i guess you could do like "country of arg" or "country of {variable}"

Probably a lot simpler than the last code I sent
 
Status
Not open for further replies.