hostip is returning the IP in its binary form. Not sure if SourceMod has the equivalent of inet_ntoa to turn it from its binary form back to its numbers-and-dots notation.
Here's a quick version I wrote:
PHP Code:
stock Inet_NtoA(binary, String:address[], maxlength)
{
new quads[4];
quads[0] = binary >> 24 & 0x000000FF; // mask isn't necessary for this one, but do it anyway
quads[1] = binary >> 16 & 0x000000FF;
quads[2] = binary >> 8 & 0x000000FF;
quads[3] = binary & 0x000000FF;
Format(address, maxlength, "%d.%d.%d.%d", quads[0], quads[1], quads[2], quads[3]);
}
The attached test plugin registers the getip admin command which prints the server IP from the hostip cvar.
Having said that, if you start the server with the -ip command-line switch, the dotted quad IP will appear in the "ip" cvar as well.