unreachable code warning 255

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
162
Реакции
4
Помог
3 раз(а)
Ошибка
unreachable code warning 255
Компилятор
Локальный
Amx Mod X
1.9.0
Исходный код
//Русский перевод от ecco.
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fun>

#define Keysmenu_1 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) //Keys: 1234567890
#define Keysmenu_2 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) //Keys: 1234567890

#define ADMIN_ACCESS ADMIN_RCON

// Server Sort Name
new const g_Client[] = "[Универсальная админка]";

new bool:restart_event = false;
new bool:vibri_event = false;

new sprSaber;

new invisibility[33][2];
new chameleon[33][2];
new footsteps[33][2];

public plugin_init() {
register_plugin("Universal Admin Menu", "4.0", "ecco")

register_dictionary( "UniversalAdminMenu.txt");

register_cvar("write_log_file","1");

register_concmd("glow", "RandGlow", ADMIN_ACCESS, "All Player Random Glow.")

register_concmd("asd", "ShowAdminMenu", ADMIN_ACCESS, "Open Админские Читы 1 стр.")
register_concmd("asd2", "ShowAdminMenu2", ADMIN_ACCESS, "Open Админские Читы 2 стр.")

register_menucmd(register_menuid("menu_1"), Keysmenu_1, "Pressedmenu_1")
register_menucmd(register_menuid("menu_2"), Keysmenu_2, "Pressedmenu_2")

register_logevent("RoundEnd", 2, "1=Round_End")
}

public client_putinserver(id)
{
if(is_user_bot(id))
return PLUGIN_HANDLED;

invisibility[id][0] = 0;
footsteps[id][0] = 0;
chameleon[id][0] = 0;

set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);

return PLUGIN_CONTINUE;
}

public client_disconnected(id)
{
if(is_user_bot(id))
return PLUGIN_HANDLED;

invisibility[id][0] = 0;
footsteps[id][0] = 0;
chameleon[id][0] = 0;

return PLUGIN_CONTINUE;
}

public ShowAdminMenu(id) {
if (get_user_flags(id) & ADMIN_ACCESS)
{
show_menu(id, Keysmenu_1, "Универсальная админка 1 стр.^n^n1. AK47/M4a1^n2. AWP + Дигл^n3. Воскреснуть^n4. Деньги: $16000 ^n5. Гранаты^n6. Жизни и Броня^n7. Нет припятствий^n\y9. Далее...^n^n\r0. Выход", -1, "menu_1") // Display menu

return PLUGIN_CONTINUE
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"ACCES_MSG");

return PLUGIN_HANDLED;
}

return PLUGIN_CONTINUE
}

public Pressedmenu_1(id, key) {

new team[32], User[32];
get_user_team(id,team,32);
get_user_name(id,User,32);

switch (key) {
case 0: { // 1

if(is_user_alive(id))
{
strip_user_weapons(id) // No more weapons

if(equal(team,"T", 1))
{
give_item(id,"weapon_ak47")
give_item(id,"ammo_762nato")
give_item(id,"ammo_762nato")
give_item(id,"ammo_762nato")
give_item(id,"ammo_762nato")

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"WEAPONS_TE")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Weapon(AK47)", User)
}
else
{
give_item(id,"weapon_m4a1")
give_item(id,"ammo_556nato")
give_item(id,"ammo_556nato")
give_item(id,"ammo_556nato")

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"WEAPONS_CT")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Weapon(M4a1)", User)
}

give_item(id,"weapon_deagle")
give_item(id,"weapon_knife")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"weapon_hegrenade")
give_item(id,"weapon_flashbang")
give_item(id,"weapon_flashbang")
give_item(id,"weapon_smokegrenade")

set_user_armor(id, 100)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd")
}
case 1: { // 2

if(is_user_alive(id))
{
strip_user_weapons(id) // No more weapons
give_item(id,"weapon_awp")
give_item(id,"ammo_338magnum")
give_item(id,"ammo_338magnum")
give_item(id,"ammo_338magnum")
give_item(id,"weapon_deagle")
give_item(id,"weapon_knife")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"weapon_hegrenade")
give_item(id,"weapon_flashbang")
give_item(id,"weapon_flashbang")
give_item(id,"weapon_smokegrenade")

set_user_armor(id, 100)

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"AWP_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Weapon(AWP)", User)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd")
}
case 2: { // 3

ExecuteHam(Ham_CS_RoundRespawn, id);

set_user_armor(id, 100)
set_user_godmode(id, 1)
set_user_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal,30)

