AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with levels (XP) (https://forums.alliedmods.net/showthread.php?t=93090)

alan_el_more 05-24-2009 09:03

Help with levels (XP)
 
Hi, i have this:

PHP Code:

new g_ammopacks[33]
new 
g_playerlevel[33]

new const 
LEVELS[10] = {
    
1,
    
25,
    
50,
    
125,
    
300,
    
675,
    
1400,
    
3000,
    
6200,
    
12500
}

public 
client_putinserver(id)
{
    if(
g_playerlevel[id] == 10)
        return;
            
    if(
g_ammopacks[id] >= LEVELS[g_playerlevel[id]])
        
// ????


I want to set the level automatically but do not know how

thanks in advance

Bugsy 05-24-2009 09:38

Re: Help with levels (XP)
 
What defines a players level? g_ammopacks[id] will hold 0 when a client first connects (unless you previously set it to a value).

alan_el_more 05-24-2009 09:44

Re: Help with levels (XP)
 
Quote:

Originally Posted by Bugsy (Post 833635)
What defines a players level? g_ammopacks[id] will hold 0 when a client first connects (unless you previously set it to a value).

save the ammo packs with fvault

Bugsy 05-24-2009 10:03

Re: Help with levels (XP)
 
Once you get that done, I can show you how to set level based on that.


All times are GMT -4. The time now is 01:29.

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