AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ip address. (https://forums.alliedmods.net/showthread.php?t=153596)

zombieplague 03-26-2011 10:50

ip address.
 
how do i get user ip address ??

drekes 03-26-2011 11:12

Re: ip address.
 
http://www.amxmodx.org/funcwiki.php?...r_ip&go=search

.Dare Devil. 03-26-2011 12:45

Re: ip address.
 
Is it hard to look in a inc files?

fysiks 03-26-2011 17:22

Re: ip address.
 
Quote:

Originally Posted by .Dare Devil. (Post 1439626)
Is it hard to look in a inc files?

Yes, apparently it is.

Exolent[jNr] 03-26-2011 17:47

Re: ip address.
 
Quote:

Originally Posted by .Dare Devil. (Post 1439626)
Is it hard to look in a inc files?

That's not fair, because all of the functions you get from the core (AMXModX) module aren't all in 1 include file.
If you see amxmodx.inc, you will see the multiple other includes.

A better response would've been, "Is it hard to look in the funcwiki?"

zombieplague 03-27-2011 09:28

Re: ip address.
 
i don't get this part

ip[], len, [ without_port ]

get_user_ip( id, %s, ?, 291.156.45: ) ?

i need help.

drekes 03-27-2011 09:57

Re: ip address.
 
without port:
PHP Code:

new szIp[10];
get_user_ip(idszIpcharsmax(szIp), 1); 

with port
PHP Code:

new szIp[10];
get_user_ip(idszIpcharsmax(szIp), 0); 


zombieplague 03-27-2011 11:11

Re: ip address.
 
i can't seem to see the ip and it gave false ip.

PHP Code:

client_print0print_chat"( %d ) test ip."szIp 

and it show 2 digit only instead of 123.156.123.45:4545

drekes 03-27-2011 11:32

Re: ip address.
 
use %s
ip is in string format

ConnorMcLeod 03-27-2011 11:34

Re: ip address.
 
Quote:

Originally Posted by drekes (Post 1440114)
without port:
PHP Code:

new szIp[10];
get_user_ip(idszIpcharsmax(szIp)); 

with port
PHP Code:

new szIp[10];
get_user_ip(idszIpcharsmax(szIp), 1); 


speak scientist/completelywrong


All times are GMT -4. The time now is 14:38.

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