set_task(5.0,"respawn", id)

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"RESPAWN_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Revive", User);

client_cmd(id, "asd")
}
case 3: { // 4

new money = cs_get_user_money(id);

if(money < 16000)
{
cs_set_user_money(id, 16000);

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"MONEY_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: $16000", User)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"ALREADY_MONEY")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd")
}
case 4: { // 5

if(is_user_alive(id))
{
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")

set_user_armor(id, 100)

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"NADE_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Nades", User);
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd")
}
case 5: { // 6

if(is_user_alive(id))
{
set_user_armor(id, 255)
set_user_health(id, 255)

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"HPAP_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Health & Armor", User)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd")
}
case 6: { // 7

if(is_user_alive(id))
{
new ghost = get_user_noclip(id);

if( ghost == 0 ) {
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"GHOST_ON_MSG")
set_user_noclip(id, 1);
}else {
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"GHOST_OFF_MSG")
set_user_noclip(id, 0);
}

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Noclip", User)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd")
}
case 8: { // 9
client_cmd(id, "asd2")
}
case 9: { // 0
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED
}

public ShowAdminMenu2(id) {
if (get_user_flags(id) & ADMIN_ACCESS)
{
show_menu(id, Keysmenu_2, "Универсальная админка 2 стр.^n^n1. C4/МинерПакет^n2. Хамелеон^n3. Восстановление (+1HP/сек)^n4. Невидимость^n5. Тихий шаг (Вкл/Выкл)^n6. Рестарт(60сек)^n^n\r0. Назад", -1, "menu_2") // Display menu

return PLUGIN_CONTINUE
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"ACCES_MSG")

return PLUGIN_HANDLED;
}

return PLUGIN_CONTINUE
}

public Pressedmenu_2(id, key) {

new team[32], User[32];
get_user_team(id,team,32);
get_user_name(id,User,32);

switch (key) {
case 0: { // 1

if(is_user_alive(id))
{
if(equal(team,"T", 1))
{
give_item(id,"weapon_c4")

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"C4_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Weapon(C4)", User)
}
else
{
cs_set_user_defuse(id)

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DEFUSEKIT_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Weapon(Defusekit)", User)
}
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd2")
}
case 1: { // 2

if(is_user_alive(id))
{
if(chameleon[id][0] == 0)
{
if(equal(team,"T", 1))
{
cs_set_user_model(id, "gign")

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"CHAMELEON_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Chameleon(CT)", User)
}
else
{
cs_set_user_model(id, "leet")

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"CHAMELEON_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Chameleon(TE)", User)
}

chameleon[id][0] = 1;
}
else
{
cs_reset_user_model(id);
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"RESET_CHAMELEON_MSG")
chameleon[id][0] = 0;
}
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd2")
}
case 2: { // 3

if(is_user_alive(id))
{
new hp = get_user_health(id);

if(hp < 100)
{
set_task(1.0,"gyogyitas", id)

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"HP_REGEN_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: +1HP/s", User)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"HP_FULL_MSG", hp)
return PLUGIN_HANDLED;
}
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd2")
}
case 3: { // 4

if(is_user_alive(id))
{
if(invisibility[id][0] == 0)
{
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,3);
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"FULL_INVISIBILITY_MSG")
invisibility[id][0] = 1;
}
else if(invisibility[id][0] == 1)
{
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,50);
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"INVISIBILITY_MSG")
invisibility[id][0] = 2;
}
else if(invisibility[id][0] == 2)
{
set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"INVISIBILITY_OFF_MSG")
invisibility[id][0] = 0;
}

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Invisibility", User)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd2")
}
case 4: { // 5

if(is_user_alive(id))
{
if(footsteps[id][0] == 0)
{
set_user_footsteps(id, 1);
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"FOOTSTEPS_ON_MSG")
footsteps[id][0] = 1;
}
else
{
set_user_footsteps(id, 0);
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"FOOTSTEPS_OFF_MSG")
footsteps[id][0] = 0;
}

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Footsteps (On/Off)", User)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd2")
}
case 5: { // 6

if(restart_event == false)
{
restart_event = true;

set_task(0.1, "restart", 60);

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"RESTART_MSG")

if(get_cvar_num("write_log_file") == 1)
log_amx("%s use a Admin Cheats: Round Restart", User)
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"ALREADY_RUN_RESTART_MSG")
return PLUGIN_HANDLED;
}

