use [php][/php] tags....
PHP Code:
get_pcvar_string(gCvarServerIp, szIp, charsmax(szIp)) <--- Easier in the long run
as for the last part
PHP Code:
new szServerIP[32]
get_user_ip(0, szServerIP, charsmax(szServerIP));
client_print(id, print_chat, "The Server ip is %s", szServerIP);
[/php]