Raised This Month: $ Target: $400
 0% 

mho_mod [status: beta testing]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mateo10
Veteran Member
Join Date: Jan 2006
Old 02-21-2007 , 08:58   Re: mho_mod needs help
Reply With Quote #1

I changed a few things with the plugin.
Test this:
Attached Files
File Type: sma Get Plugin or Get Source (mhomod.sma - 765 views - 34.0 KB)
mateo10 is offline
gzus
Member
Join Date: Jan 2007
Old 02-21-2007 , 10:26   Re: mho_mod needs help
Reply With Quote #2

i got the majority of the problems fixed, however i am no good with menus man.. i dont know what it is, i jus mess up every menu i touch.. i had thought it was the race menu itself that was causing the problems with not registering their race/and causing some fault in the loading of the users xp.. after re-doing my loadxp function, i found that was my problem..

i had a bunch of if statements asking what the lastchosen race was, then attemtping to load the xp of the last race, if there was no previous xp, the race woul dbe reset to 0, with 0 lvl and xp. this cleared that up:

Code:
//------------------------------------------------------------------------------------------- public LoadXP(id)     {         new szName[32], szAuthId[32]         get_user_name(id, szName, 31)         get_user_authid(id, szAuthId, 31)         new authid[32];         get_user_authid(id,authid,31);                 new vaultkey[64], vaultdata[64];                 format(vaultkey,63,"RACE-%s-last_chosen",authid);         get_vaultdata(vaultkey,vaultdata,63);         PlayerLastClass[id] = str_to_num(vaultdata);         server_print("--MHO MOD-- [Last Selected] - %i: %s AuthId: %s", PlayerLastClass[id], CLASSES[PlayerLastClass[id]], szName, szAuthId)                 if (PlayerLastClass[id] == 0){             PlayerClass[id] = CLASS_NOTHING         }                 if (PlayerLastClass[id] == 1){             PlayerClass[id] = CLASS_MUTANT;         }                 if (PlayerLastClass[id] == 2){             PlayerClass[id] = CLASS_ALIEN;         }                 if (PlayerLastClass[id] == 3){             PlayerClass[id] = CLASS_PREDATOR;         }                 if (PlayerLastClass[id] == 4){             PlayerClass[id] = CLASS_MACHINE;         }                 //format(vaultkey,63,"RACE-%s-class_%s",authid, CLASSES[PlayerClass[id]]);         //get_vaultdata(vaultkey,vaultdata,63);         //PlayerClass[id] = str_to_num(vaultdata);                     format(vaultkey,63,"RACE-%s-xp_%s",authid, CLASSES[PlayerClass[id]]);         get_vaultdata(vaultkey,vaultdata,63);         PlayerXP[id] = str_to_num(vaultdata);                       format(vaultkey,63,"RACE-%s-level_%s",authid, CLASSES[PlayerClass[id]]);         get_vaultdata(vaultkey,vaultdata,63);         PlayerLevel[id] = str_to_num(vaultdata);         server_print("--MHO MOD-- [Loaded %s XP] - %s AuthId: %s", CLASSES[PlayerClass[id]], szName, szAuthId)                                     return PLUGIN_HANDLED } //------------------------------------------------------------------------------------------- public SaveXP(id)     {     new szName[32], szAuthId[32]     get_user_name(id, szName, 31)     get_user_authid(id, szAuthId, 31)     new authid[32];     get_user_authid(id,authid,31);     new vaultkey[64], vaultdata[64];         //format(vaultkey,63,"RACE-%s-class_%s",authid, CLASSES[PlayerClass[id]]);     //format(vaultdata,63,"%d",PlayerClass[id]);     //set_vaultdata(vaultkey,vaultdata);     //PlayerClass[id] = str_to_num(vaultdata);                 format(vaultkey,63,"RACE-%s-xp_%s",authid, CLASSES[PlayerLastClass[id]]);     format(vaultdata,63,"%d",PlayerXP[id]);     set_vaultdata(vaultkey,vaultdata);     //PlayerXP[id] = str_to_num(vaultdata);                   format(vaultkey,63,"RACE-%s-level_%s",authid, CLASSES[PlayerLastClass[id]]);     format(vaultdata,63,"%d",PlayerLevel[id]);       set_vaultdata(vaultkey,vaultdata);     PlayerLevel[id] = str_to_num(vaultdata);     //server_print("--MHO MOD-- [Saved %s XP] - %s AuthId: %s", CLASSES[PlayerClass[id]], szName, szAuthId) } //-------------------------------------------------------------------------------------------

that cleared a number of lines off, and helped organize things a little more cleanly, but that still doesnt help with the ghetto shop-menu.. throught out today. ill be creating a new menu for the shop.. i did learn how to charge users money and all that, so i think it should be fairly easy.. but then again, menus dislike me.. [shrugs] hopefully by friday i'll have a copy ready for review so everyone can flame me for trying to release a plugin heh

thanks for the reply guys
__________________
71.200.20.142:27017 - testing mho mod
if you need any files visit clan.mosthatedonline.com
gzus 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:45.


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