client_cmd(id, "asd2")
}
case 9: { // 0
client_cmd(id, "asd")
}
}
return PLUGIN_HANDLED;
}

/*----------------------------------------------!!!Fьggvйnyek!!!----------------------------------------------*/
public respawn(id) {

set_user_godmode(id, 0);
set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);

return PLUGIN_CONTINUE;
}

public gyogyitas(id) {

new hp = get_user_health(id);

if(hp < 100)
{
set_user_health(id, hp + 1);
set_task(1.0,"gyogyitas", id);
}
else
{
client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"HP_END_MSG", hp)
return PLUGIN_HANDLED;
}

return PLUGIN_CONTINUE;
}

/*----------------------------------------------LЙZERKARD----------------------------------------------*/
public sqrt(num)
{
new div = num;
new result = 1;

while (div > result) // end when div == result, or just below
{
div = (div + result) / 2; // take mean value as new divisor
result = num / div;
}

return div;
}

public lightsaber(id[])
{
new vec[3];
new aimvec[3];
new lseffvec[3];
new length;
new speed = 65;
get_user_origin(id[0],vec,1);
get_user_origin(id[0],aimvec,2);
lseffvec[0]=aimvec[0]-vec[0];
lseffvec[1]=aimvec[1]-vec[1];
lseffvec[2]=aimvec[2]-vec[2];
length=sqrt(lseffvec[0]*lseffvec[0]+lseffvec[1]*lseffvec[1]+lseffvec[2]*lseffvec[2]);
lseffvec[0]=lseffvec[0]*speed/length;
lseffvec[1]=lseffvec[1]*speed/length;
lseffvec[2]=lseffvec[2]*speed/length;

new vorigin[3];
new maxpl = get_maxplayers() +1;
new teama[32],teamv[32];
get_user_team(id[0],teama,31);

for(new a = 1; a < maxpl; a++)
{
if(is_user_alive(a) != 0)
{
get_user_origin(a,vorigin);
if (get_distance(vec,vorigin)<100)
{
if(a != id[0])
{
get_user_team(a,teamv,31);
if(!equal(teama,teamv,2))
{
if(id[1] != 0)
{
user_kill(a,id[0]);
new frag = get_user_frags(id[0]);
set_user_frags(id[0], frag + 1);

client_print(id[0], print_chat, "%s %L",g_Client, LANG_PLAYER,"JEDY_MSG")
}
}
else if(id[1] == 2)
{
user_kill(a,id[0]);
new frag = get_user_frags(id[0]);
set_user_frags(id[0], frag + 1);

client_print(id[0], print_chat, "%s %L",g_Client, LANG_PLAYER,"JEDY_MSG")
}
}
}
}
}

// beam effect between point and entity
message_begin( MSG_BROADCAST,SVC_TEMPENTITY);
write_byte ( 1 ); //TE_BEAMENTPOINT 1
write_short (id[0]); // ent
write_coord (lseffvec[0]+vec[0]); //end position
write_coord (lseffvec[1]+vec[1]);
write_coord (lseffvec[2]+vec[2]+10);
write_short (sprSaber); // sprite
write_byte (0); // start frame
write_byte (15); // frame rate in 0.1's
write_byte (1); // byte (life in 0.1's
write_byte (20); // line width in 0.1's
write_byte (5); // noise amplitude in 0.01's
write_byte (0); // RGB color
write_byte (200);
write_byte (0);
write_byte (255); // brightness
write_byte (10); // scroll speed in 0.1's
message_end();

return PLUGIN_CONTINUE;
}
/*----------------------------------------------LЙZERKARD-END------------------------------------------*/

public RoundEnd() {
// MAx Player numb
new maxplayers = get_maxplayers()+1;

for(new id = 1; id < maxplayers; id++)
{
if(chameleon[id][0] == 1)
{
cs_reset_user_model(id); // Ruha Reset
chameleon[id][0] = 0;

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"RESET_CHAMELEON_MSG")
}

if(invisibility[id][0] >= 1)
{
set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);
invisibility[id][0] = 0;

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"INVISIBILITY_OFF_MSG")
}

if(footsteps[id][0] == 1)
{
set_user_footsteps(id, 1); // Lepeshangok be!
footsteps[id][0] = 0;

client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"FOOTSTEPS_OFF_MSG")
}
}

