Raised This Month: $ Target: $400
 0% 

Show Stats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mateo10
Veteran Member
Join Date: Jan 2006
Old 02-23-2007 , 16:48   Show Stats
Reply With Quote #1

Runtime Errors:
Code:
L 03/02/2007 - 15:21:45: [FUN] Player out of range (0)
L 03/02/2007 - 15:21:45: [AMXX] Displaying debug trace (plugin "showstats.amxx")
L 03/02/2007 - 15:21:45: [AMXX] Run time error 10: native error (native "set_user_frags")
L 03/02/2007 - 15:21:45: [AMXX]    [0] showstats.sma::event_new_round (line 32)
Plugin:
Code:
#include <amxmodx> #include <cstrike> #include <vault> #include <fun> new Kills[33]; new Deaths[33]; public plugin_init() {     register_plugin("Show Stats Forever", "1.0", "MaTTe");         register_cvar("ssf_enable", "1");         register_event("DeathMsg", "event_deathmsg", "a");     register_event("HLTV", "event_new_round", "a", "1=0", "2=0") } public event_deathmsg() {     new killer = read_data(1);     new victim = read_data(2);         Kills[killer] += 1;     Deaths[victim] += 1;         savestats(victim);     savestats(killer); } public event_new_round(id) {     loadstats(id);     set_user_frags(id, Kills[id]);     cs_set_user_deaths(id, Deaths[id]); } public client_disconnect(id) {     savestats(id); } public savestats(id) {     new authid[32];     get_user_authid(id, authid, 31);         new vaultkey[64], vaultdata[64];         format(vaultkey, 63, "PLAYER-%s-frags", authid);     format(vaultdata, 63, "%d", Kills[id]);     set_vaultdata(vaultkey, vaultdata);         format(vaultkey, 63, "PLAYER-%s-deaths", authid);     format(vaultdata, 63, "%d", Deaths[id]);     set_vaultdata(vaultkey, vaultdata); } public loadstats(id) {     new authid[32];     get_user_authid(id, authid, 31);         new vaultkey[64], vaultdata[64];         format(vaultkey, 63, "PLAYER-%s-frags", authid);     get_vaultdata(vaultkey, vaultdata);     Kills[id] = str_to_num(vaultdata);         format(vaultkey, 63, "PLAYER-%s-deaths", authid);     get_vaultdata(vaultkey, vaultdata);     Deaths[id] = str_to_num(vaultdata); }

Last edited by mateo10; 03-02-2007 at 09:32.
mateo10 is offline
mateo10
Veteran Member
Join Date: Jan 2006
Old 03-02-2007 , 09:32   Re: Show Stats
Reply With Quote #2

Bump.
mateo10 is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 03-02-2007 , 09:53   Re: Show Stats
Reply With Quote #3

2 ways:
1) check if is_user_conected
2) Use ResetHud istead of HTLV
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
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