Raised This Month: $51 Target: $400
 12% 

Subplugin Submission [ZP] Server Addon: LevelUp System XP 3.2 Stable


Post New Thread Reply   
 
Thread Tools Display Modes
F0RCE
Senior Member
Join Date: Oct 2010
Old 11-05-2010 , 14:40   Re: [ZP] Server Addon: LevelUp System XP 3.1 || NEW VERSION 3.1 Update || Fixed Error
Reply With Quote #41

Quote:
Originally Posted by georgik57 View Post
too bad leveling for zombie mod sucks so hard
not really it's great idea.

// I'm currently waiting for 3.2 version :]
F0RCE is offline
gulverene
Senior Member
Join Date: Nov 2008
Location: Türkiye
Old 11-11-2010 , 15:50   Re: [ZP] Server Addon: LevelUp System XP 3.1 || NEW VERSION 3.1 Update || Fixed Error
Reply With Quote #42

Sorry, I lost the player levels. What is the reason.

[AMXX] Run time error 4 (plugin "zp_level_system_xp3.1.amxx") - debug not enabled!

plugin works but. Help me!
gulverene is offline
Send a message via Skype™ to gulverene
makiza
BANNED
Join Date: Mar 2009
Old 11-11-2010 , 17:50   Re: [ZP] Server Addon: LevelUp System XP 3.1 || NEW VERSION 3.1 Update || Fixed Error
Reply With Quote #43

Quote:
Originally Posted by gulverene View Post
Sorry, I lost the player levels. What is the reason.

[AMXX] Run time error 4 (plugin "zp_level_system_xp3.1.amxx") - debug not enabled!

plugin works but. Help me!
add debug
makiza is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 11-11-2010 , 23:16   Re: [ZP] Server Addon: LevelUp System XP 3.1 || NEW VERSION 3.1 Update || Fixed Error
Reply With Quote #44

nice plugin,thank you!
Jacob is offline
DjReactive
Member
Join Date: Sep 2010
Location: Russia
Old 11-12-2010 , 08:28   Re: [ZP] Server Addon: LevelUp System XP 3.3 [UPDATE] || Fixed Version
Reply With Quote #45

Has added the new version 3.3! If there are errors, inform please.
__________________
28 Weeks Later | Zombie Plague
IP: 217.199.213.9:27049

DjReactive is offline
Send a message via ICQ to DjReactive
gulverene
Senior Member
Join Date: Nov 2008
Location: Türkiye
Old 11-12-2010 , 13:53   Re: [ZP] Server Addon: LevelUp System XP 3.1 || NEW VERSION 3.1 Update || Fixed Error
Reply With Quote #46

Quote:
Originally Posted by makiza View Post
add debug
0 - 20:21:44: [AMXX] Displaying debug trace (plugin "zp_level_system_xp3.1.amxx")
20:23:25 L 11/12/2010 - 20:21:44: [AMXX] Run time error 4: index out of bounds
20:23:25 L 11/12/2010 - 20:21:44: [AMXX] [0] zp_level_system_xp3.1.sma::zp_round_ended (line 492)

wonder if the problem is over?

bad english
gulverene is offline
Send a message via Skype™ to gulverene
Vechta
Veteran Member
Join Date: Jun 2010
Old 11-12-2010 , 14:04   Re: [ZP] Server Addon: LevelUp System XP 3.3 [UPDATE] || Fixed Version
Reply With Quote #47

Try this

PHP Code:
/*================================================================================

    -------------------------------------------
    -*- [ZP] Server Addon: LevelUp System XP 3.3 || New Version-*-
    -------------------------------------------

    ~~~~~~~~~~~~~~~
    - Description -
    ~~~~~~~~~~~~~~~
    Level System

    ~~~~~~~~~~~~~~~
    - Changelog -
    ~~~~~~~~~~~~~~~
    v. 1.0 - Plugin Released. Testing...
    v. 1.1 - Fixed Save Level.
    v. 1.2 - Added New cvars, fixed codes + Added plugin code Player Name
    v. 1.3 - Update version: added new cvars + system bonuses
    v. 1.4 - New modes for nemesis level & survivor level, added cvars
    v. 1.5 - Testing...
    v. 1.6 - Added cvars, Plugin Released.
    v. 1.7 - Added Multilangual, Update plugin
    v. 1.8 - v. 1.9 - Fixed Level Up bugs
    v. 2.0 - Added new cvars + XP Level Extended: Real Level System.
    v. 2.1 - Fixed bugs.
    --
    v. 2.8 - It is globally altered on a new kind of the version of this plugin
    v. 2.9 - Added New cvars. Ful fixed.
    v. 3.0 - XP Mode Updated in EXP to level.
    v. 3.1 - Fixed Bug Shutting Down Server.
    v. 3.2 - Added Give Level & give exp. Added cvar is Plugin Change Name
    v. 3.3 - Added Level save type. Fixed bugs bonusme. Fixed parametres
================================================================================*/