if(vibri_event == true)
{
new players[32], team[32], num, player;
get_players(players, num, "ah")

for(new i = 0; i < num; i++)
{
player = players[i];
get_user_team(player,team,32);

if(is_user_alive(player))
{
strip_user_weapons(player) // No more weapons

if(equal(team,"T", 1))
{
give_item(player,"weapon_ak47")
give_item(player,"ammo_762nato")
give_item(player,"ammo_762nato")
give_item(player,"ammo_762nato")
give_item(player,"ammo_762nato")
}
else
{
give_item(player,"weapon_m4a1")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
}

set_user_health(player, 100);
set_user_armor(player, 100);

give_item(player,"weapon_knife")
give_item(player,"weapon_deagle")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"weapon_hegrenade")
give_item(player,"weapon_flashbang")
give_item(player,"weapon_flashbang")
give_item(player,"weapon_smokegrenade")

}

set_user_rendering(player,kRenderFxNone,255,255,255, kRenderNormal,16);
}

vibri_event = false;
}
}

public restart(count)
{
set_hudmessage(_, _, _, -1.0, 0.85, 1)
show_hudmessage(0,"Внимание! Рестарт раунда через %d секунд", count)

if((count <= 10) || (count % 10 == 0))
{
new szNum[32]
num_to_word(count, szNum, 31)
client_cmd(0, "spk ^"fvox/%s^"", szNum)
}

count--;

if(count != 0)
{
set_task(1.0, "restart", count) // Rekurziу
}
else
{
set_hudmessage(_, _, _, -1.0, -1.0, 1)
show_hudmessage(0,"Внимание рестарт раунда!!!")

server_cmd("sv_restart 1"); // Restart

restart_event = false;

client_cmd(0, ""); // Reset Sound
}

return PLUGIN_CONTINUE;
}

public shopmenu() {

new players[32], name[32], num, player;
get_players(players, num, "ah")

for(new i = 0; i < num; i++)
{
player = players[i];
get_user_name(player,name,32);

new ShopmenuItem = random_num(0, 17);
server_cmd("wc3_giveitem ^"%s^" %d", name, ShopmenuItem);
}
}

public RandGlow() {

new Red = random(256);
new Green = random(256);
new Blue = random(256);

new players[32], num, player;

get_players(players, num, "ah")

for(new i = 0; i < num; i++)
{
player = players[i];
set_user_rendering(player, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal,30)
}
}
Всем привет. Помогите пожалуйста исправить данную ошибку.
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
38
Реакции
29
Помог
4 раз(а)
C++:
//Русский перевод от ecco.
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fun>

#define Keysmenu_1 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) //Keys: 1234567890
#define Keysmenu_2 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) //Keys: 1234567890

#define ADMIN_ACCESS ADMIN_RCON

// Server Sort Name
new const g_Client[] = "[Универсальная админка]";

new bool:restart_event = false;
new bool:vibri_event = false;

new sprSaber;

new invisibility[33][2];
new chameleon[33][2];
new footsteps[33][2];

public plugin_init() {
    register_plugin("Universal Admin Menu", "4.0", "ecco")
    
    register_dictionary( "UniversalAdminMenu.txt");
    
    register_cvar("write_log_file","1");
    
    register_concmd("glow", "RandGlow", ADMIN_ACCESS, "All Player Random Glow.")
    
    register_concmd("asd", "ShowAdminMenu", ADMIN_ACCESS, "Open Админские Читы 1 стр.")
    register_concmd("asd2", "ShowAdminMenu2", ADMIN_ACCESS, "Open Админские Читы 2 стр.")

    register_menucmd(register_menuid("menu_1"), Keysmenu_1, "Pressedmenu_1")
    register_menucmd(register_menuid("menu_2"), Keysmenu_2, "Pressedmenu_2")
    
    register_logevent("RoundEnd", 2, "1=Round_End") 
}

public  client_putinserver(id)
{
    if(is_user_bot(id))
        return PLUGIN_HANDLED;
        
    invisibility[id][0] = 0;
    footsteps[id][0] = 0;
    chameleon[id][0] = 0;
    
    set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);
    
    return PLUGIN_CONTINUE;
}

public client_disconnected(id)
{
    if(is_user_bot(id))
        return PLUGIN_HANDLED;

    invisibility[id][0] = 0;
    footsteps[id][0] = 0;
    chameleon[id][0] = 0;

    return PLUGIN_CONTINUE;
}

