Raised This Month: $32 Target: $400
 8% 

Restrict Country


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raizo1sk
New Member
Join Date: Dec 2014
Old 08-21-2019 , 04:05   Restrict Country
Reply With Quote #1

I want to block for example this country to connect..How can do that?

Code:
#include <amxmodx>
#include <geoip>

new toggle_plugin

public plugin_init()
{
   toggle_plugin = register_cvar("amx_restrictcountry", "1")
}

public client_connect(id)
{
   if(!get_pcvar_num(toggle_plugin))
      return

   new ip[32], country[3]

   get_user_ip(id, ip, 31, 1)
   geoip_code2(ip, country)
   
   if(!equali(country,"PL"))
      server_cmd("kick #%i ^"Only players from Poland are allowed!^"",get_user_userid(id))
}

Last edited by raizo1sk; 08-21-2019 at 04:08.
raizo1sk is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 08-21-2019 , 05:27   Re: Restrict Country
Reply With Quote #2

Search country kicker. Works well. Been using it for a while.
redivcram is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 08-21-2019 , 06:17   Re: Restrict Country
Reply With Quote #3

plugin :- https://forums.alliedmods.net/showthread.php?p=97613

Country code :- http://www.statoids.com/wab.html
__________________
SED LYF !!!
SHIELD755 is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 08-21-2019 , 09:26   Re: Restrict Country
Reply With Quote #4

Vpn ez fix
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode