View Single Post
thecount
Veteran Member
Join Date: Jul 2013
Old 11-24-2014 , 19:36   Re: [TF2] Country filter with block download?
Reply With Quote #3

The Nazis are evolving and moving to TF2!.... But I think it would go something like this
PHP Code:
#include <sourcemod>
#include <geoip>
public bool:OnClientConnect(clientString:rejectmsg[], length){
    new 
String:country[4], String:IP[42];
    
GetClientIP(clientIPsizeof(IP));
    
GeoipCode3(IPcountry);
    if(!
StrEqual(country"USA"false)){//If they're not from USA. (CAN BE REPLACED WITH ANY 3 LETTER ABREVIATION
        
Format(rejectmsglength"Connections from your country are not allowed.");
        return 
false;
    }
    return 
true;


Last edited by thecount; 11-24-2014 at 19:37.
thecount is offline