Raised This Month: $32 Target: $400
 8% 

What is the problem in the level


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SexwQw
Junior Member
Join Date: Sep 2018
Old 09-21-2018 , 12:43   What is the problem in the level
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fvault>
#include <cstrike>
#include <wm_play>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#define ADMIN_ACCESS ADMIN_LEVEL_B
#define AUTHOR "Fa[ST]eR"

#pragma semicolon 1

#define TOP 10

new key[64], name[65], data_[328];
new 
g_level[32], g_exp[32], g_exp2[32];
new 
g_maxg_fade;
const 
pev_spec pev_iuser2;

new const 
file_dir[] = "addons/amxmodx/data/file_vault";
new 
path[128], data[256], top_level[33], top_exp[33], top_exp2[33], top_name[33][33];

new  
sound[] = "misc/level_up.wav";
public 
plugin_precache() precache_sound(sound);

new 
GetUsedd1[33];
new 
GetUsedd2[33];
new 
GetUsedd3[33];
new 
GetUsedd4[33];
new 
GetUsedd5[33];
new 
GetUsedd6[33];
new 
GetUsedd7[33];

new const 
g_szFile[] = "addons/amxmodx/configs/users.ini";

new const 
g_zsFile[] = "addons/amxmodx/configs/ap_prefixes.ini";

new const 
Grads[][] = {
    
"Newbie",
    
"Newbie",
    
"Newbie",
    
"Newbie",
    
"Newbie",
    
"Newbie",
    
"Newbie",
    
"Newbie",
    
"Newbie",
    
"Newbie",
    
"Assassin",
    
"Assassin",
    
"Assassin",
    
"Assassin",
    
"Assassin",
    
"Assassin",
    
"Assassin",
    
"Assassin",
    
"Assassin",
    
"Assassin",
    
"Mafia",
    
"Mafia",
    
"Mafia",
    
"Mafia",
    
"Mafia",
    
"Mafia",
    
"Mafia",
    
"Mafia",
    
"Mafia",
    
"Mafia",
    
"Killer",
    
"Killer",
    
"Killer",
    
"Killer",
    
"Killer",
    
"Killer",
    
"Killer",
    
"Killer",
    
"Killer",
    
"Killer",
    
"Professional",
    
"Professional",
    
"Professional",
    
"Professional",
    
"Professional",
    
"Professional",
    
"Professional",
    
"Professional",
    
"Professional",
    
"Professional",
    
"Leader",
    
"Leader",
    
"Leader",
    
"Leader",
    
"Leader",
    
"Leader",
    
"Leader",
    
"Leader",
    
"Leader",
    
"Leader",
    
"Da3ich",
    
"Da3ich",
    
"Da3ich",
    
"Da3ich",
    
"Da3ich",
    
"Da3ich",
    
"Da3ich",
    
"Da3ich",
    
"Da3ich",
    
"Da3ich",
    
"Big Boss",
    
"Big Boss",
    
"Big Boss",
    
"Big Boss",
    
"Big Boss",
    
"Big Boss",
    
"Big Boss",
    
"Big Boss",
    
"Big Boss",
    
"Big Boss",
    
"Monster",
    
"Monster",
    
"Monster",
    
"Monster",
    
"Monster",
    
"Monster",
    
"Monster",
    
"Monster",
    
"Monster",
    
"Monster",
    
"Souvage",
    
"Souvage",
    
"Souvage",
    
"Souvage",
    
"Souvage",
    
"Souvage",
    
"Souvage",
    
"Souvage",
    
"Souvage",
    
"Souvage"
};

public 
plugin_init()
{
    
register_plugin("New Level System""1.0""Alaska");
    
    
register_clcmd("say /toplevel""show_top"); 
    
register_clcmd("say /level""show_level");
    
register_clcmd("say /steam""show_steam");
    
register_clcmd("say /lvlmenu""level_menu");
    
register_clcmd("say /levelmenu""level_menu");
    
    
register_event("StatusValue""show_hud_pid""be""1=2""2!0");
    
register_event("DeathMsg""event_death""a");    
    
set_task(2.0"save_data"___"b");
    
    
g_max register_cvar("max_level""100");
    
g_fade =  get_user_msgid("ScreenFade");
    
    
RegisterHamHam_Spawn,"player","fw_PlayerSpawn",);
    
    
read_top();
    if(!
dir_exists(file_dir)) mkdir(file_dir);    
}

