Raised This Month: $ Target: $400
 0% 

Jumpcounter Level


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-28-2010 , 11:15   Re: Jumpcounter Level
Reply With Quote #2

See this plugin for an example: http://forums.alliedmods.net/showpos...3&postcount=13

Here's a little example that may be easier than looking through the source above. I would add a RANK item to your enum so you can store his current rank in the existing global array. I don't know if you want to have a separate rank for each type of jump or just one based on all jumps. This is an example just for JUMP count.

PHP Code:
enum _:CountTypes
{
    
JUMP,
    
DUCK,
    
DUCKJUMP,
    
JUMPRANK
};

new const 
JumpLevels[][] = 
{
    { 
300 },
    { 
301 600 }
};
new const 
JumpLevelDesc[][] = 
{
    
"Noob",
    
"Chief"
}; 
Then to assign a level.

PHP Code:
for ( new sizeofJumpLevels ) ; i++ )
{
     if ( 
JumpLevels][ ] <= g_iCounteriClient ][ JUMP ] <= JumpLevels][ ] )
     {
           
g_iCounteriClient ][ JUMPRANK ] = i;
           break;
     }
}

client_printprint_chat "My rank is %s" JumpLevelDescg_iCounteriClient ][ JUMPRANK ] ] ); 
__________________

Last edited by Bugsy; 03-28-2010 at 11:20.
Bugsy is offline
 



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 11:12.


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