Raised This Month: $51 Target: $400
 12% 

How to get server Ip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m0skVi4a
Senior Member
Join Date: May 2011
Location: Rousse, Bulgaria
Old 07-20-2011 , 12:56   How to get server Ip
Reply With Quote #1

Hellol
Can someone gives me a simple code for a way to detect the outpu ip(My ip(example - my ip is 77.78.123.45, not the server ip)) and if the output ip's == cvar ip to run a command
m0skVi4a is offline
Send a message via Skype™ to m0skVi4a
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-20-2011 , 13:13   Re: How to get server Ip
Reply With Quote #2

get_user_ip(), use 0 as player index to get server's IP.
Use equal() to check if IPs are equal.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
m0skVi4a
Senior Member
Join Date: May 2011
Location: Rousse, Bulgaria
Old 07-20-2011 , 13:23   Re: How to get server Ip
Reply With Quote #3

I can not ask the command get_user_ip
Can you make only this
m0skVi4a is offline
Send a message via Skype™ to m0skVi4a
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-20-2011 , 13:33   Re: How to get server Ip
Reply With Quote #4

You are in Scripting Help section, and this is the complete basics that I told you.
In this section, you are expected to be able to have knowledge of scripting.
If you cannot script, then I will move this thread to Suggestions/Requests.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
m0skVi4a
Senior Member
Join Date: May 2011
Location: Rousse, Bulgaria
Old 07-20-2011 , 13:40   Re: How to get server Ip
Reply With Quote #5

yes thank you
m0skVi4a is offline
Send a message via Skype™ to m0skVi4a
HBxander
Senior Member
Join Date: Jan 2011
Location: Behind you!
Old 07-20-2011 , 20:03   Re: How to get server Ip
Reply With Quote #6

Exolent i dont get it, is this correct formatted?

Code:
new server_ip [ 60 ] get_user_ip ( 0, server_ip, sizeof ( server_ip ) - 1 ) if ( !equal ( server_ip, ip_required ) )

then your code, and so on?
__________________
Selling:

- PointMod for Hide And Seek - $20
- Private BlockMaker with Weapon Block And More - $50
- Achievements ( FFA GamePlay ) - $25

PM Me about Private Work!
HBxander is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-20-2011 , 20:07   Re: How to get server Ip
Reply With Quote #7

Yes, that would check if the ip of the server is not the same as 'ip_required'.
__________________
Hi.
Kreation is offline
m0skVi4a
Senior Member
Join Date: May 2011
Location: Rousse, Bulgaria
Old 07-21-2011 , 02:27   Re: How to get server Ip
Reply With Quote #8

And the īp_requires" is the IP thah is by cvar. And if server_ip ip_required are not identical
my comand
m0skVi4a is offline
Send a message via Skype™ to m0skVi4a
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 17:00.


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