View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-14-2014 , 08:46   Re: Simple Exp Level Mod
Reply With Quote #7

PHP Code:
0,
    
25,
    
50,
    
75,
    
100,
    
125,
    
150,
    
175,
    
200,
    
235,
    
270,
    
310,
    
350,
    
375,
    
400,
    
425,
    
450,
    
485,
    
520,
    
555,
    
600 
I think that you used some tuts for making this. Anyway it's wrong to start for 0. 0 mean that you need 0 xp for first level. Simply remove it, player will anyway start from level 0 and 0 xp.

PHP Code:
format(vaultdata255"%i#%i#%i#"gExp[id], gLvl[id], gSpecs[id]) 
# is not needed, you can simply put a space like: "%i %i %i ".
PHP Code:
    format(vaultdata255"%i#%i#%i#"gExp[id], gLvl[id], gSpecs[id]) 
Same here.

If you do this, you no more need to replace #, so remove
PHP Code:
    replace_all(vaultdata255"#"" "

PHP Code:
gExp[iAtkr] += get_pcvar_num(gCvarKill)
        
        if(
read_data(3))
        {
            
gExp[iAtkr] += get_pcvar_num(gCvarHs)
        } 
This won't work correctly. If you make a head shot you will receive xp for normal kill and xp for hs kill. I think that it should be like this: make a normal kill, receive xp for normal kill ,make a hs, receive xp for a hs.

->

PHP Code:
    if(read_data(3))
    {
        
gExp[iAtkr] += get_pcvar_num(gCvarHs)
    }
    else 
gExp[iAtkr] += get_pcvar_num(gCvarKill
What are you doing in TwinEvent is silly, use get_player and loop all players. Also get_players can get players matching with passed team. Same in CwinEvent.

In HamSpawnEvent(id) you have to check if player is alive.
HamletEagle is offline