• Show players location on join?
    1 replies, posted
Hey, I found a server recently that showed the location of the players when they joined. I currently have something to display when they are connecting, but I was just wondering if anyone knew how to display the country the user was from. (here's the code created by: brandonj4 (Thanks to him)) [code] if SERVER then AddCSLuaFile() util.AddNetworkString("chat_AddText") chat = {} function chat.AddText(...) net.Start("chat_AddText") net.WriteTable({...}) net.Broadcast() end hook.Add("PlayerInitialSpawn", "SteamIDDisplay", function(ply) chat.AddText(Color(255,0,0), "[SERVER]", Color(255,255,255), ply:Nick().." has connected. SteamID: "..ply:SteamID()) end) else net.Receive("chat_AddText", function(len) chat.AddText(unpack(net.ReadTable())) end) end [/code] And an example of what I'm talking about: [T]http://i.imgur.com/kLk4Ctm.png[/T] Thanks.
You'll need to use web API of one of GeoIP services.
Sorry, you need to Log In to post a reply to this thread.