getIP and getPing is atm only for CoD2 1.2 and 1.3:
PHP Code:
int gsc_player_getip()
{
    
int playerid;
    if (
stackGetNumberOfParams() < 2// function, playerid
    
{
        
printf_hide("scriptengine> ERROR: please specify atleast 2 arguments to gsc_player_getip()\n");
        return 
stackPushUndefined();
    }
    if (!
stackGetParamInt(1, &playerid))
    {
        
printf_hide("scriptengine> ERROR: closer(): param \"playerid\"[1] has to be an integer!\n");
        return 
stackPushUndefined();
    }
    
    
#if COD2_VERSION == COD2_VERSION_1_3
        
int info_base = *(int *)0x0842308C;
        
int info_size 0xB1064;
        
int info_ip_offset 0x6E6D8;
        
int info_port_offset 0x6E6B4;
    
#elif COD2_VERSION == COD2_VERSION_1_2
        
int info_base = *(int *)0x0842200C;
        
int info_size 0x79064;
        
int info_ip_offset 0x6E6D8;
        
int info_port_offset 0x6E6B4;
    
#else
        #warning gsc_player_getip() got no working addresses
        
int info_base = *(int *)0x0;
        
int info_size 0x0;
        
int info_ip_offset 0x0;
        
int info_port_offset 0x0;
        return 
stackReturnUndefined();
    
#endif
    
    
int info_player info_base playerid info_size;

    
int ip_a = *(unsigned char *)(info_player info_ip_offset 0);
    
int ip_b = *(unsigned char *)(info_player info_ip_offset 1); // dafuq, its +1 but in IDA its +4 step :S
    
int ip_c = *(unsigned char *)(info_player info_ip_offset 2);
    
int ip_d = *(unsigned char *)(info_player info_ip_offset 3);
    
//int port = *(unsigned char *)(info_player + info_ip_offset + 16);

    
char tmp[64];
    
snprintf(tmp64"%d.%d.%d.%d"ip_aip_bip_cip_d);
    
//snprintf(tmp, 64, "%d.%d.%d.%d:%d", ip_a, ip_b, ip_c, ip_d, port);
    
    
return stackPushString(tmp);

Don't use that "bruteforce" sqrt, there is a real one: http://killtube.org/downloads/cod2/e...n/std/math.gsc

PHP Code:
sqrt(arg) { return closer(800arg); }
invSqrt(arg) { return closer(801arg); } // check: http://www.beyond3d.com/content/articles/8/ 
The used abs-function is only in CoD2 available (unfortunately).