public ShowAdminMenu(id) {
    if (get_user_flags(id) & ADMIN_ACCESS)
    {
        show_menu(id, Keysmenu_1, "Универсальная админка 1 стр.^n^n1. AK47/M4a1^n2. AWP + Дигл^n3. Воскреснуть^n4. Деньги: $16000 ^n5. Гранаты^n6. Жизни и Броня^n7. Нет припятствий^n\y9. Далее...^n^n\r0. Выход", -1, "menu_1") // Display menu
    
        return PLUGIN_CONTINUE;
    }
    else
    {
        client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"ACCES_MSG");
        
        return PLUGIN_HANDLED;
    }
}

public Pressedmenu_1(id, key) {

    new team[32], User[32];
    get_user_team(id,team,32);
    get_user_name(id,User,32);
    
    switch (key) {
        case 0: { // 1
        
            if(is_user_alive(id))
            {
                strip_user_weapons(id) // No more weapons
                
                if(equal(team,"T", 1))
                {
                    give_item(id,"weapon_ak47")
                    give_item(id,"ammo_762nato")
                    give_item(id,"ammo_762nato")
                    give_item(id,"ammo_762nato")
                    give_item(id,"ammo_762nato")
                    
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"WEAPONS_TE")
                    
                    if(get_cvar_num("write_log_file") == 1)
                        log_amx("%s use a Admin Cheats: Weapon(AK47)", User)
                }
                else
                {
                    give_item(id,"weapon_m4a1")
                    give_item(id,"ammo_556nato")
                    give_item(id,"ammo_556nato")
                    give_item(id,"ammo_556nato")
                    
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"WEAPONS_CT")
                    
                    if(get_cvar_num("write_log_file") == 1)
                        log_amx("%s use a Admin Cheats: Weapon(M4a1)", User)
                }
                
                give_item(id,"weapon_deagle")
                give_item(id,"weapon_knife")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"weapon_hegrenade")
                give_item(id,"weapon_flashbang")
                give_item(id,"weapon_flashbang")
                give_item(id,"weapon_smokegrenade")
                
                set_user_armor(id, 100)
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd")
        }
        case 1: { // 2
        
            if(is_user_alive(id))
            {
                strip_user_weapons(id) // No more weapons
                give_item(id,"weapon_awp")
                give_item(id,"ammo_338magnum")
                give_item(id,"ammo_338magnum")
                give_item(id,"ammo_338magnum")
                give_item(id,"weapon_deagle")
                give_item(id,"weapon_knife")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"ammo_50ae")
                give_item(id,"weapon_hegrenade")
                give_item(id,"weapon_flashbang")
                give_item(id,"weapon_flashbang")
                give_item(id,"weapon_smokegrenade")
                
                set_user_armor(id, 100)
                
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"AWP_MSG")
                
                if(get_cvar_num("write_log_file") == 1)
                    log_amx("%s use a Admin Cheats: Weapon(AWP)", User)
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd")
        }
        case 2: { // 3
            
            ExecuteHam(Ham_CS_RoundRespawn, id);
                
            set_user_armor(id, 100)
            set_user_godmode(id, 1)
            set_user_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal,30)
            
            set_task(5.0,"respawn", id)
            
            client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"RESPAWN_MSG")
            
            if(get_cvar_num("write_log_file") == 1)
                log_amx("%s use a Admin Cheats: Revive", User);
            
            client_cmd(id, "asd")
        }
        case 3: { // 4
            
            new money = cs_get_user_money(id);
            
            if(money < 16000)
            {
                cs_set_user_money(id, 16000);
                
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"MONEY_MSG")
                
                if(get_cvar_num("write_log_file") == 1)
                    log_amx("%s use a Admin Cheats: $16000", User)
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"ALREADY_MONEY")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd")
        }
        case 4: { // 5
        
            if(is_user_alive(id))
            {
                give_item(id, "weapon_hegrenade")
                give_item(id, "weapon_flashbang")
                give_item(id, "weapon_flashbang")
                give_item(id, "weapon_smokegrenade")
                
                set_user_armor(id, 100)
            
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"NADE_MSG")
                
                if(get_cvar_num("write_log_file") == 1)
                    log_amx("%s use a Admin Cheats: Nades", User);
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd")
        }
        case 5: { // 6
        
            if(is_user_alive(id))
            {
                set_user_armor(id, 255)
                set_user_health(id, 255)
                
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"HPAP_MSG")
                
                if(get_cvar_num("write_log_file") == 1)
                    log_amx("%s use a Admin Cheats: Health & Armor", User)
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd")
        }
        case 6: { // 7
            
            if(is_user_alive(id))
            {
                new ghost = get_user_noclip(id);
                
                if( ghost == 0 ) {
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"GHOST_ON_MSG")
                    set_user_noclip(id, 1);
                }else {
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"GHOST_OFF_MSG")
                    set_user_noclip(id, 0);
                }
                
                if(get_cvar_num("write_log_file") == 1)
                    log_amx("%s use a Admin Cheats: Noclip", User)
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd")
        }
        case 8: { // 9
            client_cmd(id, "asd2")
        }
        case 9: { // 0
            return PLUGIN_HANDLED;
        }
    }
    return PLUGIN_HANDLED
}

