Thread: get_user_authid
View Single Post
SAMURAI16
BANNED
Join Date: Sep 2006
Old 04-05-2007 , 23:52   Re: get_user_authid
Reply With Quote #7

this is better :
Code:
#include <amxmodx> new g_maxplayers; public plugin_init() {     register_plugin("","","");         register_event("HLTV","checkauthid", "a","1=0", "2=0");         g_maxplayers = get_maxplayers(); } public checkauthid() {     new i;     for(i = 1; i <= g_maxplayers; i++)     {         if(!is_user_connected(i))         continue;                     new authid[32]         get_user_authid(i,authid,31);                 if(equali(authid,"STEAM_0:1:123321"))         {                 //stuff                 // ...                         }     } }

Because steamid is called on loop, only if is necessary, len for authid is 31 not 32.
And istead of 32 get_maxplayers

Last edited by SAMURAI16; 04-06-2007 at 01:06.
SAMURAI16 is offline
Send a message via MSN to SAMURAI16