Raised This Month: $ Target: $400
 0% 

get_user_steamid


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-09-2004 , 23:19   get_user_steamid
Reply With Quote #1

how do u get the steam id?
get_user_steamid
is there a different way to use it... and if so... in which include is it in?
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 07-09-2004 , 23:31  
Reply With Quote #2

Code:
new szSteamId[35]; get_user_authid( id, szSteamId, 34 );

this function does not return an integer, but rather inserts the steamid into the string you pass with it (szSteamId).

you can also use this forward (event) to catch when a player actually receives their steamid.

Code:
new g_szSteamIds[33][35];    // stores all player's steamids public client_authorized( id ) {     get_user_authId( id, g_szSteamIds[id], 34 );     return PLUGIN_CONTINUE; }

Hope this helps
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 07-09-2004 , 23:48  
Reply With Quote #3

Code:
/* Gets player authid. */ native get_user_authid(index, authid[] ,len);

This will return the wonid or the steamid.
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-10-2004 , 01:15  
Reply With Quote #4

Code:
#include <amxmodx> #include <amxmisc> new usersfile[40] = "" public amx_user_add(id,level,cid) { if (!cmd_access(id,level,cid,2))       return PLUGIN_HANDLED new arg[32] new AUTHID new player new f_admin[15] new f_password[15] new f_access[25] new f_flags[15] new line = 1 new RF_line[100] new found = 0 new user_name[32] read_argv(1,arg,32) player = cmd_target(id,arg,0) if(!player)    return PLUGIN_HANDLED AUTHID = get_user_authid(player) get_user_name(player,user_name,32)     while(line != 0) {    line = read_file(usersfile,line,RF_line,100,line)    parse(RF_line,f_admin,15,f_password,15,f_access,25,f_flags,15)    if (str_to_num(f_admin) == AUTHID){       found = 1       break    } } if(found) {    console_print(id,"Player: %s, is already in the users.ini!",user_name)    return PLUGIN_HANDLED } new WF_name[32] new WF_line[100] format(WF_line,100,"^"%d^" ^"*^" ^"bcdefghijkmnopqrstuz^" ^"ce^"",AUTHID) format(WF_name,32,"^n//%s",user_name) write_file(usersfile,WF_name,-1) write_file(usersfile,WF_line,-1) set_user_flags(AUTHID,read_flags("bcdefghijkmnopqrstuz")) client_print(id,print_console,"%s(%d) added as an admin!",user_name,AUTHID) return PLUGIN_HANDLED } public amx_user_edit(id,level,cid) { if (!cmd_access(id,level,cid,2))       return PLUGIN_HANDLED
thats the plugin i got now... im trying to make it so AuthId will work... i tried that way i gto it now... but i get a warning.

Code:
new AUTHID

Code:
AUTHID = get_user_authid(player)
__________________
Burnzy is offline
Send a message via AIM to Burnzy
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 07-10-2004 , 02:46  
Reply With Quote #5

native get_user_authid(index, authid[] ,len);

so in code use:
Code:
new AUTHID[32]
get_user_authid(index, AUTHID ,31)
[] tells you that this is an array and using len you can tell function how many fields you want to write.
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 07-10-2004 , 02:48  
Reply With Quote #6

Quote:
Originally Posted by Ryan
Code:
new szSteamId[35]; get_user_authid( id, szSteamId, 34 );

this function does not return an integer, but rather inserts the steamid into the string you pass with it (szSteamId).
dont know if you saw it, but i did mention that it doesnt return a value...
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-10-2004 , 09:40  
Reply With Quote #7

thx guys
__________________
Burnzy is offline
Send a message via AIM to Burnzy
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 14:43.


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