AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get user ip (https://forums.alliedmods.net/showthread.php?t=275902)

Sn3amtz 12-10-2015 13:55

Get user ip
 
Code:

new szName[32], authid[32];
              get_user_name(id, szName, charsmax(szName))
              if(equal(szName, "Sn3amtz"))
              get_user_authid(id, authid, 31)
              if( equali(authid, "STEAM_0:0:123456789") )

I want to remove name and steam but i want to get command for Ip

I want to get command only for a speciffic ip class

wickedd 12-10-2015 14:18

Re: Get user ip
 
What are you really trying to do? Because you don't need a player's name to get their SteamID or IP.

Sn3amtz 12-10-2015 14:39

Re: Get user ip
 
I want to get priority to use different commands only for a speciffic ip class

Example :
Code:

new szIP[32]
get_user_ip(id, szIP, charsmax(szName))
 if(equal(szIP, "188.212"))]


OciXCrom 12-10-2015 15:47

Re: Get user ip
 
So, what's the problem?

PHP Code:

new szIP[32]
get_user_ip(idszIPcharsmax(szIP), 1)

if(
equal(szIP"12.34.56.78"))
    
client_print(idprint_chat"Priority granted!"


Sn3amtz 12-10-2015 16:35

Re: Get user ip
 
Thanks

siriusmd99 12-12-2015 14:50

Re: Get user ip
 
PHP Code:

new szIP[32]
get_user_ip(idszIPcharsmax(szIP), 1)

if( 
equalszIP"188.212") ) client_print(idprint_chat"Acces Granted!"


OciXCrom 12-12-2015 15:00

Re: Get user ip
 
Why equalI and why change sz to us?

siriusmd99 12-12-2015 15:04

Re: Get user ip
 
Quote:

Originally Posted by OciXCrom (Post 2371795)
Why equalI and why change sz to us?

Fixed.


All times are GMT -4. The time now is 17:53.

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