Raised This Month: $ Target: $400
 0% 

XP Mod, setting lvls, exp, saving


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
katna
Senior Member
Join Date: May 2010
Old 08-06-2010 , 15:01   Re: XP Mod, setting lvls, exp, saving
Reply With Quote #1

the way you made it is that every id has this
PHP Code:
pInfo[id][Dog][Level]
pInfo[id][Dog][Exp]

pInfo[id][Bear][Level]
pInfo[id][Bear][Exp]

pInfo[id][Cat][Level]
pInfo[id][Cat][Exp
which is wrong cause you want to save the Class, Level, Xp ( Not xp and level for every class)
you should do this
PHP Code:
enum Class 

    
Dog 0
    
Bear
    
Cat 
}
enum Data 

    
Classes
    
Level
    
EXP
}

pInfo[33][Data
and then if you want to change a value
PHP Code:
pInfo[id][Classes] = Class:Dog// changing is class to a dog

pInfo[id][Level] = 100 // Making is level 100

pInfo[id][Exp] = 300 // Making is exp 300 

Last edited by katna; 08-06-2010 at 15:04.
katna 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 00:06.


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