public ShowAdminMenu2(id) {
    if (get_user_flags(id) & ADMIN_ACCESS)
    {
        show_menu(id, Keysmenu_2, "Универсальная админка 2 стр.^n^n1. C4/МинерПакет^n2. Хамелеон^n3. Восстановление (+1HP/сек)^n4. Невидимость^n5. Тихий шаг (Вкл/Выкл)^n6. Рестарт(60сек)^n^n\r0. Назад", -1, "menu_2") // Display menu
    
        return PLUGIN_CONTINUE
    }
    else
    {
        client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"ACCES_MSG")
        
        return PLUGIN_HANDLED;
    }
}

public Pressedmenu_2(id, key) {
    
    new team[32], User[32];
    get_user_team(id,team,32);
    get_user_name(id,User,32);

    switch (key) {
        case 0: { // 1
            
            if(is_user_alive(id))
            {
                if(equal(team,"T", 1))
                {
                    give_item(id,"weapon_c4")
    
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"C4_MSG")
                    
                    if(get_cvar_num("write_log_file") == 1)
                        log_amx("%s use a Admin Cheats: Weapon(C4)", User)
                }
                else
                {
                    cs_set_user_defuse(id)
                    
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DEFUSEKIT_MSG")
                    
                    if(get_cvar_num("write_log_file") == 1)
                        log_amx("%s use a Admin Cheats: Weapon(Defusekit)", User)
                }
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd2")
        }
        case 1: { // 2

            if(is_user_alive(id))
            {
                if(chameleon[id][0] == 0)
                {
                    if(equal(team,"T", 1))
                    {
                        cs_set_user_model(id, "gign")
        
                        client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"CHAMELEON_MSG")
                        
                        if(get_cvar_num("write_log_file") == 1)
                            log_amx("%s use a Admin Cheats: Chameleon(CT)", User)
                    }
                    else
                    {
                        cs_set_user_model(id, "leet")
                        
                        client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"CHAMELEON_MSG")
                        
                        if(get_cvar_num("write_log_file") == 1)
                            log_amx("%s use a Admin Cheats: Chameleon(TE)", User)
                    }
                    
                    chameleon[id][0] = 1;
                }
                else
                {
                    cs_reset_user_model(id);
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"RESET_CHAMELEON_MSG")
                    chameleon[id][0] = 0;
                }
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd2")
        }
        case 2: { // 3
            
            if(is_user_alive(id))
            {
                new hp = get_user_health(id);
                
                if(hp < 100)
                {
                    set_task(1.0,"gyogyitas", id)
                
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"HP_REGEN_MSG")
                    
                    if(get_cvar_num("write_log_file") == 1)
                        log_amx("%s use a Admin Cheats: +1HP/s", User)
                }
                else
                {
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"HP_FULL_MSG", hp)
                    return PLUGIN_HANDLED;
                }
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
                        
            client_cmd(id, "asd2")
        }
        case 3: { // 4
        
            if(is_user_alive(id))
            {
                if(invisibility[id][0] == 0)
                {
                    set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,3);
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"FULL_INVISIBILITY_MSG")
                    invisibility[id][0] = 1;
                }
                else if(invisibility[id][0] == 1)
                {
                    set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,50);
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"INVISIBILITY_MSG")
                    invisibility[id][0] = 2;
                }
                else if(invisibility[id][0] == 2)
                {
                    set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"INVISIBILITY_OFF_MSG")
                    invisibility[id][0] = 0;
                }
                
                if(get_cvar_num("write_log_file") == 1)
                    log_amx("%s use a Admin Cheats: Invisibility", User)
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd2")
        }
        case 4: { // 5
            
            if(is_user_alive(id))
            {
                if(footsteps[id][0] == 0)
                {
                    set_user_footsteps(id, 1);
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"FOOTSTEPS_ON_MSG")
                    footsteps[id][0] = 1;
                }
                else
                {
                    set_user_footsteps(id, 0);
                    client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"FOOTSTEPS_OFF_MSG")
                    footsteps[id][0] = 0;
                }
                
                if(get_cvar_num("write_log_file") == 1)
                    log_amx("%s use a Admin Cheats: Footsteps (On/Off)", User)
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"DIED_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd2")
        }
        case 5: { // 6
            
            if(restart_event == false)
            {
                restart_event = true;
                
                set_task(0.1, "restart", 60);
            
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"RESTART_MSG")
                
                if(get_cvar_num("write_log_file") == 1)
                    log_amx("%s use a Admin Cheats: Round Restart", User)
            }
            else
            {
                client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"ALREADY_RUN_RESTART_MSG")
                return PLUGIN_HANDLED;
            }
            
            client_cmd(id, "asd2")
        }
        case 9: { // 0
            client_cmd(id, "asd")
        }
    }
    return PLUGIN_HANDLED;
}

