Raised This Month: $ Target: $400
 0% 

nVault won save, Please help :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JProReTaRD
Member
Join Date: May 2009
Location: Denmark, KBH
Old 05-14-2009 , 16:10   Re: nVault won save, Please help :)
Reply With Quote #1

FOUND THE ERROR!
Modules.ini - commented nVault
JProReTaRD is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-15-2009 , 00:48   Re: nVault won save, Please help :)
Reply With Quote #2

Quote:
Originally Posted by JProReTaRD View Post
FOUND THE ERROR!
Modules.ini - commented nVault
Strange if that helps (if you have AMXX 1.8.1) because modules autoload.
__________________
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-14-2009 , 19:40   Re: nVault won save, Please help :)
Reply With Quote #3

Quote:
Originally Posted by JProReTaRD View Post
Why do you write iXP[id] when I already have PlayerXP[id] ?
I feel very stupid atm
I was just using example variables not what you would actually use.

Quote:
Originally Posted by JProReTaRD View Post
And if you do this:
Key=STEAM_0:0:12345
Data=90:1:1 [I][XP, level, class]

Then it can't save xp to one class then another, right?
Right, one player would only be able to have one class at a time.

Quote:
Originally Posted by JProReTaRD View Post
I would think more like:

Key=STEAM_0:0:12345-Class1
Data=90:1:1
Key=STEAM_0:0:12345-Class2
Data=90:1:1

I can see the 0 problem, but it will not loadXP() until a class is picked and then the PlayerClass[id] won't be 0 - Right?
You are calling LoadXP() at client_connect().

PHP Code:
public client_connect(id)
{
    
//Only load their XP if our SaveXP cvar is 1.
    
if(get_cvar_num("SaveXP") == 1) {
       
         
LoadXP(id);

         
//Add a message if you want....
         
client_print(idprint_chat"[HNS XP Mod] XP Loaded!");
         
client_print(idprint_chat"[HNS XP Mod] You are a %s with level %s and %s XP"PlayerClass[id], PlayerLevel[id], PlayerXP[id]);
    }

Did you get everything working?
__________________

Last edited by Bugsy; 05-14-2009 at 19:42.
Bugsy is offline
JProReTaRD
Member
Join Date: May 2009
Location: Denmark, KBH
Old 05-15-2009 , 06:00   Re: nVault won save, Please help :)
Reply With Quote #4

Quote:
Originally Posted by Bugsy View Post
You are calling LoadXP() at client_connect().

PHP Code:
public client_connect(id)
{
    
//Only load their XP if our SaveXP cvar is 1.
    
if(get_cvar_num("SaveXP") == 1) {
       
         
LoadXP(id);

         
//Add a message if you want....
         
client_print(idprint_chat"[HNS XP Mod] XP Loaded!");
         
client_print(idprint_chat"[HNS XP Mod] You are a %s with level %s and %s XP"PlayerClass[id], PlayerLevel[id], PlayerXP[id]);
    }

I see - Then I'll just remove that..

Yes - I is working now - and I did it my way with a save string for each class

Than you for the help


Regards
ReTaRD
JProReTaRD is offline
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 01:35.


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