Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: KAKAN on Oct 02, 2015, 01:39 PM

Title: Format() setting
Post by: KAKAN on Oct 02, 2015, 01:39 PM
Okay, yesterday my router got fucked up in a thunder-lightening, so port-forward is not possible
Currently, I'm using mobile net, from which port-forward is not possible.
So can anyone try this for me? OR can anyone say that this one will work or not?
local country = geoip_country_name_by_addr(player.IP);
    if (country != null) EMessage( format("*> %s is connecting from %s <*",player.Name, country) );
    else EMessage( format("%s in connecting from Unknown",player.Name) );
When I connect from localhost, it messages KAKAN is connecting from Unknown,
so I'm not sure that the upper-one will work or not, can anyone try it?
Title: Re: Format() setting
Post by: Kirollos on Oct 02, 2015, 02:05 PM
Isn't it supposed to do that? You are connecting from localhost, and you shouldn't expect a geoip data from 127.0.0.1.
Title: Re: Format() setting
Post by: KAKAN on Oct 02, 2015, 06:00 PM
Ahh, you didn't understand.
I mean that the lower one(with else) is working, but I'm not sure about the upper one(if), because of the reasons stated above(in the topic)
Title: Re: Format() setting
Post by: DizzasTeR on Oct 02, 2015, 06:06 PM
Just make it, if( country ) ...
Title: Re: Format() setting
Post by: KAKAN on Oct 03, 2015, 07:19 AM
Okay THANKS! Sloved, Locked
Title: Re: Format() setting
Post by: Thijn on Oct 03, 2015, 11:38 AM
You can always get your external IP and paste it directly in that code, instead of player.IP