/*----------------------------------------------!!!Fьggvйnyek!!!----------------------------------------------*/
public respawn(id) {
    
    set_user_godmode(id, 0);
    set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);

    return PLUGIN_CONTINUE;
}

public gyogyitas(id) {
    
    new hp = get_user_health(id);
    
    if(hp < 100)
    {
        set_user_health(id, hp + 1);
        set_task(1.0,"gyogyitas", id);
    }
    else
    {
        client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"HP_END_MSG", hp)
        return PLUGIN_HANDLED;
    }
    
    return PLUGIN_CONTINUE;
}

/*----------------------------------------------LЙZERKARD----------------------------------------------*/
public sqrt(num)
{
    new div = num;
    new result = 1;
    
    while (div > result)            // end when div == result, or just below
    {
        div = (div + result) / 2;    // take mean value as new divisor
        result = num / div;
    }
    
    return div;
}

public lightsaber(id[])
{           
    new vec[3];
    new aimvec[3];
    new lseffvec[3];
    new length;
    new speed = 65;
    get_user_origin(id[0],vec,1);
    get_user_origin(id[0],aimvec,2);
    lseffvec[0]=aimvec[0]-vec[0];
    lseffvec[1]=aimvec[1]-vec[1];
    lseffvec[2]=aimvec[2]-vec[2];
    length=sqrt(lseffvec[0]*lseffvec[0]+lseffvec[1]*lseffvec[1]+lseffvec[2]*lseffvec[2]);
    lseffvec[0]=lseffvec[0]*speed/length;
    lseffvec[1]=lseffvec[1]*speed/length;
    lseffvec[2]=lseffvec[2]*speed/length;

    new vorigin[3];
    new maxpl = get_maxplayers() +1;
    new teama[32],teamv[32];
    get_user_team(id[0],teama,31);
    
    for(new a = 1; a < maxpl; a++)
    {           
        if(is_user_alive(a) != 0)
        {
            get_user_origin(a,vorigin);
            if (get_distance(vec,vorigin)<100)
            {               
                if(a != id[0])
                {
                    get_user_team(a,teamv,31);
                    if(!equal(teama,teamv,2))
                    {
                        if(id[1] != 0)
                        {
                            user_kill(a,id[0]);
                            new frag = get_user_frags(id[0]);
                            set_user_frags(id[0], frag + 1);
                            
                            client_print(id[0], print_chat, "%s %L",g_Client, LANG_PLAYER,"JEDY_MSG")
                        }
                    }
                    else if(id[1] == 2)
                    {
                        user_kill(a,id[0]);
                        new frag = get_user_frags(id[0]);
                        set_user_frags(id[0], frag + 1);
                                                
                        client_print(id[0], print_chat, "%s %L",g_Client, LANG_PLAYER,"JEDY_MSG")
                    }                       
                }                       
            }
        }
    }

    // beam effect between point and entity
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY);
    write_byte ( 1 );                 //TE_BEAMENTPOINT 1 
    write_short (id[0]);             // ent
    write_coord (lseffvec[0]+vec[0]);    //end position
    write_coord (lseffvec[1]+vec[1]);
    write_coord (lseffvec[2]+vec[2]+10);
    write_short (sprSaber);          // sprite
    write_byte (0);                   // start frame
    write_byte (15);                  // frame rate in 0.1's
    write_byte (1);                 // byte (life in 0.1's
    write_byte (20);                  // line width in 0.1's
    write_byte (5);                  // noise amplitude in 0.01's
    write_byte (0);                   // RGB color
    write_byte (200);
    write_byte (0);
    write_byte (255);                 // brightness
    write_byte (10);                  // scroll speed in 0.1's
    message_end();
    
    return PLUGIN_CONTINUE;
}
/*----------------------------------------------LЙZERKARD-END------------------------------------------*/

