Raised This Month: $ Target: $400
 0% 

Get Players Money at Disconnect throws error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-05-2013 , 12:04   Get Players Money at Disconnect throws error
Reply With Quote #1

Hello everybody,

I have a little problem here, I wan't to save the players money into a Variable when he's disconnecting using this code :

PHP Code:
public client_disconnect(id)
{
    
g_iMoney[id] = cs_get_user_money(id// Error Line
    
save_user_money(id)    

But sometimes I get this in my log and players saved money gets 0 :

Quote:
L 05/05/2013 - 17:45:58: [CSTRIKE] Invalid player 5
L 05/05/2013 - 17:45:58: [AMXX] Run time error 10: native error (native "cs_get_user_money")
Anyone knows how to fix that? I'd say "if(is_user_connected(id))", but I think I can't check that on disconnect.

Greets,
Kia.
__________________

Last edited by Kia; 05-05-2013 at 12:04.
Kia 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 10:52.


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