[FilterScript] Country Detector

Started by MatheuS, Jan 11, 2015, 12:24 PM

Previous topic - Next topic

KAKAN

Quote from: Ron on Apr 14, 2016, 04:26 PMI get a txt msg in game "Playername Country: Unknown" while my country is in the db....
But your IP is not.
Yet, mate, you did a nice bump/
And also, leave this shits, there's a plugin for that, which works great!
http://forum.vc-mp.org/?topic=1478.0
Note: It doesn't support IPs like 127.0.0.1
oh no

Mohamed Boubekri

Niice Work @MatheuS,
I Have Created Command /country <Player> / ( Just For The Newbie Don't Know Scripting )
Here iTs Command:-
else if ( cmd == "country" )
{
if ( !text ) MessagePlayer("[#ff0000][INFO][#ffffff] /country <Player>",player);
local plr = FindPlayer(text);
if(!plr) MessagePlayer("[#FF0000]Usage Error:[#FFFFFF] Unknown Player", player);
else
{
local country = IpToCountry( plr.IP );
MessagePlayer("[#00ffff][INFO][#ffffff] Country " + plr.Name + " is "+country+".",player );
}
return 0;
}
Hope iTs Help!
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

Retard

Just another retard roaming around.

=RK=MarineForce

I M GETTING ERROR i can't fix it . ..

MAIN LINE 49 IPTOcountry/Iptocountry.nut line 7
Try to UnderStand ME!

UrbanY

#19
Funcion:

function P_MSG( text, player ) MessagePlayer( "[#000000][[#9400D3]Pais[#000000]][#FFFFFF] " + text, player );

CMD:

else if ( cmd == "pais" )
{
if (status[ player.ID ].Registrado == false) MessagePlayer(RED+"**Usted no esta registrado!",player);
else if ( status[ player.ID ].Logado == false ) MessagePlayer(RED+"**Usted no ah iniciado sesion!",player);
else if ( !text ) MessagePlayer(ORANGE+"Usage: /" + cmd + " [Nick/ID]", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer(RED+" >> "+ORANGE+"Invalid Player.", player );
else {
local IP = plr.IP;
P_MSG( ""+plr.Name+" es de" + IpToCountry( plr.IP ) + ".", player );
}
}
 return 0;
}

umar4911

Quote from: =RK=MarineForce on May 08, 2018, 06:34 PMI M GETTING ERROR i can't fix it . ..

MAIN LINE 49 IPTOcountry/Iptocountry.nut line 7
post the error which is on console and what is written on the line 49. I think you use notepad. I recommend notepad++ as it makes easy to find the error on the specific line.
I am gamer, programmer and hacker. Try to find me!
xD

=RK=MarineForce

Fixed by ownself Thanks For Support
Try to UnderStand ME!

=RK=MarineForce

why showing unknow country? invalid ip? and need host it at vps
Try to UnderStand ME!

umar4911

Quote from: =RK=MarineForce on May 13, 2018, 08:03 AMwhy showing unknow country? invalid ip? and need host it at vps
Since, it get ip 192.168......
This is localhost ip so thats why showing invalid. If any other player joins, he will see his country.
I am gamer, programmer and hacker. Try to find me!
xD

=RK=MarineForce

only for me showing ? unknow? and others tooo?

i hosted it at DMz Host At Router
Try to UnderStand ME!

UrbanY

Quote from: =RK=MarineForce on May 13, 2018, 04:33 PMonly for me showing ? unknow? and others tooo?

i hosted it at DMz Host At Router

Edit the ipcountry.nut and where it says unknow change it to your liking when you enter it will come out that.

=RK=MarineForce

@Takanaue

Why its showing Unkow bro can help me?
Try to UnderStand ME!

MatheuS

Quote from: =RK=MarineForce on Sep 08, 2018, 11:37 PM@Takanaue

Why its showing Unkow bro can help me?

Because you're starting the server from localhost I guess
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Mahmoud Tornado

Quote from: Takanaue on Sep 09, 2018, 12:15 AMBecause you're starting the server from localhost I guess
Sure thing.

=RK=MarineForce

There was a IPtocountry which Mohammed gave it to me it works in localhost too but i can't find bcz of i windows my pc. all old files removed.
I think Mohammed  leaved VC-MP
Try to UnderStand ME!