Raised This Month: $ Target: $400
 0% 

Question about stats and retrieving steamID (edited)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-09-2008 , 01:42   Re: Safe time when players authid is definitely retrievable, & stats problem
Reply With Quote #3

Now.. that works good but now I remember why I made the function at spawn and not client_authorized.

At the users first connection, the plugin saves the players kills+deaths to the vault but at client_authorized, stats are not yet able to be read (for some reason). When get_user_stats is called, it returns 0 for everything. Everything being returned rank position, and every element of stats[] and bodyhits[]. When called at spawn or round_start everything works fine. Does anyone have a solution that can handle both of my problems at once?

Summary of what I need:
When a player joins server, doesn't matter if it is instantly or not. It just has to happen at some point in time when a player joins. I need to be able to read a players stats and be able to retrieve their steamID.

I was able to fix it by doing the following but is it safe doing it this way? (stability, memory usage)

Code:
public client_authorized(id) {     set_task(10.0,"client_authorized_2", id); } public client_authorized_2(id) {        //code }
__________________

Last edited by Bugsy; 02-09-2008 at 01:47.
Bugsy is offline
 



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 01:39.


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