AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Connect City (https://forums.alliedmods.net/showthread.php?t=229589)

serjaka 11-10-2013 11:11

Connect City
 
hello Allied Modders ! I have 1 problem, help me pelase to solve it . I use Geo Ip Extended by Arkshine and i done a plugin but i got error on copile.

ERROR: error 088: number of arguments does not match definition

Guys Help please with this code

Code:

#include <amxmodx>
#include <amxmisc>
#include <geoip>
#include <colorchat>

new bool:gIsUserConnected[33];

public plugin_init() {
        register_plugin( "City Connect Announcer", "1.0", "Serjaka" );
       
}

public client_putinserver( id ) {
        gIsUserConnected[id] = true;
       
        if( is_user_bot( id ) ) {
                gIsUserConnected[id] = false;        // lets make less loops in distance counting xD
               
                return PLUGIN_CONTINUE;
        }
       
        new szIP[16], szCountry[32], szCity[32], szName[32];
        get_user_name(id, szName, 31);
        get_user_ip( id, szIP, 31, 1 );

        if( equal( szIP, "loopback" ) )
                format( szIP, sizeof( szIP ) - 1, "85.196.220.208" ) // o hai i am hardcoder.
       
        geoip_country( szIP, szCountry );
        geoip_city( szIP, szCity );
       
        if( equal(szCountry, "error") ) {
                if( !contain(szIP, "192.168.") || !contain(szIP, "10. ") || !contain(szIP, "172.") || equal(szIP, "127.0.0.1") )
                        szCountry = "LAN";
               
                else if( equal(szIP, "loopback") )
                        szCountry = "LAN Owner";
               
                else
                        szCountry = "Unknown Country";
        }
       
        if( get_user_flags(id)) {
                if( !equal( szCity, "error" ) )

                        ColorChat( 0, RED, "^x01Player^x04 %s^x01 connected from^x01 [^x03%s^x01],^x03 [%s]^x01", szName, szCity, szCountry );
                else
                        ColorChat( 0, RED, "^x01Player^x04 %s^x01 connected from^x01 [^x03%s^x01]", szName, szCountry );
        }
       
       
        return PLUGIN_CONTINUE;
}


serjaka 11-10-2013 11:14

Re: Connect City
 
Code:

if( equal( szIP, "loopback" ) )
                format( szIP, sizeof( szIP ) - 1, "85.196.220.208" ) // o hai i am hardcoder.

what do this command?


can someone help me with this? please
http://forums.alliedmods.net/showthr...33#post2059233
some error i dont know how to add :)

wickedd 11-10-2013 12:07

Re: Connect City
 
PHP Code:

  geoip_countryszIPszCountry );
  
geoip_cityszIPszCity ); 

:arrow:

PHP Code:

  geoip_countryszIPszCountrycharsmaxszCountry ) );
  
geoip_cityszIPszCitycharsmaxszCity ) ); 

Edit: Don't cross post.

serjaka 11-10-2013 12:18

Re: Connect City
 
thxx Bro Works fine :* , but for what is this code:
Code:

if( equal( szIP, "loopback" ) )
                format( szIP, sizeof( szIP ) - 1, "85.196.220.208" ) // o hai i am hardcoder.


wickedd 11-10-2013 12:42

Re: Connect City
 
You wrote the plugin and you don't know what that is?
PHP Code:

register_plugin"City Connect Announcer""1.0""Serjaka" ); 


serjaka 11-10-2013 12:52

Re: Connect City
 
i found this command from other plugin :D

wickedd 11-10-2013 13:11

Re: Connect City
 
Quote:

Originally Posted by serjaka (Post 2059279)
i found this command from other plugin :D

You mean, you found a plugin by xpaw and you changed his name to yours.
We don't like people who take credit for someone else's work.


All times are GMT -4. The time now is 23:16.

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