Raised This Month: $ Target: $400
 0% 

load data problem i tried many things


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 06-30-2006 , 19:52   load data problem i tried many things
Reply With Quote #1

ok I know there are many savedata/loaddata problems/questions around here
but I can't figure this one out
Code:
public client_authorized( id ) {     gPlayerClass[id] = CLASS_NONE;     gPlayerXP[id] = 0;     gPlayerLevel[id] = 0;         if( get_cvar_num( "sv_savexp" ) == 1 ) {         LoadXP( id );                 client_print( id, print_chat, "XP is loaded" );     } } // Loaded on Client Disconnect public client_disconnect( id ) {     if( get_cvar_num( "sv_savexp" ) == 1 ) {         SaveXP( id );                 client_print( id, print_chat, "XP is saved" );     } } SaveXP( id ) {     new authid[33];     get_user_authid( id, authid, 32 );         new vaultkey[64], vaultdata[64]     format( vaultkey, 63, "[LOTR]-%s-Class", authid );     format( vaultdata, 63, "%d", gPlayerClass[id] );     set_vaultdata( vaultkey, vaultdata );         format( vaultkey, 63, "[LOTR]-%s-XP", authid );     format( vaultdata, 63, "%d", gPlayerXP[id] );     set_vaultdata( vaultkey, vaultdata );         format( vaultkey, 63, "[LOTR]-%s-Level", authid );     format( vaultdata, 63, "%d", gPlayerLevel[id] );     set_vaultdata( vaultkey, vaultdata ); } // Load xp LoadXP( id ) {     new authid[33]     get_user_authid( id, authid, 32 );         new vaultkey[64], vaultdata[64]     format( vaultkey, 63, "[LOTR]-%s-Class", authid );     get_vaultdata( vaultkey, vaultdata, 63 );     gPlayerClass[id] = str_to_num( vaultdata );         format( vaultkey, 63, "[LOTR]-%s-XP", authid );     get_vaultdata( vaultkey, vaultdata, 63 );     gPlayerXP[id] = str_to_num( vaultdata );         format( vaultkey, 63, "[LOTR]-%s-Level", authid );     get_vaultdata( vaultkey, vaultdata, 63 );     gPlayerLevel[id] = str_to_num( vaultdata ); }
__________________
- Bye bye!
nightscreem is offline
Xum
Member
Join Date: Jun 2006
Old 06-30-2006 , 20:10   Re: load data problem i tried many things
Reply With Quote #2

I don't think it's a problem of loading/saving xp. The problem is on public DeathMsg, because you will won't get xp if you make frags.

SixTwins fixed my plugin, take a look. Bellow is the sourcecode.
Code:
http://forums.alliedmods.net/attachment.php?attachmentid=8612&d=1151697545
Xum is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 07-01-2006 , 07:56   Re: load data problem i tried many things
Reply With Quote #3

nope I get 25xp each kill
when i kill someone so that's not the problem
saving works great but loading won't work
__________________
- Bye bye!
nightscreem is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-01-2006 , 11:32   Re: load data problem i tried many things
Reply With Quote #4

Quote:
Originally Posted by nightscreem
nope I get 25xp each kill
when i kill someone so that's not the problem
saving works great but loading won't work
Don't call it on client_authorized, I've had problems with that before even though that's supposed to be when they get their authid. Use client_putinserver.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 07:57.


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