public RoundEnd() {
    // MAx Player numb
    new maxplayers = get_maxplayers()+1;
    
    for(new id = 1; id < maxplayers; id++)
    {   
        if(chameleon[id][0] == 1)
        {
            cs_reset_user_model(id); // Ruha Reset
            chameleon[id][0] = 0;
            
            client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"RESET_CHAMELEON_MSG")
        }
        
        if(invisibility[id][0] >= 1)
        {
            set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);
            invisibility[id][0] = 0;
            
            client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"INVISIBILITY_OFF_MSG")
        }
        
        if(footsteps[id][0] == 1)
        {
            set_user_footsteps(id, 1); // Lepeshangok be!
            footsteps[id][0] = 0;
            
            client_print(id, print_chat, "%s %L",g_Client, LANG_PLAYER,"FOOTSTEPS_OFF_MSG")
        }
    }
    
    if(vibri_event == true)
    {
        new players[32], team[32], num, player;
        get_players(players, num, "ah")

        for(new i = 0; i < num; i++)
        {
            player = players[i];
            get_user_team(player,team,32);
        
            if(is_user_alive(player))
            {
                strip_user_weapons(player) // No more weapons
                
                if(equal(team,"T", 1))
                {
                    give_item(player,"weapon_ak47")
                    give_item(player,"ammo_762nato")
                    give_item(player,"ammo_762nato")
                    give_item(player,"ammo_762nato")
                    give_item(player,"ammo_762nato")
                }
                else
                {
                    give_item(player,"weapon_m4a1")
                    give_item(player,"ammo_556nato")
                    give_item(player,"ammo_556nato")
                    give_item(player,"ammo_556nato")
                }
            
                set_user_health(player, 100);
                set_user_armor(player, 100);
                
                give_item(player,"weapon_knife")
                give_item(player,"weapon_deagle")
                give_item(player,"ammo_50ae")
                give_item(player,"ammo_50ae")
                give_item(player,"ammo_50ae")
                give_item(player,"ammo_50ae")
                give_item(player,"ammo_50ae")
                give_item(player,"ammo_50ae")
                give_item(player,"ammo_50ae")
                give_item(player,"weapon_hegrenade")
                give_item(player,"weapon_flashbang")
                give_item(player,"weapon_flashbang")
                give_item(player,"weapon_smokegrenade")
                
            }
            
            set_user_rendering(player,kRenderFxNone,255,255,255, kRenderNormal,16);
        }
        
        vibri_event = false;
    }
}

public restart(count)
{
    set_hudmessage(_, _, _, -1.0, 0.85, 1)   
    show_hudmessage(0,"Внимание! Рестарт раунда через %d секунд", count)
    
    if((count <= 10) || (count % 10 == 0))
    {
        new szNum[32]
        num_to_word(count, szNum, 31)
        client_cmd(0, "spk ^"fvox/%s^"", szNum)
    }

    count--;
    
    if(count != 0)
    {
        set_task(1.0, "restart", count)  // Rekurziу
    }
    else
    {
        set_hudmessage(_, _, _, -1.0, -1.0, 1)
        show_hudmessage(0,"Внимание рестарт раунда!!!")
            
        server_cmd("sv_restart 1"); // Restart
        
        restart_event = false;

        client_cmd(0, ""); // Reset Sound
    }
    
    return PLUGIN_CONTINUE;
}

public shopmenu() {
    
    new players[32], name[32], num, player;
    get_players(players, num, "ah")

    for(new i = 0; i < num; i++)
    {
        player = players[i];
        get_user_name(player,name,32);

        new ShopmenuItem = random_num(0, 17);
        server_cmd("wc3_giveitem ^"%s^" %d", name, ShopmenuItem);
    }
}

public RandGlow() {

    new Red = random(256);
    new Green = random(256);
    new Blue = random(256);
    
    new players[32], num, player;
            
    get_players(players, num, "ah")
    
    for(new i = 0; i < num; i++)
    {
        player = players[i];
        set_user_rendering(player, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal,30)
    }
}
 

wellasgood

Кидала, мошенник, вымогатель
Сообщения
1,409
Реакции
182
Помог
2 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
255 это вроде где то в части указывания цвета наверно..
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу