Raised This Month: $ Target: $400
 0% 

SteamID Check


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-08-2007 , 13:09   Re: SteamID Check
Reply With Quote #1

Code:
new pAuth[17] get_user_authid(id, pAuth, 16) if ( equal(pAuth, "STEAM_0:0:563272") ) {     // do stuff here }

Last edited by [ --<-@ ] Black Rose; 02-09-2007 at 01:59.
[ --<-@ ] Black Rose is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 02-08-2007 , 16:36   Re: SteamID Check
Reply With Quote #2

Max length of a steamid is 32.
Although such long steamids do not exist, (yet) they might reach the 20 character boundary soon.

I know it doesn't apply to this situation because you are only evaluating it. Just wanted to make clear
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-09-2007 , 01:57   Re: SteamID Check
Reply With Quote #3

The longest I've seen is 18 long, I highly doubt they will reach even 19 or over 19.
Highest I've ever seen is "STEAM_0-0-138xxxxx"
[ --<-@ ] Black Rose is offline
tripc
Senior Member
Join Date: Aug 2006
Old 02-12-2007 , 14:23   Re: SteamID Check
Reply With Quote #4

Code:
 public cmdChat(id, level, cid)
{
 new message[192], name[32], players[32], inum, authid[32], userid
 
 read_args(message, 191)
 remove_quotes(message)
 get_user_authid(id, authid, 31)
 get_user_name(id, name, 31)
 userid = get_user_userid(id)
 get_players(players, inum)
 
 log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message)
 log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message)
 
 format(message, 191, "(Steam) %s :   %s", name, message)
 
 new pAuth[17]
 get_user_authid(id, pAuth, 16)
 
 for (new i = 0; i < inum; ++i)
 {
  if (equal(pAuth, "STEAM_0:1:4063234")) 
   client_print(players[i], print_chat, "%s", message)
  }
 
 return PLUGIN_HANDLED
}
i did this code and its dont working,
can someone please fix it to my SteamID (STEAM_0:1:4063234)
tripc is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-12-2007 , 14:30   Re: SteamID Check
Reply With Quote #5

You're getting id's auth 2 times.

Code:
 new pAuth[17]  get_user_authid(id, pAuth, 16)    for (new i = 0; i < inum; ++i)  {   if (equal(pAuth, "STEAM_0:1:4063234"))    client_print(players[i], print_chat, "%s", message)   }
-->
Code:
 new pAuth[17]    for (new i = 0; i < inum; ++i)  {   get_user_authid(players[i], pAuth, 16)   if (equal(pAuth, "STEAM_0:1:4063234"))    client_print(players[i], print_chat, "%s", message)   }
or even...
Code:
new g_id public client_putinserver(id) {     new pAuth[32]     get_user_authid(id, pAuth, 31)     if ( equal(pAuth, "STEAM_0:1:4063234") )         g_id = id } public client_disconnect(id) {     if ( id = g_id )         g_id = 0; } public cmdChat(id, level, cid) {     new message[192], name[32], authid[32], userid       read_args(message, 191)     remove_quotes(message)     get_user_authid(id, authid, 31)     get_user_name(id, name, 31)     userid = get_user_userid(id)       log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message)     log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message)     if ( g_id )         client_print(g_id, print_chat, "(Steam) %s :   %s", name, message)       return PLUGIN_HANDLED }

Last edited by [ --<-@ ] Black Rose; 02-12-2007 at 14:37.
[ --<-@ ] Black Rose is offline
tripc
Senior Member
Join Date: Aug 2006
Old 02-12-2007 , 15:22   Re: SteamID Check
Reply With Quote #6

the last one works but if i want to 2/3/4 SteamIDs?

can you write me the code of 2/3/4 SteamIDs?

and btw i got 1 warnning on this

Code:
 
public client_disconnect(id) {
if ( id = g_id )
g_id = 0;
}

Last edited by tripc; 02-12-2007 at 16:21.
tripc 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 00:41.


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