public 
plugin_natives()
{
    
register_native"get_user_level""native_get_user_level");
    
register_native"set_user_level""native_set_user_level");
}    

 
public 
native_get_user_level(id)
{
    return 
g_level[id];
}

public 
native_set_user_level(id,level)
{
    
g_levelid ] = level;
}    

public 
client_connected(idload_data(id);
public 
client_authorized(idload_data(id);
public 
client_disconnect(idsave_data(id), remove_task(id);    

public 
client_putinserver(id)
{    
    
load_data(id); 
    
set_task(1.0 ,"show_hud"id__"b");
    
set_task(2.0 ,"check_save"id__"b");
    
    if(
g_level[id] == && !is_user_bot(id))
    {    
        
g_level[id] = 1;
        
g_exp[id] = 0;
        
g_exp2[id] = 5;    
    }    
}

public 
event_death()
{
    new 
name[32], attacker read_data(1);
    
get_user_name(attackernamesizeof name 1); new 1;
    
    if((
g_exp[attacker] >= (g_exp2[attacker] - 1)) && (g_level[attacker] <= get_pcvar_num(g_max)) && is_user_alive(attacker))
    {
        
g_level[attacker] ++; g_exp[attacker] = 0;    
        
        while(
g_level[attacker] != y)
        {
            
++; g_exp2[attacker] = 5;
        }
        
        
message_begin(MSG_ONE_UNRELIABLEg_fade_attacker);
        
write_short(1<<12);
        
write_short(1);
        
write_short(0x0000);
        
write_byte(1); 
        
write_byte(200); 
        
write_byte(0);
        
write_byte(205); 
        
message_end();
        
        
emit_sound(attackerCHAN_STREAMsound1.0ATTN_NORM0PITCH_HIGH);
        
set_hudmessage(020000.650.500.03.02.01.0, -1);
        
show_hudmessage(0"%s Has Cut Down Level %d"nameg_level[attacker]);
        
hs_chat(0"!g[ES] !nPlayer !t%s !nHas Up Level To !g%d !t!"nameg_level[attacker]);
    }
    else
    {        
        if(!(
g_level[attacker] == get_pcvar_num(g_max))) g_exp[attacker] ++;            
    }
}

public 
show_hud(id)
{
    new 
name[33], spec pev(idpev_spec);
    
get_user_name(specnamecharsmax(name)); 
    
    if(
is_user_alive(id))
    {
        
set_hudmessage(02000, -1.00.8706.01.1);
                                           
        
show_hudmessage(id"[ Health : %d | Class : %s ]^n[ Grade: %s | Level: %d | XP: %d/%d | Money: $%d ]"get_user_health(id), get_user_team(id) == "Humen":"Furien"Grads[g_level[id]], g_level[id], g_exp[id], g_exp2[id], cs_get_user_money(id));
    }
    if(
is_user_alive(spec))
    {
        
set_hudmessage(20030200, -1.00.8000.01.1);
        
show_hudmessage(id"Spectating: %s ^n[ Health: %d | Class: %s ]^n[ Grade: %s | Level: %d | XP: %d/%d | Money: $%d ]"nameget_user_health(spec), get_user_team(spec) == "Humen":"Furien"Grads[g_level[spec]], g_level[spec], g_exp[spec], g_exp2[spec], cs_get_user_money(spec));
    }    
}

public 
show_hud_pid(id)
{
    new 
name[33], pid read_data(2); get_user_name(pidnamecharsmax(name));
    new 
aimbodyget_user_aiming(idaimbody);
    
    if(
is_user_alive(aim) && get_user_team(id) == && get_user_team(aim) == 2
    {
        
set_hudmessage(00255, -1.00.6000.013.00.010.01, -1);
        
show_hudmessage(id"%s ^n[ Level: %d | XP: %d/%d ]"nameg_level[pid], g_exp[pid], g_exp2[pid]);
    }
    else if(
is_user_alive(aim) && get_user_team(id) == && get_user_team(aim) == 1
    {
        
set_hudmessage(25500, -1.00.6000.013.00.010.01, -1);
        
show_hudmessage(id"%s ^n[ Level: %d | XP: %d/%d ]"nameg_level[pid], g_exp[pid], g_exp2[pid]);
    }        
}

public 
save_data(id)    
{
    if(!
is_user_bot(id))
    {
        
get_user_name(idname34);   
        
        
format(key63"%s"name);     
        
format(data_327"^"%d^" ^"%d^" ^"%d^""g_level[id], g_exp[id], g_exp2[id]);
        
    }    


public 
load_data(id)    
{    
    
get_user_name(idname34);    
    
    
format(key63"%s"name);    
    
format(data_327"^"%d^" ^"%d^" ^"%d^""g_level[id], g_exp[id], g_exp2[id]);
    
    
    new 
level[32], exp[32],  exp2[32];
    
    
parse(data_levelsizeof(level) - 1expsizeof(exp) - 1exp2sizeof(exp2) - 1);
    
    
g_level[id] = str_to_num(level);   
    
g_exp[id] = str_to_num(exp);
    
g_exp2[id] = str_to_num(exp2);


public 
check_save(id)
{
    if(
get_user_team(id) == && !is_user_bot(id)) return;
    
    
save_data(id); update_top(idg_level[id], g_exp[id], g_exp2[id]);
}

public 
save_top()
{
    
formatex(path127"%s/gtop.txt"file_dir);
    
    if(
file_exists(path))
        
delete_file(path);
    
    new 
fopen(path"at");
    
    for(new 
0TOPi++)
    {
        
formatex(data255"^"%s^" ^"%d^" ^"%d^" ^"%d^"^n"top_name[i], top_level[i], top_exp[i], top_exp2[i]);
        
fputs(fdata);
    }
    
fclose(f);
}

public 
read_top()
{
    
formatex(path127"%s/gtop.txt"file_dir);
    
    new 
fopen(path"rt");
    new 
0;
    new 
level[25], exp[25], exp2[25]; 
    
    while(!
feof(f)  && TOP+1)
    {
        
fgets(fdata255);
        
parse(datatop_name[i], 31level25,  exp25exp225);
        
        
top_level[i] = str_to_num(level);
        
top_exp[i] = str_to_num(exp);
        
top_exp2[i] = str_to_num(exp2);
        
i++;
    }
    
fclose(f);    
}

public 
show_top(id
{    
    static 
buffer[2368], name[131], leni;
    
    
len format(buffer[len], 2367-len,"<meta charset=UTF-8><style>body{background:#000000;font-family:Tahoma}th{background:#303B4A;color:#FFF}table{padding:6px 2px;background:#EFF1F3;font-size:12px;color:#222;border:1px solid #CCC}h2,h3{color:#222}#c{background:#E9EBEE}img{height:7px;background:#F8931F;margin:0 3px}#r{height:7px;background:#D2232A}#clr{background:none;color:#303B4A;font-size:20px;border:0}</style>");
    
    
len += format(buffer[len], 2367-len"<body><table width=100%% border=0 align=center cellpadding=0 cellspacing=1>");    
    
len += format(buffer[len], 2367-len"<body><tr><th>%s<th>%s<th>%s<th>%s</tr>","#","Name","Level","Exp");    
    
    for(
0TOPi++)
    {        
        
name top_name[i];
        
        if(
top_level[i]== 0
        {
            
len += format(buffer[len], 2367-len"<tr><td>%d.<td>%s<td>%s<td>%s/%s</tr>", (i+1), "-""-""-""-");
        }
        else
        {
            while(
containi(name"<") != -1replace(name129"<""&lt;");
            while(
containi(name">") != -1replace(name129">""&gt;");            
            
len += format(buffer[len], 2367-len"<tr><td>%d<td>%s<td>%d<td>%d/%d</tr>", (i+1), nametop_level[i], top_exp[i], top_exp2[i]);
        }
    }
    
    static 
strin[20]; format(strin,33"Top 10 Level");
    
show_motd(idbufferstrin);
}

public 
update_top(idlevelexpexp2
{    
    static 
name[32]; get_user_name(idnamecharsmax(name) - 1);
    
    for(new 
0TOPi++)
    {
        if(
level top_level[i] || level == top_level[i] && exp top_exp[i])
        {
            new 
pos i;    
            while(!
equal(top_name[pos], name) && pos TOP)
                
pos++;
            
            for(new 
posij--)
            {
                
formatex(top_name[j], 31top_name[j-1]);
                
top_level[j] = top_level[j-1];
                
top_exp[j] = top_exp[j-1];
            }
            
            
formatex(top_name[i], charsmax(name) - 1name);
            
            
top_level[i] = level;
            
top_exp[i] = exp;
            
top_exp2[i] = exp2;
            
            
save_top();
            break;
        }
        else if(
equal(top_name[i], name)) 
            break;    
    }


public 
show_level(id)
{
    new 
menu menu_create("\d[\rES\d] \yShow Players Level \w:""level_handle");
    
    new 
name[32], pid[32], players[32], text[555 char],pnumtempid;
    
get_players(playerspnum"c");
    
    for(new 
iipnumi++)
    {
        
tempid players[i];
        
        
get_user_name(tempidnamecharsmax(name)); 
        
formatex(textcharsmax(text), "%s \y: \r[ Level: %i | XP: %i/%i ]"nameg_level[tempid], g_exp[tempid], g_exp2[tempid]);
        
num_to_str(get_user_userid(tempid), pid9);
        
menu_additem(menutextpid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_CONTINUE;
}
public 
MsgDuplicate(id){ return PLUGIN_HANDLED; }

public 
hook_say(id)
{
    new 
SzMessages[192], SzName[32];
    new 
SzAlive is_user_alive(id);
    
    
read_args(SzMessages191);
    
remove_quotes(SzMessages);
    
get_user_name(idSzName31);
    
    if(!
is_valid_msg(SzMessages))
        return 
PLUGIN_CONTINUE;
    
    switch(
get_pcvar_num(playerPrefix)
    {
        case 
:(SzAlive format(SzMessages191"^4[%s] ^3%s : ^1%s"ranks_names[rank[id]], SzNameSzMessages) : format(SzMessages191"^1*DEAD* ^4[%s] ^3%s : ^1%s"ranks_names[rank[id]], SzNameSzMessages));
        case 
:(SzAlive format(SzMessages191"^4[Level %d] ^3%s : ^1%s"level[id], SzNameSzMessages) : format(SzMessages191"^1*DEAD* ^4[Level %d] ^3%s : ^1%s"level[id], SzNameSzMessages));
    }
    
    for(new 
1<= SzMaxPlayersi++)
    {
        if(!
is_user_connected(i))
            continue;
        
        
message_begin(MSG_ONEget_user_msgid("SayText"), {000}, i);
        
write_byte(id);
        
write_string(SzMessages);
        
message_end();
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
hook_say_team(id)
{
    new 
SzMessages[192], SzName[32];
    new 
SzAlive is_user_alive(id);
    new 
SzGetTeam get_user_team(id);
    
    
read_args(SzMessages191);
    
remove_quotes(SzMessages);
    
get_user_name(idSzName31);
    
    if(!
is_valid_msg(SzMessages))
        return 
PLUGIN_CONTINUE;
    
    switch(
get_pcvar_num(playerPrefix))
    {
        case 
: (SzAlive format(SzMessages191"^1(%s) ^4[%s] ^3%s : ^1%s"SzGTeam[SzGetTeam], ranks_names[rank[id]], SzNameSzMessages) : format(SzMessages191"^1*DEAD* ^1(%s) ^4[%s] ^3%s : ^1%s"SzGTeam[SzGetTeam], ranks_names[rank[id]], SzNameSzMessages));
        case 
: (SzAlive format(SzMessages191"^1(%s) ^4[Level %d] ^3%s : ^1%s"SzGTeam[SzGetTeam], level[id], SzNameSzMessages) : format(SzMessages191"^1*DEAD* ^1(%s) ^4[Level %d] ^3%s : ^1%s"SzGTeam[SzGetTeam], level[id], SzNameSzMessages));
    }
        
    for(new 
1<= SzMaxPlayersi++)
    {
        if(!
is_user_connected(i))
            continue;
        
        if(
get_user_team(i) != SzGetTeam)
            continue;
        
        
message_begin(MSG_ONEget_user_msgid("SayText"), {000}, i);
        
write_byte(id);
        
write_string(SzMessages);
        
message_end();
    }
    
    return 
PLUGIN_CONTINUE;
}

bool:is_valid_msg(const SzMessages[])
{
    if( 
SzMessages[0] == '@'
    
|| !strlen(SzMessages)){ return false; }
    return 
true;
}  

public 
level_handle(idmenuitem)
{
    if(
item == MENU_EXIT) return PLUGIN_HANDLED;
    
    
show_level(id);
    
    return 
PLUGIN_CONTINUE;
}

public 
show_steam(id)
{
    new 
menu menu_create("\d[\rSP\d] \yShow Steam Users \w:""steam_handle");
    
    new 
name[32], pid[32], players[32], text[555 char],pnumtempid;
    
get_players(playerspnum"c");
    
    for(new 
iipnumi++)
    {
        
tempid players[i];
        
        
get_user_name(tempidnamecharsmax(name)); 
        
formatex(textcharsmax(text), "%s \y: \r[ \y%s \r]"nameis_user_steam(tempid)?"Steam":"Non\r-\ySteam");
        
num_to_str(get_user_userid(tempid), pid9);
        
menu_additem(menutextpid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_CONTINUE;
}

public 
steam_handle(idmenuitem)
{
    if(
item == MENU_EXIT) return PLUGIN_HANDLED;
    
    
show_steam(id);
    
    return 
PLUGIN_CONTINUE;
}

stock bool:is_user_steam(index)
{
    static 
dp_pointer;
    
    if(
dp_pointer || (dp_pointer get_cvar_pointer("dp_r_id_provider")))
    {
        
server_cmd("dp_clientinfo %d"index); server_exec();
        return (
get_pcvar_num(dp_pointer) == 2) ? true false;
    }
    
    return 
false;
}

stock get_nameid ) {

    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    return 
szName;
}

public 
level_menu(id)
{
    new 
menu menu_create("\r[Silent-Puissance] \yLevel Menu \w:^n\r-->Health: \y+1^n\r-->Damage: \y+1^n\r-->Money: \y+100 ""menu_keys3");
    new 
lvl =  native_get_user_level(id);
            
    
    if( 
lvl10 )
    {        
    
menu_additem(menu"\dGet 35 Health \r[LEVEL:10]""1");
    }
    else if( 
lvl>= 10 )
    {
    
menu_additem(menu"Get 35 Health \r[LEVEL:10]""1");
    }
    if( 
lvl20 
    {        
    
menu_additem(menu"\d100 Armor \r[LEVEL:20]""2");
    }
    else if( 
lvl>= 20 )
    {
    
menu_additem(menu"100 Armor \r[LEVEL:20]""2");
    }
    if( 
lvl30 
    {        
    
menu_additem(menu"\d$16000 Money \r[LEVEL:30]""3");
    }
    else if( 
lvl>= 30 )
    {
    
menu_additem(menu"$16000 Money \r[LEVEL:30]""3");
    }
    if( 
lvl40 
    {        
    
menu_additem(menu"\dNades Menu \r[LEVEL:40]""4");
    }
    else if( 
lvl>= 40 )
    {
    
menu_additem(menu"Nades Menu \r[LEVEL:40]""4");
    }
    if(
cs_get_user_team(id) == CS_TEAM_CT
 
    if( 
lvl50 
    {        
    
menu_additem(menu"\dUnlimited Clip \r[Every 2 Rounds][LEVEL:50][CT)""5");
    }
    else if( 
lvl>= 50 )
    {
    
menu_additem(menu"Unlimited Clip \r[Every 2 Rounds][LEVEL:50][CT]""5");
    }
    if(
cs_get_user_team(id) == CS_TEAM_CT
    if( 
lvl60 )
    {
    
menu_additem(menu"\dElectrique Awp \r[LEVEL:60][CT]""6");
    }
    else if( 
lvl>= 60 )
    {
    
menu_additem(menu"Electrique \r[LEVEL:60][CT]""6");
    }
    if( 
lvl70 )
    {
    
menu_additem(menu"\dVIP + Green Chat \r[LEVEL:70]""7");
    }
    else if( 
lvl>= 70 )
    {
    
menu_additem(menu"VIP + Green Chat \r[LEVEL:70]""7");
    }
    
    
    
menu_displayidmenu);
    return 
PLUGIN_HANDLED;  
}


public 
menu_keys3(idmenuitem)
{
    if(
item 0
        return 
PLUGIN_CONTINUE;
        
    new 
lvl =  native_get_user_level(id);
    new 
cmd[2];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccesscmd,2,_,_callback);
    new 
choice str_to_num(cmd);
    new 
szName 32 ];
    
get_user_name idszNamecharsmax szName ) );
        
    switch (
choice)
    {
        case 
1:
        {
            if ( 
lvl 10 )
            {
                
level_menu(id);
                
hs_chat(0"!g[SP] !nYou don't have level 10 !t!");
                return 
PLUGIN_CONTINUE;
            }
            if(
GetUsedd1[id])
            {                        
                                    
hs_chat(0"!g[SP] !nYou can get !g35 Health !nonly once in each round !t!"); 
                                    return 
PLUGIN_HANDLED;
                           } 
            
set_user_health(idget_user_health(id) + 35);
            
            
GetUsedd1[id] = true;
            
hs_chat(0"!g[SP] !nYou Get !t35 Health !g!");
        }
        case 
2:
        {
            if ( 
lvl 20 )
            {
                
level_menu(id);
                
hs_chat(0"!g[SP] !nYou don't have level 20 !t!");
                return 
PLUGIN_CONTINUE;
            }
            if(
GetUsedd2[id])
            {                        
                                    
hs_chat(0"!g[SP] !nYou can get !g100 Armor !nonly once in each round !t!"); 
                                    return 
PLUGIN_HANDLED;
                           } 
            
set_user_armor(idget_user_armor(id) + 100);
            
            
GetUsedd2[id] = true;
            
hs_chat(0"!g[SP] !nYou Get !t100 Armor !g!");
        }
        case 
3:
        {
            if ( 
lvl 30 )
            {
                
level_menu(id);
                
hs_chat(0"!g[SP] !nYou don't have level 30 !t!");
                return 
PLUGIN_CONTINUE;
            }
            if(
GetUsedd3[id])
            {                        
                                    
hs_chat(0"!g[SP] !nYou can get !g$16000 Money !nonly once in each round !t!"); 
                                    return 
PLUGIN_HANDLED;
                           } 
            
cs_set_user_money(idcs_get_user_money(id) + 16000);
            
            
GetUsedd3[id] = true;
            
hs_chat(0"!g[SP] !nYou Get !t$16000 Money !g!");
        }
        case 
4:
        {
            if ( 
lvl 40 )
            {
                
level_menu(id);
                
hs_chat(0"!g[SP] !nYou don't have level 40 !t!");
                return 
PLUGIN_CONTINUE;
            }
            if(
GetUsedd4[id]) 
            {                        
                                    
hs_chat(0"!g[SP] !nYou can get !gGrenade !nonly once in each round !t!"); 
                                    return 
PLUGIN_HANDLED
                           } 
            
NadesMenu(id);
            
            
GetUsedd4[id] = true;
        }
        case 
5:
        {
            if ( 
lvl 50 )
            {
                
level_menu(id);
                
hs_chat(0"!g[SP] !nYou don't have level 50 !t!");
                return 
PLUGIN_CONTINUE;
            }
            if(
GetUsedd5[id]) 
            {                        
                                    
hs_chat(0"!g[SP] !nYou can get !gUnlimited Clip !nonly once in each round !t!"); 
                                    return 
PLUGIN_HANDLED
                           } 
            
client_cmd(id"say /buyunlimitedclip");
            
            
GetUsedd5[id] = true;
            
hs_chat(0"!g[SP] !nYou Get !tUnlimited Clip !g!");
        }
        case 
6:
        {
            if ( 
lvl 60 )
            {
                
level_menu(id);
                
hs_chat(0"!g[SP] !nYou don't have level 60 !t!");
                return 
PLUGIN_CONTINUE;
            }
            if(
GetUsedd6[id]) 
            {                        
                                    
hs_chat(0"!g[SP] !nYou can get !gElectrique Awp !nonly once in each round !t!"); 
                                    return 
PLUGIN_HANDLED
                           } 
            
client_cmd(id"say /buyelectriqueawp");
            
            
GetUsedd6[id] = true;
            
hs_chat(0"!g[SP] !nYou Get !tElectrique Awp !g!");
        }
        case 
7
        {
            if ( 
lvl 70 )
            {
                
level_menu(id);
                
hs_chat(0"!g[SP] !nYou don't have level 70 !t!");
                return 
PLUGIN_CONTINUE;
            }
            new 
];
            
formatex acharsmax ), "%c%c%c%c%c%c"random_num '1''2' ), random_num '1''2' ), random_num '0''9' ), random_num '2''4' ), random_num '5''6' ), random_num '7''8' ) );
        
            new 
szBuffer 512 ];
            
formatex szBuffercharsmax szBuffer ), "^"%s^" ^"t^" ^"a^""szName);
            
            new 
zsBuffer 512 ];
            
formatex zsBuffercharsmax zsBuffer ), "^"n^" ^"%s^" ^"!g[VIP]^""szName);
            
            
write_file g_szFileszBuffer );
            
            
write_file g_zsFilezsBuffer );
            
                           
hs_chat(0"!g[SP] !nYou Get !tVIP + Green Chat !g!");
                 
hs_chat(0"!g[SP] !nWait Change Map Will Be Active VIP !t!");
            
            
        }
    }    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
NadesMenu(id)
{
    new 
menu menu_create("\d[\rSP\d] \yNades Menu \w:""menu_keys4");
    
    
menu_additem(menu"Fire Grenade""1");
    
menu_additem(menu"Flash Grenade""2");
    
menu_additem(menu"Frost Grenade""3");

    
menu_displayidmenu);
    return 
PLUGIN_HANDLED;
}

public 
menu_keys4(idmenuitem)
{
    if(
item 0
        return 
PLUGIN_CONTINUE;
        
    new 
cmd[2];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccesscmd,2,_,_callback);
    new 
choice str_to_num(cmd);
    new 
szName 32 ];
    
get_user_name idszNamecharsmax szName ) );
        
    switch (
choice)
    {
        case 
1:
        {
            
give_item(id"weapon_hegrenade");
            
            
hs_chat(id"!g[SP] !nYou Get !tFire Grenade !g!");
        }
        case 
2:
        {
            
give_item(id"weapon_flashbang");
            
            
hs_chat(id"!g[SP] !nYou Get !tFlash Grenade !g!");
        }
        case 
3:
        {
            
give_item(id"weapon_smokegrenade");
            
            
hs_chat(id"!g[SP] !nYou Get !tFrost Grenade !g!");
        }
    }    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}


public 
fw_PlayerSpawn(id )
{
    
    
GetUsedd1[id] = false;
    
GetUsedd2[id] = false;
    
GetUsedd3[id] = false;
    
GetUsedd4[id] = false;
    
GetUsedd5[id] = false;
    
GetUsedd6[id] = false;
    
GetUsedd7[id] = false;
    
  
    return 
HAM_IGNORED;
}  

stock hs_chat(const id, const input[], any:...) 
{
    static 
msg[191]; new count 1players[32];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^4");
    
replace_all(msg190"!n""^1");
    
replace_all(msg190"!t""^3");
    
    if(
idplayers[0] = id; else get_players(playerscount"ch"); {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

SexwQw is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-21-2018 , 12:52   Re: What is the problem in the level
Reply With Quote #2

How should we know??? Is it so hard to explain?! If you really want to know, everything in this plugin is wrong. Use this instead - https://forums.alliedmods.net/showthread.php?t=308540

And yet again you posted your thread in the wrong section.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SexwQw
Junior Member
Join Date: Sep 2018
Old 09-21-2018 , 12:56   Re: What is the problem in the level
Reply With Quote #3

NiCe , But are u can fix this For me now ?
SexwQw is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-21-2018 , 13:01   Re: What is the problem in the level
Reply With Quote #4

FIX WHAT?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SexwQw
Junior Member
Join Date: Sep 2018
Old 09-21-2018 , 13:04   Re: What is the problem in the level
Reply With Quote #5

The Problem In The Code
SexwQw is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-21-2018 , 13:23   Re: What is the problem in the level
Reply With Quote #6

What problem??? You did NOT mention any problem. Use your brain, please!
__________________

Last edited by OciXCrom; 09-21-2018 at 13:23.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SexwQw
Junior Member
Join Date: Sep 2018
Old 09-21-2018 , 13:25   Re: What is the problem in the level
Reply With Quote #7

i write what the problem in this i can't compile it
SexwQw is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-21-2018 , 13:26   Re: What is the problem in the level
Reply With Quote #8

Really? I must be blind then. I'll give you a cookie if you show me where you wrote that.
__________________

Last edited by OciXCrom; 09-21-2018 at 13:26.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SexwQw
Junior Member
Join Date: Sep 2018
Old 09-21-2018 , 13:29   Re: What is the problem in the level
Reply With Quote #9

what i wrote in title?
SexwQw is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-21-2018 , 13:30   Re: What is the problem in the level
Reply With Quote #10

I'm out of here. I'll have better luck talking to a rusted wall.
__________________

Last edited by OciXCrom; 09-21-2018 at 13:30.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 17:02.


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