Raised This Month: $ Target: $400
 0% 

[Duda] Levels


  
 
 
Thread Tools Display Modes
Author Message
lRodri.
Member
Join Date: Apr 2012
Location: Argentina
Old 07-10-2012 , 14:33   [Duda] Levels
#1

Necesito ver, que con este XP Mode, podes ponerle que cuando tenes el Level 1, tenes 250 de Speed, 100 de armor, etc.

Cuando tenes Level 2, tenes una AP, tenes gravity, etc.

Acá les dejo el Code del XP Mod:

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <fun> 

new g_PlayerXP[33]; 
new 
g_PlayerLevel[33];   

#define NUM_OF_LEVELS 6 

new const LEVELS[NUM_OF_LEVELS] = { 
    
100,  
    
200,  
    
400,  
    
800
    
1600
    
3200 
}   

new 
gmsgStatusText;  

public 
plugin_init() 

    
register_plugin("exp""1.0""Creditos a XunTric por el tutorial"
     
    
register_cvar("sv_exp""1")  
     
    
register_event("DeathMsg""DeathMsg""a"
     
    
register_cvar("XP_per_kill""20")  
     
    
register_event("ResetHUD""ResetHud""b"
     
    
gmsgStatusText get_user_msgid("StatusText"


public 
DeathMsg() 

    if (!
get_cvar_num("sv_exp"))  
         return; 
     
    new 
attacker read_data(1
    
    if(
g_PlayerLevel[attacker] == NUM_OF_LEVELS
         return; 
     
    
g_PlayerXP[attacker] += get_cvar_num("XP_per_kill"
     
    if(
g_PlayerXP[attacker] >= LEVELS[g_PlayerLevel[attacker]]) 
    { 
        ++
g_PlayerLevel[attacker]; 
          
        
client_print(attacker_:print_chat"Ahora estas en el nivel %i!"g_PlayerLevel[attacker]) 
    } 
    
ShowHUD(attacker); 
}     

ShowHUD(id)     

    new 
HUD[51
    
format(HUD50"[%s]Level: %i XP: %i"g_PlayerLevel[id], g_PlayerXP[id]) 

    
message_begin(MSG_ONEgmsgStatusText, {0,0,0}, id
    
write_byte(0
    
write_string(HUD
    
message_end() 
}   

public 
client_connect(id

    
g_PlayerXP[id] = 0
    
g_PlayerLevel[id] = 0

Necesito que me den un ejemplo, lo demas lo hago yo
lRodri. is offline
Send a message via MSN to lRodri.
 



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 06:41.


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