Quote:
Originally Posted by arvEL.
hi guys i want get ip server without port
example:
PHP Code:
new address[32]; get_cvar_string("net_address", address, charsmax(address));
[/COLOR]
|
Code:
net_address
"net_address" is "192.168.42.246:27015"
Gives the local server ip. Unless your computer is connected to the internet without local ip.
Despite that, here there a plugin to get your server external:
ip: /ip = show server IP and
SQL Get column as cvar.
Quote:
Originally Posted by arvEL.
this code get ip:port 11.22.33.44:5555
i want get just ip server without port
example:
11.22.33.44
|
To remove the string, see:
- Rules
- Some help with AlliedModdersForum.
https://www.amxmodx.org/api/string/strtok
Code:
strtok( currentLine, string_ip, charsmax(string_ip), currentLine_splited, charsmax(currentLine_splited), ':', 0 )
__________________