#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <fakemeta_util>
#include <hamsandwich>
#include <zombieplague>

#define PLUGIN "[ZP] Server Addon: LevelUp System XP 3.3"
#define VERSION "3.3"
#define AUTHOR "Re.Act!ve"

#define ACCES ADMIN_CVAR

new SayText
new g_level[33], g_level_datag_frags_levelg_ScreenFadeg_level_del[33], g_level_bonusg_ammog_save_type
new g_level_maxg_give_ammog_give_ammopacksg_level_numg_level_infog_player_nameg_levels[32], g_h_damage
new g_h_healthg_h_speedg_z_damageh_health[32], h_speed[32], h_damage[32], z_damage[32], level_exp[32], g_change_name
new g_level_exp[32], g_exp_datag_Playersg_hud_colorredgreenbluenameid[32]
new 
bool:g_bonus[32], g_trime[33], g_name[32]

new 
sound_level_up[] = { "misc/zp_level_up.wav"}
new 
sound_health[] = { "items/medshot4.wav" }
// Zombie Classes MUST be registered on plugin_precache

public plugin_precache()
{
        
precache_soundsound_level_up )
        
precache_soundsound_health )
}

public 
plugin_init()
{
    
g_save_type =         register_cvar("zp_level_save""0")            // ??? ??????????: 0 - ?? ????, 1 - ?? IP, 2 - SteamID
    
g_frags_level =     register_cvar("zp_level_frags""20")        // ??????? ????????? ????? ??? ????????? ????. ??????
    
g_level_max  =         register_cvar("zp_level_max""70")            // ???????????? ?????
    
g_give_ammo =         register_cvar("zp_level_give_ammo""1")    // ?????? ???? ???? ??? ?????? ?????????? ??????
    
g_give_ammopacks =     register_cvar("zp_level_ammo""10")        // ??????? ?????? ?????????? (???? ???? ??????????? 1)

    
g_h_damage =         register_cvar("zp_level_h_damage""1")    // ??????????? ? ?????? ??????? ???? ?? ? ? ?????
    
g_h_health =         register_cvar("zp_level_h_health""10")        // ???? ???????? ?? ?????? ????? ?????????????? ? ??
    
g_h_speed =         register_cvar("zp_level_h_speed""1.0")    // ?? ??????? ?????????? ???????? ????? ? ?????? ????????
    
g_z_damage =         register_cvar("zp_level_z_damage""3")    // ??????????? ? ?????? ??????? ???? ?? ? ? ?????

    
g_level_info =         register_cvar("zp_level_info""1")            // ?????????????? ??????, ? ????????????? ??? ??? ???????
    
g_change_name =     register_cvar("zp_level_kick_name""1")    // ?????? ???????, ??????? ???????? ??????? ??? ? ?????
    
g_hud_color =         register_cvar("zp_level_hud_type""1")        // 1 - ??????, 2 - ???????? ?????? ??????? 3 - 1 ??? ????????
    
g_level_info =         register_cvar("zp_level_info""1")            // ?????????? ???? ? ??????, ????? ?? ??????? ? ??? info <nick>
    
g_player_name =     register_cvar("zp_player_name""1")        // ?????????? ????, ??? ????????? ???????? ?? ???????
    
g_level_bonus =     register_cvar("zp_level_bonus_on""1")        // ????? ?? ????? ??????? ?????????? (?? ????????? ???. ?????)
    
g_level_num =         register_cvar("zp_level_number""5")    // ?????? ? ?????? ????? ??????????? ?????  ????????? (???? ???? 1)
    
g_ammo =         register_cvar("zp_level_bonus""100")        // ??????? ???? ????? ???? ??????????

    
g_level_data nvault_open("Leveling_Save")
    
g_exp_data nvault_open("Exp_Save")
    
    
register_clcmd("say","say_info");
    
register_clcmd("say_team","say_info");
    
register_clcmd("zp_levelexp","expa_give"ADMIN_CVAR"use to give Exp")
    
register_clcmd("zp_level_is","level_give"ADMIN_CVAR"use to give Level")
    
    
SayText get_user_msgid("SayText")
    
g_Players get_maxplayers();
    
g_ScreenFade get_user_msgid"ScreenFade" )
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
register_dictionary("zp_level_system_xp.txt")
    
    
register_event("StatusValue","show_status","be","1=2","2!0")
           
