Raised This Month: $51 Target: $400
 12% 

[req] Vip by Town


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alicx
BANNED
Join Date: Mar 2013
Location: Tunisia
Old 05-10-2013 , 14:08   [req] Vip by Town
Reply With Quote #1

this plugin gives free vip for players who are from France or Paris (it can be changed by cvar)
the vip flag: ADMIN_LEVEL_H
alicx is offline
Send a message via MSN to alicx Send a message via Skype™ to alicx
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-11-2013 , 15:51   AW: [req] Vip by Town
Reply With Quote #2

Is it possible to detect the city of a player? I think GeoIP isn't so exact in locating the city, it always shows my IP in a city far away from me.
__________________
Kia is offline
darcadarca
Senior Member
Join Date: Feb 2012
Location: Romania
Old 05-11-2013 , 16:23   Re: [req] Vip by Town
Reply With Quote #3

some cities of some players can appear unknown so ..
__________________
hqqqqqqqq
darcadarca is offline
Send a message via Yahoo to darcadarca
AmineKyo
فوق سريرك
Join Date: Oct 2011
Location: Morocco
Old 05-11-2013 , 16:27   Re: [req] Vip by Town
Reply With Quote #4

GeoIP Extended.
__________________
AmineKyo is offline
alicx
BANNED
Join Date: Mar 2013
Location: Tunisia
Old 05-12-2013 , 05:04   Re: [req] Vip by Town
Reply With Quote #5

so can it be maked or no ??
alicx is offline
Send a message via MSN to alicx Send a message via Skype™ to alicx
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 05-12-2013 , 06:19   Re: [req] Vip by Town
Reply With Quote #6

Of course it possible to make it. As aminekyo said use the geoip extented module
__________________
Quote:
Originally Posted by quark View Post
You're a genius
Stopped any pawn work cause of university for computer science
oxygen935 is offline
Send a message via Skype™ to oxygen935
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-12-2013 , 06:34   Re: [req] Vip by Town
Reply With Quote #7

Could be something like this, not tested.
PHP Code:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <geoip>

#define PLUGIN    "France Friends"
#define AUTHOR    "KiA"
#define VERSION    "1.0"

#define ADMIN_VIP ADMIN_LEVEL_H

new cvar_geo

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
cvar_geo register_cvar("frvip_city","1")
    
}

public 
client_putinserver(id)
{
    new 
UserIP[33],UserCountry[45],UserCity[45]
    
get_user_ip(id,UserIP,charsmax(UserIP) - 1,0)
    
    
geoip_country(UserIP,UserCountry,charsmax(UserCountry) - 1)
    
geoip_city(UserIP,UserCity,charsmax(UserCity) - 1)
    
    if(
get_pcvar_num(cvar_geo) == && UserCity[0] == "Paris")
    {
        
set_user_flags(id,ADMIN_VIP)
        return 
PLUGIN_HANDLED
    
}
    else if(
get_pcvar_num(cvar_geo) == && UserCountry[0] == "France")
    {
        
set_user_flags(id,ADMIN_VIP)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED

btw, I know this code isn't correct, I just want to give an idea.
__________________
Kia 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 11:22.


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