View Single Post
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 12-28-2016 , 04:06   Re: Module: GeoIP+ (v1.3)
Reply With Quote #216

Quote:
Originally Posted by ish12321 View Post
szIP and szIp are not same
AMXMODx is a case sensitive
So make that P also capital else change case for complete others too
ok ish now see error.

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

#define PLUGIN "Test plugin by shehzad"
#define VERSION "1.0"
#define AUTHOR "Muhammad shehzad"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
   }
public 
client_putinserver(id

    
set_task(10.0"OwnerWelcome"id

public 
OwnerWelcome(id)
{
    if( !
is_user_bot(id) ) { 
    new 
szName[32], szIP[21], szCountry[46], szCity[21]
    
get_user_name(idszNamecharsmax(szName))
    
get_user_ip(idszIPcharsmax(szIP))
    
geoip_country(szIPszCountrycharsmax(szCountry))
    
geoip_city(szIPszCitycharsmax(szCity))
         
        if( 
get_user_flags(id) & ADMIN_RCON 
            
ColorChat(0GREY"^4P[K]K^3 OWNER^4 %s ^3has connected! ^1[^4Country^1:^3%s^1][^4City^1:^3%s^1]"szNameszCountryszCity);
    else  if( 
get_user_flags(id) & ADMIN_KICK )
            
ColorChat(0GREY"^4P[K]K^3 Admin^4 %s ^3has connected! ^1[^4Country^1:^3%s^1][^4City^1:^3%s^1]"szNameszCountryszCity);
        else
            
ColorChat(0GREY"^4P[K]K^3 Player^4 %s ^3has connected! ^1[^4Country^1:^3%s^1][^4City^1:^3%s^1]"szNameszCountryszCity); 
         
    } 
}
public 
client_disconnectid )
{
    if( !
is_user_bot(id) )

    new 
szName[32], szIP[21], szCountry[46], szCity[21]
    
get_user_name(idszNamecharsmax(szName))
    
get_user_ip(idszIPcharsmax(szIP))
    
geoip_country(szIPszCountrycharsmax(szCountry))
    
geoip_city(szIPszCitycharsmax(szCity))  
         
        if( 
get_user_flags(id) & ADMIN_RCON 
            
ColorChat(0GREY"^4P[K]K^3 OWNER^4 %s ^3has disconnected! ^1[^4Country^1:^3%s^1][^4City^1:^3%s^1]"szNameszCountryszCity); 
        else  if( 
get_user_flags(id) & ADMIN_KICK 
            
ColorChat(0GREY"^4P[K]K^3 Admin^4 %s ^3has disconnected! ^1[^4Country^1:^3%s^1][^4City^1:^3%s^1]"szNameszCountryszCity);
        else
            
ColorChat(0GREY"^4P[K]K^3 Player^4 %s ^3has disconnected! ^1[^4Country^1:^3%s^1][^4City^1:^3%s^1]"szNameszCountryszCity); 
 
    } 

errors
Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "geoip_city" on line 23
Error: Number of arguments does not match definition on line 23
Error: Undefined symbol "geoip_city" on line 42
Error: Number of arguments does not match definition on line 42

4 Errors.
Could not locate output file C:\Users\shehzad\Desktop\my plugin\owner_player_welcome.amx (compile failed).
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234