Raised This Month: $ Target: $400
 0% 

String + server ip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
anupm
Senior Member
Join Date: May 2010
Old 04-08-2011 , 15:19   String + server ip
Reply With Quote #1

I need to store the server ip to a variable .

Like

new ip[32]
get_user_ip(0, ip, charsmax(ip))

it will give me the ip with port . like 111.111.111.111:27015
But i need only the IP . i.e. I need 111.111.111.111 here .
How to do it ?
anupm is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-08-2011 , 15:20   Re: String + server ip
Reply With Quote #2

get_user_ip(0, ip, charsmax(ip))

->

get_user_ip(0, ip, charsmax(ip), true)
__________________
Arkshine is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 04-08-2011 , 15:21   Re: String + server ip
Reply With Quote #3

/* Returns ip. */
native get_user_ip(index,ip[],len, without_port = 0);

get_user_ip(0, ip, charsmax(ip))

get_user_ip(0, ip, charsmax(ip), 1)
__________________

Working on:
nothing
schmurgel1983 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:01.


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