Raised This Month: $ Target: $400
 0% 

Gain Level Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 11-06-2005 , 14:02  
Reply With Quote #1

Here's I did it in my Ninja Mod.

Code:
#define CLASS_NOTHING 0 #define CLASS_TANK 1 #define CLASS_SWIFT 2 #define CLASS_SHADOW 3 #define CLASS_HEALER 4 #define CLASS_SHINOBI 5 #define MAXCLASSES 6

Code:
new PlayerClass[33] new PlayerXP[33] new PlayerLevel[33] new const CLASSES[MAXCLASSES][] = {     "None",     "Tank",     "Swift",     "Shadow",     "Healer",     "Shinobi" } new msgtext new const LEVELS[10] = {     100,       200,       400,       800,     1600,     3200,     6400,     12800,     25600,     51200 }

Code:
    register_event("ResetHUD","newround","b")

Code:
public newround(id)     {     new attacker = read_data(1)     ShowHUD(attacker)         if(get_cvar_num("amx_ninjaon") == 0)         {         return PLUGIN_HANDLED     }         //Strong Class     if(PlayerLevel[id] == 1 && PlayerClass[id] == CLASS_STRONG)         {                 set_user_health (id,125)         cs_set_user_armor(id,20,CS_ARMOR_KEVLAR)                 return PLUGIN_CONTINUE     }     if(PlayerLevel[id] == 2 && PlayerClass[id] == CLASS_STRONG)         {                 set_user_health (id,150)         cs_set_user_armor(id,40,CS_ARMOR_KEVLAR)                 return PLUGIN_CONTINUE         }                 //Etc.     return PLUGIN_CONTINUE }

It's REAL cumbersome that way, once you get over like 10 levels. Which is why I'm switching to an upgrde menu.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
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:02.


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