register_event("StatusValue","hide_status","be","1=1","2=0")
    
register_event("HLTV""Round_Start""a""1=0""2=0")
    
register_event("DeathMsg""Frags_Manager""a""1>0")     
    
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
Round_Start()
{
    for(new 
id=1;id<=g_Players;id++)
    {
        if(!
is_user_bot(id))
        
set_task(3.0"Level"id)
    }
}

public 
Level(id)
{
    if( !
zp_get_user_zombie(id) && is_user_alive(id) )
    {
        
g_trime[id] = false;
        new 
1;
        while( 
g_level[id] )
        {
            
h_health[id] = get_pcvar_num(g_h_health);
            
h_speed[id] = get_pcvar_num(g_h_speed);
            
h_damage[id] = get_pcvar_num(g_h_damage);
            
z_damage[id] = get_pcvar_num(g_z_damage);
            
1
        
}
        new 
Float:speed[32];
        
speed[id] = fm_get_user_maxspeed(id) + h_speed[id];
        
fm_set_user_healthidget_user_health(id) + h_health[id] )
        
set_pev(idpev_maxspeedspeed[id] )
        
emit_sound(idCHAN_STREAMsound_health1.0ATTN_NORM0PITCH_HIGH )
    }
}

public 
expa_give(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
    {                
        
console_print(id"? ??? ??? ??????? ? ???????")
        return 
PLUGIN_HANDLED
    
}
    new 
target[32]
    new 
count[32]    
    
    
read_argv(1,target,31)
    
read_argv(2,count,31)
    new 
target_idname[32], nameid[32]
    
target_id find_player("bl"target)
    
get_user_name(target_idnamesizeof name 1
    
get_user_name(idnameidsizeof nameid 1)
    if(!
target_id
    {
        
console_print(id"Can't find that player")
        return 
PLUGIN_HANDLED
    
}
    if(
read_argc() != 3)
    return 
PLUGIN_HANDLED    

    
if(str_to_num(count) < (g_level_exp[target_id] - level_exp[target_id]) )
    {
        if(
str_to_num(count) == 0)
        
console_print(id"Exp Player %s in %i / %i"namelevel_exp[target_id], g_level_exp[target_id])
        else
        {
            
console_print(id"Player %s gives for %i exp, Her Maximum %i"namestr_to_num(count), g_level_exp[target_id])
            
level_exp[target_id] = level_exp[target_id] + str_to_num(count);
        }
        
    }
    else
    {
        
console_print(id"Maximum Exp in player %i"g_level_exp[target_id])
    }
    return 
PLUGIN_HANDLED
}

public 
level_give(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
    {                
        
console_print(id"? ??? ??? ??????? ? ???????")
        return 
PLUGIN_HANDLED
    
}
    new 
target[32]
    new 
count[32]    
    
    
read_argv(1,target,31)
    
read_argv(2,count,31)
    new 
target_idname[32], level_id
    level_id 
str_to_num(count);
    
target_id find_player("bl"target)
    
get_user_name(target_idnamesizeof name 1
    if(!
target_id
    {
        
console_print(id"Can't find that player")
        return 
PLUGIN_HANDLED
    
}
    if(
read_argc() != 3)
    return 
PLUGIN_HANDLED    

    
if( ((g_level[target_id] + level_id) <=get_pcvar_num(g_level_max)) && (level_id != 0) && ((g_level[target_id] + level_id) > ) )
    {
        if(
level_id 0)
        {
            
g_level[target_id] = g_level[target_id] + level_id;
            
level_exp[target_id] = 0;
            
message_begin(MSG_ONE_UNRELIABLEg_ScreenFade_target_id)
                   
write_short(1<<12// duration
                
write_short(1// hold time
            
write_short(0x0000// fade type
            
write_byte(1// red
            
write_byte(200// green
            
write_byte(0// blue
            
write_byte(205// alpha
            
message_end()
            
emit_sound(target_idCHAN_STREAMsound_level_up1.0ATTN_NORM0PITCH_HIGH )
        }
        else
        {
            
g_level[target_id] = g_level[target_id] + level_id;
            
level_exp[target_id] = 0;
            
message_begin(MSG_ONE_UNRELIABLEg_ScreenFade_target_id)
                   
write_short(1<<12// duration
            
write_short(1// hold time
            
write_short(0x0000// fade type
            
write_byte(200// red
            
write_byte(40// green
            
write_byte(0// blue
            
write_byte(205// alpha
            
message_end()
        }
        
console_print(id"Player %s gives add %i level"namelevel_id)
    }
    else
        
console_print(id"Operation Invalid")
    return 
PLUGIN_HANDLED
}

public 
Level_System(id)
{
           
set_hudmessage(2552000,0.5,0.400.013.00.010.014)
           
show_hudmessage(id,"%L"LANG_PLAYER"LEVEL_WELCOME")
}

public 
client_putinserver(id)
{
    if(!
is_user_bot(id) )
    {    
        
Level_Load(id)
        if(
get_pcvar_num(g_level_info) == 1)
        
set_task(4.0"Level_System"id)
        
        
g_trime[id] = false;
        
g_bonus[id] = true;
        
        new 
name[32], 1;
        
g_name[id] = true;
        
nameid[id] = get_user_name(idnamesizeof name 1)
        
set_task(1.0"change_nick"id,_,_"b")
        
        while( 
!= g_level[id] )
        {
            
h_health[id] = get_pcvar_num(g_h_health);
            
h_speed[id] = get_pcvar_num(g_h_speed);
            
h_damage[id] = get_pcvar_num(g_h_damage);
            
z_damage[id] = get_pcvar_num(g_z_damage);
            
1;
        }
        
        if( !
zp_get_user_zombie(id) && is_user_alive(id) )
        {
            
g_trime[id] = false;
            new 
Float:speed[32];
            
speed[id] = fm_get_user_maxspeed(id) + h_speed[id];
            
fm_set_user_healthidget_user_health(id) + h_health[id] )
            
set_pev(idpev_maxspeedspeed[id] )
            
emit_sound(idCHAN_STREAMsound_health1.0ATTN_NORM0PITCH_HIGH )
        }
    
        if( 
g_level[id] == 0g_level[id] = 1;
        if( 
level_exp[id] == g_level[id] ) level_exp[id] = 0;
        if(
g_level[id] < get_pcvar_num(g_level_num))
        
g_levels[id] = get_pcvar_num(g_level_num)
        else
        {
            new 
1;
            while( 
g_level[id] > ( get_pcvar_num(g_level_num)) )
            {
                
1;
                
g_levels[id] = get_pcvar_num(g_level_num);
            }
        }
        
        new 
1;
        while( 
g_level[id] != )
        {
            
1;
            
g_level_exp[id] = get_pcvar_num(g_frags_level);
        }
    }
    
red random_num(10200)
    
green random_num(10200)
    
blue random_num(10200)
}

public 
client_disconnect(id)
{
    new 
name[32], player_nick[32]
    
player_nick[id] = get_user_name(idnamesizeof name 1)
    if((
player_nick[id] == nameid[id]))
    
Level_Save(id)
    
    
g_trime[id] = false;
    
g_name[id] = false;
}

public 
change_nick(id)
{
    new 
name[32], player_nick[32]
    
player_nick[id] = get_user_name(idnamesizeof name 1)
    
    if((
player_nick[id] != nameid[id]) && g_name[id] && (get_pcvar_num(g_change_name) == 1))
    {
        
server_cmd("kick ^"%s^" ^"?? ??????? ?? ??????? ????? ????.^""name)
        
ChatColor(0"!g[KICKED] !y%s ????????? ??????? ???, ?? ??? ??? ??????."name )
        
remove_task(id)
    }
}

public 
hide_status(id)
{
        
set_hudmessage(0,0,0,0.0,0.0,00.00.010.00.04)
        
show_hudmessage(id,"")
}

public 
show_status(id)
{
        new 
name[32],pid read_data(2)
        
get_user_name(pid,name,31)
    
       if (!
zp_get_user_zombie(pid) && !zp_get_user_zombie(id) && (get_pcvar_num(g_player_name) == 1) )
    {
               
set_hudmessage(0,0,255,-1.0,0.60,10.013.00.010.014)
               
show_hudmessage(id,"%L"LANG_PLAYER"PLAYER_NAME_H"nameg_level[pid],                                 get_user_health(pid),get_user_armor(pid),zp_get_user_ammo_packs(pid))
    }
    else if(
zp_get_user_zombie(id) && zp_get_user_zombie(pid) && (get_pcvar_num(g_player_name) == 1) )
    {
        
set_hudmessage(255,0,0,-1.0,0.60,10.013.00.010.014)
        
show_hudmessage(id,"%L"LANG_PLAYER"PLAYER_NAME_Z"nameg_level[pid], get_user_health(pid), zp_get_user_ammo_packs(pid))
    }
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_bits)
{
    if ( !
zp_get_user_zombie(attacker) && is_user_alive(attacker) )
        
SetHamParamFloat(4damage h_damage[attacker])
    else
    {
        if ( 
zp_get_user_zombie(attacker) && is_user_alive(attacker) && !zp_get_user_nemesis(attacker))
        
SetHamParamFloat(4damage z_damage[attacker]);
    }
}

public 
say_info(id)
{
    new 
text[70], arg1[32], target[32], count[32]
    
read_args(textsizeof(text)-1);
    
remove_quotes(text);
    
    
arg1[0] = '^0';
    
target[0] = '^0';
    
count[0] = '^0';
    
parse(textarg1sizeof(arg1)-1targetsizeof(target)-1countsizeof(count)-1);
    
    if ( 
equali(arg1"info"4) )
    {
        
info_player(idtarget);
    }
    else if ( 
equali(arg1"bonusme"7) && (get_pcvar_num(g_level_info) == 1))
    {
        
bonus_player(id);
    }
    else if ( 
equali(arg1"levelexp"7) && (get_pcvar_num(g_level_info) == 1))
    {
        
expa_player(id);
    }
    return 
PLUGIN_CONTINUE;
}

public 
zp_user_infected_pre(idinfector)
{
    if( 
is_user_alive(infector) && (level_exp[infector] < (g_level_exp[infector] - 1)) && zp_get_user_zombie(infector))
    {
        
level_exp[infector] = level_exp[infector] + 1;
        
Level_Save(infector);
    }
    else
        if (
zp_get_user_zombie(infector))
            
ChatColor(infector"!g[ZP] !y Killed Zombie")
}

public 
info_player(idtarget[])
{
    new 
target_2;
    
target_2 find_player("bl"target)
    static 
name[32], nameid[32];
    
    
get_user_name(target_2namesizeof name 1)
    
get_user_name(idnameidsizeof nameid 1)
    
    if(!
target_2)
    {
        
ChatColor(id"!g[ZP] !y%L"LANG_PLAYER"LEVEL_INFO_NONAME")
        return 
PLUGIN_HANDLED
    
}

    if(
zp_get_user_zombie(id))
    {
        if(
id != target_2)
        {
            
ChatColor(id"!g[INFO]!t %L"LANG_PLAYER"LEVEL_INFOZM"nameg_level[target_2], z_damage[target_2], zp_get_user_ammo_packs(target_2) )
            
ChatColor(target_2"!g[INFO]!t%L "LANG_PLAYER"LEVEL_INFO_YOU"nameid)
        }
        else
        {
            
ChatColor(id"!g[INFOME]!t%L"LANG_PLAYER"LEVEL_INFOME_ZM"z_damage[target_2] )
        }
    }
    else
    {
        if(
id != target_2)
        {
            
ChatColor(id"!g[INFO]!t %L"LANG_PLAYER"LEVEL_INFO"nameg_level[target_2], h_damage[target_2],                             h_speed[target_2], h_health[target_2], zp_get_user_ammo_packs(target_2) )
            
ChatColor(target_2"!g[INFO]!t%L "LANG_PLAYER"LEVEL_INFO_YOU"nameid)
        }
        else
        {
            
ChatColor(id"!g[INFOME]!t%L"LANG_PLAYER"LEVEL_INFOME"h_damage[target_2], h_speed[target_2],                             h_health[target_2] )
        }
    }
    return 
PLUGIN_HANDLED
}

public 
bonus_player(id)
{
    if( (
g_level[id] >= g_levels[id]) && g_bonus[id] && (get_pcvar_num(g_level_bonus) == 1))
    {
        
g_levels[id] = g_levels[id] * 2;
        
g_level_del[id] = g_level[id];
        
g_bonus[id] = false;
        
        
ChatColor(id"!g[BONUS]%L"LANG_PLAYER"LEVEL_MEGABONUS"g_level[id], get_pcvar_num(g_ammo) )
        
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + get_pcvar_num(g_ammo) )
        
Level_Save(id)
    }
    else
    {
        if(
g_level[id] < g_levels[id])
        {
            new 
1;
            
            while( 
g_level[id] > ( get_pcvar_num(g_level_num)) )
            {
                
g_levels[id] = get_pcvar_num(g_level_num);
                
1;
            }
            
ChatColor(id"!g[BONUS]!y%L"LANG_PLAYER"LEVEL_NOMEGABONUS"g_levels[id], get_pcvar_num(g_ammo) )
        }
        
Level_Save(id)
    }
    return 
PLUGIN_HANDLED
}

public 
expa_player(id)
{
    
ChatColor(id"!g[EXPA] !y%L"LANG_PLAYER"LEVEL_EXP"level_exp[id], g_level_exp[id])
    return 
PLUGIN_HANDLED
}

public 
level_status(id)
{
    if( 
is_user_alive(id))
    {
        switch( 
get_pcvar_num(g_hud_color) ) 
            { 
                    case 
1
                    { 
                
set_hudmessage(25520030.020.8701.01.10.00.0, -1)
                
show_hudmessage(id,"%L"LANG_PLAYER"LEVEL_STATUS"g_level[id], level_exp[id])
                    } 
                    case 
2
            {
                static 
rgbrandom_num(10200), random_num(0200), random_num(0200);
                
set_hudmessage(rgb0.020.8701.01.10.00.0, -1)
                
show_hudmessage(id,"%L"LANG_PLAYER"LEVEL_STATUS"g_level[id], level_exp[id])
            }
                    case 
3
            {
                
set_hudmessage(redgreenblue0.020.8701.01.10.00.0, -1)
                
show_hudmessage(id,"%L"LANG_PLAYER"LEVEL_STATUS"g_level[id], level_exp[id])
            }
        }
    }
}

public 
Level_Save(id)
{
    new 
key[64], data[256], data_exp[256], key_exp[64]

    switch (
get_pcvar_num(g_save_type))
    {
        case 
0:
        {
            new 
name[33];
            
get_user_name(id,name,32)
            
format(key63"%s-/"name)
            
format(key_exp63"%s-/"name)
        }
        case 
1:
        {
            new 
ip[33];
            
get_user_ip(id,ip,32)
            
format(key63"%s-/"ip)
            
format(key_exp63"%s-/"ip)
        }
        case 
2:
        {
            new 
authid[33];
            
get_user_authid(id,authid,32)
            
format(key63"%s-/"authid)
            
format(key_exp63"%s-/"authid)
        }
    }
    
format(data255"%i#"g_level[id])
    
format(data_exp255"%i#"level_exp[id])

    
nvault_set(g_level_datakeydata)
    
nvault_set(g_exp_datakey_expdata_exp)
    return 
PLUGIN_CONTINUE;
}

public 
Level_Load(id)
{
    new 
key[64], data[256], data_exp[256], key_exp[64]
    
    switch ( 
get_pcvar_num(g_save_type) )
    {
        case 
0:
        {
            new 
name[33];
            
get_user_name(id,name,32)
            
format(key63"%s-/"name)
            
format(key_exp63"%s-/"name)
        }
        case 
1:
        {
            new 
ip[33];
            
get_user_ip(id,ip,32)
            
format(key63"%s-/"ip)
            
format(key_exp63"%s-/"ip)
        }
        case 
2:
        {
            new 
authid[33];
            
get_user_authid(id,authid,32)
            
format(key63"%s-/"authid)
            
format(key_exp63"%s-/"authid)
        }
    }

    
format(data255"%i#"g_level[id])
    
format(data_exp255"%i#"level_exp[id])

    
nvault_get(g_level_datakeydata255)
    
nvault_get(g_exp_datakey_expdata_exp255)
    
replace_all(data255"#"" ")
    
replace_all(data_exp255"#"" ")

    new 
givelevel[32], give_exp[32]
    
parse(datagivelevel31)
    
parse(data_expgive_exp31)
    
g_level[id] = str_to_num(givelevel)
    
level_exp[id] = str_to_num(give_exp)

    
set_task(1.0"level_status"id__"b")
    return 
PLUGIN_CONTINUE;
}

public 
Frags_Manager()
{
    new 
aname[32], attackerattacker read_data(1)
    new 
y1;
    
get_user_name(attackeranamesizeof aname 1)
    
    if( ( 
level_exp[attacker] >= (g_level_exp[attacker] - 1) ) && (g_level[attacker] <= get_pcvar_num(g_level_max)) && is_user_alive(attacker) )
    {
        
g_bonus[attacker] = true;
        
g_level[attacker] = g_level[attacker] + 1;
        
level_exp[attacker] = 0;
        
        while( 
g_level[attacker] != )
        {
            
1;
            
g_level_exp[attacker] = get_pcvar_num(g_frags_level);
        }
        
        
message_begin(MSG_ONE_UNRELIABLEg_ScreenFade_attacker)
               
write_short(1<<12// duration
        
write_short(1// hold time
        
write_short(0x0000// fade type
        
write_byte(1// red
        
write_byte(200// green
        
write_byte(0// blue
        
write_byte(205// alpha
        
message_end()
        
emit_sound(attackerCHAN_STREAMsound_level_up1.0ATTN_NORM0PITCH_HIGH )
        
set_hudmessage(020000.650.500.03.02.01.0, -1)
        
show_hudmessage(0"%L"LANG_PLAYER"LEVEL_UP"anameg_level[attacker])
        
        if(
get_pcvar_num(g_give_ammo) == 1)
        {
            
ChatColor(attacker"!g[LEVEL] !y %L"LANG_PLAYER"BONUS_LEVEL"get_pcvar_num(g_give_ammopacks) )
            
zp_set_user_ammo_packs(attackerzp_get_user_ammo_packs(attacker) + get_pcvar_num(g_give_ammopacks) )
        }
        
Level_Save(attacker);
    }
    else
    {

        if(
g_level[attacker] == get_pcvar_num(g_level_max))
        
ChatColor(attacker"!g[LEVEL]!y %L"LANG_PLAYER"LEVEL_MAX"g_level[attacker] )
        
level_exp[attacker] = level_exp[attacker] + 1;
        
Level_Save(attacker);
    }
}

public 
zp_round_ended(winteam)
{
    for(new 
id=1;id<=g_Players;id++)
    {
        if (
is_user_connected(id))
            
g_trime[id] = true;
    }
}

stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)

    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!t""^3"// Team Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLESayText_players[i])
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

Vechta is offline
gulverene
Senior Member
Join Date: Nov 2008
Location: Türkiye
Old 11-12-2010 , 14:58   Re: [ZP] Server Addon: LevelUp System XP 3.3 [UPDATE] || Fixed Version
Reply With Quote #48

thanks . I'm testing
gulverene is offline
Send a message via Skype™ to gulverene
gulverene
Senior Member
Join Date: Nov 2008
Location: Türkiye
Old 11-12-2010 , 15:39   Re: [ZP] Server Addon: LevelUp System XP 3.3 [UPDATE] || Fixed Version
Reply With Quote #49

connect
ERROR: couldn't open custom.hpk.

server freezes and will not open again.
gulverene is offline
Send a message via Skype™ to gulverene
gulverene
Senior Member
Join Date: Nov 2008
Location: Türkiye
Old 11-12-2010 , 16:04   Re: [ZP] Server Addon: LevelUp System XP 3.3 [UPDATE] || Fixed Version
Reply With Quote #50

Quote:
Originally Posted by gulverene View Post
connect
ERROR: couldn't open custom.hpk.

server freezes and will not open again.
I custom.hpk / server threw into.

ERROR: could not open custom.hpk. error finish.
But the server froze again
gulverene is offline
Send a message via Skype™ to gulverene
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 06:14.


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