AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Ip Priority Scripting (https://forums.alliedmods.net/showthread.php?t=261811)

legion9491 04-20-2015 18:46

Ip Priority Scripting
 
Team Fortress 2: Looking to add to https://forums.alliedmods.net/showthread.php?t=132470

I want to make an IP Priority by saying if your location is here in for example New York. We want the zip code of New York to take priority of anybody over any other location.

Wanting to grab the location, match it to another location if not kick if player total = a certain amount.

When it hits a certain point of players for say, Max game 24: We want to reserve 12 spots for New York players, so once it hits 12 players I can kick players from other locations out once it hits that number if they are not from New York...

Where would I start to look in order to start coding this, or is there a pluggin that might help lead me in the right direction.

Thanks!

-----

Considering I have the GeoIpCity downloaded, can I just use this code and essentially just put if (Example...)

native bool:GeoipGetRecord(const String:ip[], String:city[45], String:region[45], String:country_name[45], String:country_code[3], String:country_code3[4]);

if userstotal > 12
String:city[45]='New York' then do nothing
else
sm_kick <userid> For being out of location

legion9491 04-22-2015 14:26

Re: Ip Priority Scripting
 
Would anybody know where it displays the geo location to the console?


All times are GMT -4. The time now is 00:36.

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