как добавить випу в табло надпись VIP
САНЕК9055 Дата: Пятница, 01.03.2013, 18:27 | Сообщение # 1
Сообщения: 132
Награды: 1
Замечания:
как добавить випу в табло надпись VIP?Добавлено (01.03.2013, 18:27) --------------------------------------------- Как это сделать,подскажите пожалуйста
NooB2 Дата: Пятница, 01.03.2013, 18:44 | Сообщение # 2
Сообщения: 136
Награды: 2
Замечания:
Найди плагин любой вип и вытащи оттуда код
gamora2014 Дата: Пятница, 01.03.2013, 18:58 | Сообщение # 3
Сообщения: 77
Награды: 1
Замечания:
САНЕК9055 , в смысле в табло! где счет игроков?Добавлено (01.03.2013, 18:58) --------------------------------------------- Вот в этом Плагине есть такая вещица!
Код
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() { register_plugin("Admins are VIP's + grenades + kevlar", "1.0", "Eg@r4$il{") register_event("ResetHUD", "ResetHUD", "be") } public ResetHUD(id) { set_task(0.5, "VIP", id + 6910) } public VIP(TaskID) { new id = TaskID - 6910 if (is_user_admin(id)) { message_begin(MSG_ALL, get_user_msgid("ScoreAttrib")) write_byte(id) write_byte(4) message_end() give_item(id,"weapon_hegrenade") give_item(id,"weapon_flashbang") give_item(id,"weapon_flashbang") give_item(id,"weapon_smokegrenade") give_item(id,"item_assaultsuit") } return PLUGIN_HANDLED } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par } */
Не помню уже какой код!
NooB2 Дата: Пятница, 01.03.2013, 19:31 | Сообщение # 4
Сообщения: 136
Награды: 2
Замечания:
Код
message_begin(MSG_ALL, get_user_msgid("ScoreAttrib")) write_byte(id) write_byte(4) message_end()
САНЕК9055 Дата: Пятница, 01.03.2013, 21:05 | Сообщение # 5
Сообщения: 132
Награды: 1
Замечания:
#include <amxmodx> //#include <fakemeta> #include <cstrike> #include <fun> #include <hamsandwich> #include <engine> #define ACCESS_FLAG ADMIN_LEVEL_C #define keys (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<9) #define PREFIX "[Випка+админка]" #define fm_get_user_money(%1) get_pdata_int( %1, 115 ) #define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1)) new usersilent[33] enum Color { NORMAL = 1, // clients scr_concolor cvar color GREEN, // Green TEAM_COLOR, // Red, grey, blue GREY, // grey RED, // Red BLUE, // Blue }; new TeamName[][] = { "", "TERRORIST", "CT", "SPECTATOR" }; new s_Menu[] = "\rМеню админа^n^n\r1.\w Воскреснуть \d(1 раз в 2 раунда)^n\r2.\w Комплект гранат \d(1 раз в 1 раунда)^n\r3.\w Взять деньги 5000$ \d(1 раз в 1 раунд)^n\r4.\w Взять калаш \d(1 раз в 1 раунда)^n\r5.\w Взять м4а1 \d(1раз в раунд)^n\r6.\w взять авп \d(1 раз в раунд)^n\^n\r0.\w Выход" new rounddelay[33][10], mxplr new items[][]= { "воскресился", "взял комплект гранат", "Взял деньги", "взял калаш", "взял м4а1", "взял авп", "дигл" } public plugin_init() { register_plugin("SuperMenu", "1.0", "Diamond") register_dictionary("acm.txt") register_cvar("acm_logfile", "0") register_logevent("round_end", 2, "0=World triggered", "1=Round_End") register_clcmd("supermenu", "showMenu", ACCESS_FLAG, "- Открыть Супер Меню.") register_menucmd(register_menuid("menu"), keys, "actionMenu") mxplr = get_maxplayers() register_event("DeathMsg", "eDeath", "a"); } public client_connect( id ) { usersilent [id]= 0; } public client_disconnect( id ) { usersilent [id]= 0; } // User Death event public eDeath( id ) { new victem = read_data(2); usersilent [victem]= 0; } public round_end() { static id, k for(id = 0; id < mxplr; id++) { if(!is_user_connected(id)) continue for(k = 0; k < 10;k++) { if(rounddelay[id] [k]> 0) { rounddelay[id][k]-- } } } } public showMenu(id) { if(get_user_flags(id) & ACCESS_FLAG) { show_menu(id, keys, s_Menu, -1, "menu") } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ACCESS_MSG") } return PLUGIN_HANDLED } public actionMenu(id, key) { new user[32] get_user_name(id, user, 31) if(rounddelay[id] [key]> 0) { client_print(id, print_chat, "Подождите %d раунда!", rounddelay[id][key]) return PLUGIN_HANDLED } switch(key) { case 0: { ExecuteHam(Ham_CS_RoundRespawn, id) set_user_health(id, 100) set_user_godmode(id, 0) set_user_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, 30) set_task(0.0, "respawn", id) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "RESPAWN_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s воскресил себя.", PREFIX, user) } rounddelay[id] [key]= 2 } case 1: { if(is_user_alive(id)) { give_item(id, "weapon_flashbang") give_item(id, "weapon_flashbang") give_item(id, "weapon_hegrenade") give_item(id, "weapon_smokegrenade") client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "NADE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе гранаты.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 2: { if(is_user_alive(id)) { new money = cs_get_user_money(id) if( money < 16000) { cs_set_user_money (id, 5000, 1) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "MONEY_MSG") } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "MONEY_ERROR_MSG") } if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s сделал себе 5000$", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 3: { if(is_user_alive(id)) { give_item(id, "weapon_ak47") cs_set_user_bpammo( id , CSW_AK47, 90 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе калаш.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 4: { if(is_user_alive(id)) { give_item(id, "weapon_m4a1") cs_set_user_bpammo( id , CSW_M4A1, 90 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе m4a1.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 5: { if(is_user_alive(id)) { give_item(id, "weapon_awp") cs_set_user_bpammo( id , CSW_AWP, 30 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе AWP.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 6: { if(is_user_alive(id)) { give_item(id, "weapon_deagle") cs_set_user_bpammo( id , CSW_DEAGLE, 28 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе deagle.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 9: { return PLUGIN_HANDLED } } if(key != 9) { //client_print(0, print_chat, "[Випка+админка]:Админ %s %s", user, items[key]) ColorChat(0, BLUE, "^x04[VIP]^x01 Админ^x04 %s ^x01 %s", user, items[key]) } return PLUGIN_CONTINUE } public client_PreThink(id) { if(is_user_alive(id)) { if(usersilent [id]== 1) { new oldbuttons = get_user_oldbutton(id); oldbuttons &= ~IN_JUMP; entity_set_int(id, EV_INT_oldbuttons, oldbuttons); } } } public respawn(id) { set_user_godmode(id, 0) set_user_rendering(id, kRenderFxNone, 255, 255, 255, kRenderNormal, 16) return PLUGIN_CONTINUE } // ColorChat - Start ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...) { new message[256]; switch(type) { case NORMAL: message[0] = 0x01; case GREEN: message[0] = 0x04; default: message[0] = 0x03; } vformat(message[1], 251, msg, 4); // Make sure message is not longer than 192 character. Will crash the server. message[192] = '^0'; new team, ColorChange, index, MSG_Type; if(id) { MSG_Type = MSG_ONE; index = id; } else { index = FindPlayer(); MSG_Type = MSG_ALL; } team = get_user_team(index); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if(ColorChange) Team_Info(index, MSG_Type, TeamName[team]); } ShowColorMessage(id, type, message[]) { static bool:saytext_used; static get_user_msgid_saytext; if(!saytext_used) { get_user_msgid_saytext = get_user_msgid("SayText"); saytext_used = true; } message_begin(type, get_user_msgid_saytext, _, id); write_byte(id); write_string(message); message_end(); } Team_Info(id, type, team[]) { static bool:teaminfo_used; static get_user_msgid_teaminfo; if(!teaminfo_used) { get_user_msgid_teaminfo = get_user_msgid("TeamInfo"); teaminfo_used = true; } message_begin(type, get_user_msgid_teaminfo, _, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type) { switch(Type) { case RED: return Team_Info(index, type, TeamName[1]); case BLUE: return Team_Info(index, type, TeamName[2]); case GREY: return Team_Info(index, type, TeamName[0]); } return 0; } FindPlayer(){ new i = -1; while(i <= get_maxplayers()) if(is_user_connected(++i)) return i; return -1; }
куда ее вставить,никак не получается
gamora2014 Дата: Пятница, 01.03.2013, 21:15 | Сообщение # 6
Сообщения: 77
Награды: 1
Замечания:
Код
#include <amxmodx> //#include <fakemeta> #include <cstrike> #include <fun> #include <hamsandwich> #include <engine> #define ACCESS_FLAG ADMIN_LEVEL_C #define keys (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<9) #define PREFIX "[Випка+админка]" #define fm_get_user_money(%1) get_pdata_int( %1, 115 ) #define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1)) new usersilent[33] enum Color { NORMAL = 1, // clients scr_concolor cvar color GREEN, // Green TEAM_COLOR, // Red, grey, blue GREY, // grey RED, // Red BLUE, // Blue }; new TeamName[][] = { "", "TERRORIST", "CT", "SPECTATOR" }; new s_Menu[] = "\rМеню админа^n^n\r1.\w Воскреснуть \d(1 раз в 2 раунда)^n \r2.\w Комплект гранат \d(1 раз в 1 раунда)^n\r3.\w Взять деньги 5000$ \d (1 раз в 1 раунд)^n\r4.\w Взять калаш \d(1 раз в 1 раунда)^n\r5.\w Взять м4а1 \d(1раз в раунд)^n\r6.\w взять авп \d(1 раз в раунд)^n\^n\r0.\w Выход" new rounddelay[33][10], mxplr new items[][]= { "воскресился", "взял комплект гранат", "Взял деньги", "взял калаш", "взял м4а1", "взял авп", "дигл" } public plugin_init() { register_plugin("SuperMenu", "1.0", "Diamond") register_dictionary("acm.txt") register_cvar("acm_logfile", "0") register_logevent("round_end", 2, "0=World triggered", "1=Round_End") register_clcmd("supermenu", "showMenu", ACCESS_FLAG, "- Открыть Супер Меню.") register_menucmd(register_menuid("menu"), keys, "actionMenu") mxplr = get_maxplayers() register_event("DeathMsg", "eDeath", "a"); register_event("ResetHUD", "ResetHUD", "be") } public client_connect( id ) { usersilent [id]= 0; } public ResetHUD(id) { set_task(0.5, "VIP", id + 6910) } public VIP(TaskID) { new id = TaskID - 6910 if (is_user_admin(id)) { message_begin(MSG_ALL, get_user_msgid("ScoreAttrib")) write_byte(id) write_byte(4) message_end() } return PLUGIN_HANDLED } public client_disconnect( id ) { usersilent [id]= 0; } // User Death event public eDeath( id ) { new victem = read_data(2); usersilent [victem]= 0; } public round_end() { static id, k for(id = 0; id < mxplr; id++) { if(!is_user_connected(id)) continue for(k = 0; k < 10;k++) { if(rounddelay [id][k]> 0) { rounddelay[id][k]-- } } } } public showMenu(id) { if(get_user_flags(id) & ACCESS_FLAG) { show_menu(id, keys, s_Menu, -1, "menu") } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ACCESS_MSG") } return PLUGIN_HANDLED } public actionMenu(id, key) { new user[32] get_user_name(id, user, 31) if(rounddelay [id][key]> 0) { client_print(id, print_chat, "Подождите %d раунда!", rounddelay[id][key]) return PLUGIN_HANDLED } switch(key) { case 0: { ExecuteHam(Ham_CS_RoundRespawn, id) set_user_health(id, 100) set_user_godmode(id, 0) set_user_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, 30) set_task(0.0, "respawn", id) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "RESPAWN_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s воскресил себя.", PREFIX, user) } rounddelay [id][key]= 2 } case 1: { if(is_user_alive(id)) { give_item(id, "weapon_flashbang") give_item(id, "weapon_flashbang") give_item(id, "weapon_hegrenade") give_item(id, "weapon_smokegrenade") client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "NADE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе гранаты.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay [id][key]= 1 client_cmd(id, "supermenu") } case 2: { if(is_user_alive(id)) { new money = cs_get_user_money(id) if( money < 16000) { cs_set_user_money (id, 5000, 1) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "MONEY_MSG") } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "MONEY_ERROR_MSG") } if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s сделал себе 5000$", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay [id][key]= 1 client_cmd(id, "supermenu") } case 3: { if(is_user_alive(id)) { give_item(id, "weapon_ak47") cs_set_user_bpammo( id , CSW_AK47, 90 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе калаш.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay [id][key]= 1 client_cmd(id, "supermenu") } case 4: { if(is_user_alive(id)) { give_item(id, "weapon_m4a1") cs_set_user_bpammo( id , CSW_M4A1, 90 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе m4a1.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay [id][key]= 1 client_cmd(id, "supermenu") } case 5: { if(is_user_alive(id)) { give_item(id, "weapon_awp") cs_set_user_bpammo( id , CSW_AWP, 30 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе AWP.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay [id][key]= 1 client_cmd(id, "supermenu") } case 6: { if(is_user_alive(id)) { give_item(id, "weapon_deagle") cs_set_user_bpammo( id , CSW_DEAGLE, 28 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе deagle.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay [id][key]= 1 client_cmd(id, "supermenu") } case 9: { return PLUGIN_HANDLED } } if(key != 9) { //client_print(0, print_chat, "[Випка+админка]:Админ %s %s", user, items[key]) ColorChat(0, BLUE, "^x04[VIP]^x01 Админ^x04 %s ^x01 %s", user, items[key]) } return PLUGIN_CONTINUE } public client_PreThink(id) { if(is_user_alive(id)) { if(usersilent [id]== 1) { new oldbuttons = get_user_oldbutton(id); oldbuttons &= ~IN_JUMP; entity_set_int(id, EV_INT_oldbuttons, oldbuttons); } } } public respawn(id) { set_user_godmode(id, 0) set_user_rendering(id, kRenderFxNone, 255, 255, 255, kRenderNormal, 16) return PLUGIN_CONTINUE } // ColorChat - Start ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...) { new message[256]; switch(type) { case NORMAL: message[0] = 0x01; case GREEN: message[0] = 0x04; default: message[0] = 0x03; } vformat(message[1], 251, msg, 4); // Make sure message is not longer than 192 character. Will crash the server. message[192] = '^0'; new team, ColorChange, index, MSG_Type; if(id) { MSG_Type = MSG_ONE; index = id; } else { index = FindPlayer(); MSG_Type = MSG_ALL; } team = get_user_team(index); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if(ColorChange) Team_Info(index, MSG_Type, TeamName[team]); } ShowColorMessage(id, type, message[]) { static bool:saytext_used; static get_user_msgid_saytext; if(!saytext_used) { get_user_msgid_saytext = get_user_msgid("SayText"); saytext_used = true; } message_begin(type, get_user_msgid_saytext, _, id); write_byte(id); write_string(message); message_end(); } Team_Info(id, type, team[]) { static bool:teaminfo_used; static get_user_msgid_teaminfo; if(!teaminfo_used) { get_user_msgid_teaminfo = get_user_msgid("TeamInfo"); teaminfo_used = true; } message_begin(type, get_user_msgid_teaminfo, _, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type) { switch(Type) { case RED: return Team_Info(index, type, TeamName[1]); case BLUE: return Team_Info(index, type, TeamName[2]); case GREY: return Team_Info(index, type, TeamName[0]); } return 0; } FindPlayer(){ new i = -1; while(i <= get_maxplayers()) if(is_user_connected(++i)) return i; return -1; }
Пробуй так! я сам не проверял!
САНЕК9055 Дата: Пятница, 01.03.2013, 21:23 | Сообщение # 7
Сообщения: 132
Награды: 1
Замечания:
gamora2014 , не компилит 3-4 ошибки
NooB2 Дата: Пятница, 01.03.2013, 21:48 | Сообщение # 8
Сообщения: 136
Награды: 2
Замечания:
Держи
Код
#include <amxmodx> //#include <fakemeta> #include <cstrike> #include <fun> #include <hamsandwich> #include <engine> #define ACCESS_FLAG ADMIN_LEVEL_C #define keys (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<9) #define PREFIX "[Випка+админка]" #define fm_get_user_money(%1) get_pdata_int( %1, 115 ) #define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1)) new usersilent[33] enum Color { NORMAL = 1, // clients scr_concolor cvar color GREEN, // Green TEAM_COLOR, // Red, grey, blue GREY, // grey RED, // Red BLUE, // Blue }; new TeamName[][] = { "", "TERRORIST", "CT", "SPECTATOR" }; new s_Menu[] = "\rМеню админа^n^n\r1.\w Воскреснуть \d(1 раз в 2 раунда)^n\r2.\w Комплект гранат \d(1 раз в 1 раунда)^n\r3.\w Взять деньги 5000$ \d(1 раз в 1 раунд)^n\r4.\w Взять калаш \d(1 раз в 1 раунда)^n\r5.\w Взять м4а1 \d(1раз в раунд)^n\r6.\w взять авп \d(1 раз в раунд)^n\^n\r0.\w Выход" new rounddelay[33][10], mxplr new items[][]= { "воскресился", "взял комплект гранат", "Взял деньги", "взял калаш", "взял м4а1", "взял авп", "дигл" } public plugin_init() { register_plugin("SuperMenu", "1.0", "Diamond") register_dictionary("acm.txt") register_cvar("acm_logfile", "0") register_logevent("round_end", 2, "0=World triggered", "1=Round_End") register_clcmd("supermenu", "showMenu", ACCESS_FLAG, "- Открыть Супер Меню.") register_menucmd(register_menuid("menu"), keys, "actionMenu") mxplr = get_maxplayers() register_event("DeathMsg", "eDeath", "a"); register_event("ResetHUD", "ResetHUD", "be") } public client_connect( id ) { usersilent [id]= 0; } public ResetHUD(id) { set_task(0.5, "VIP", id + 6910) } public VIP(TaskID) { new id = TaskID - 6910 if(get_user_flags(id) & ACCESS_FLAG) { message_begin(MSG_ALL, get_user_msgid("ScoreAttrib")) write_byte(id) write_byte(4) message_end() } return PLUGIN_HANDLED } public client_disconnect( id ) { usersilent [id]= 0; } // User Death event public eDeath( id ) { new victem = read_data(2); usersilent [victem]= 0; } public round_end() { static id, k for(id = 0; id < mxplr; id++) { if(!is_user_connected(id)) continue for(k = 0; k < 10;k++) { if(rounddelay[id] [k]> 0) { rounddelay[id][k]-- } } } } public showMenu(id) { if(get_user_flags(id) & ACCESS_FLAG) { show_menu(id, keys, s_Menu, -1, "menu") } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ACCESS_MSG") } return PLUGIN_HANDLED } public actionMenu(id, key) { new user[32] get_user_name(id, user, 31) if(rounddelay[id] [key]> 0) { client_print(id, print_chat, "Подождите %d раунда!", rounddelay[id][key]) return PLUGIN_HANDLED } switch(key) { case 0: { ExecuteHam(Ham_CS_RoundRespawn, id) set_user_health(id, 100) set_user_godmode(id, 0) set_user_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, 30) set_task(0.0, "respawn", id) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "RESPAWN_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s воскресил себя.", PREFIX, user) } rounddelay[id] [key]= 2 } case 1: { if(is_user_alive(id)) { give_item(id, "weapon_flashbang") give_item(id, "weapon_flashbang") give_item(id, "weapon_hegrenade") give_item(id, "weapon_smokegrenade") client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "NADE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе гранаты.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 2: { if(is_user_alive(id)) { new money = cs_get_user_money(id) if( money < 16000) { cs_set_user_money (id, 5000, 1) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "MONEY_MSG") } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "MONEY_ERROR_MSG") } if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s сделал себе 5000$", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 3: { if(is_user_alive(id)) { give_item(id, "weapon_ak47") cs_set_user_bpammo( id , CSW_AK47, 90 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе калаш.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 4: { if(is_user_alive(id)) { give_item(id, "weapon_m4a1") cs_set_user_bpammo( id , CSW_M4A1, 90 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе m4a1.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 5: { if(is_user_alive(id)) { give_item(id, "weapon_awp") cs_set_user_bpammo( id , CSW_AWP, 30 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе AWP.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 6: { if(is_user_alive(id)) { give_item(id, "weapon_deagle") cs_set_user_bpammo( id , CSW_DEAGLE, 28 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе deagle.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 9: { return PLUGIN_HANDLED } } if(key != 9) { //client_print(0, print_chat, "[Випка+админка]:Админ %s %s", user, items[key]) ColorChat(0, BLUE, "^x04[VIP]^x01 Админ^x04 %s ^x01 %s", user, items[key]) } return PLUGIN_CONTINUE } public client_PreThink(id) { if(is_user_alive(id)) { if(usersilent [id]== 1) { new oldbuttons = get_user_oldbutton(id); oldbuttons &= ~IN_JUMP; entity_set_int(id, EV_INT_oldbuttons, oldbuttons); } } } public respawn(id) { set_user_godmode(id, 0) set_user_rendering(id, kRenderFxNone, 255, 255, 255, kRenderNormal, 16) return PLUGIN_CONTINUE } // ColorChat - Start ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...) { new message[256]; switch(type) { case NORMAL: message[0] = 0x01; case GREEN: message[0] = 0x04; default: message[0] = 0x03; } vformat(message[1], 251, msg, 4); // Make sure message is not longer than 192 character. Will crash the server. message[192] = '^0'; new team, ColorChange, index, MSG_Type; if(id) { MSG_Type = MSG_ONE; index = id; } else { index = FindPlayer(); MSG_Type = MSG_ALL; } team = get_user_team(index); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if(ColorChange) Team_Info(index, MSG_Type, TeamName[team]); } ShowColorMessage(id, type, message[]) { static bool:saytext_used; static get_user_msgid_saytext; if(!saytext_used) { get_user_msgid_saytext = get_user_msgid("SayText"); saytext_used = true; } message_begin(type, get_user_msgid_saytext, _, id); write_byte(id); write_string(message); message_end(); } Team_Info(id, type, team[]) { static bool:teaminfo_used; static get_user_msgid_teaminfo; if(!teaminfo_used) { get_user_msgid_teaminfo = get_user_msgid("TeamInfo"); teaminfo_used = true; } message_begin(type, get_user_msgid_teaminfo, _, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type) { switch(Type) { case RED: return Team_Info(index, type, TeamName[1]); case BLUE: return Team_Info(index, type, TeamName[2]); case GREY: return Team_Info(index, type, TeamName[0]); } return 0; } FindPlayer(){ new i = -1; while(i <= get_maxplayers()) if(is_user_connected(++i)) return i; return -1; }
gamora2014 Дата: Пятница, 01.03.2013, 22:15 | Сообщение # 9
Сообщения: 77
Награды: 1
Замечания:
NooB2 , Вроде как я также ему дал код!Добавлено (01.03.2013, 22:15) ---------------------------------------------САНЕК9055 , Ошибки покажи ! скрин!
NooB2 Дата: Пятница, 01.03.2013, 22:44 | Сообщение # 10
Сообщения: 136
Награды: 2
Замечания:
gamora2014 , другой ты ему дал, там была не известная функция
gamora2014 Дата: Пятница, 01.03.2013, 23:37 | Сообщение # 11
Сообщения: 77
Награды: 1
Замечания:
NooB2 , А да точно!
САНЕК9055 Дата: Суббота, 02.03.2013, 14:33 | Сообщение # 12
Сообщения: 132
Награды: 1
Замечания:
Как правильно?
kica Дата: Суббота, 02.03.2013, 18:33 | Сообщение # 13
Сообщения: 216
Награды: 3
Замечания:
САНЕК9055 , вот правельно
Код
#include <amxmodx> //#include <fakemeta> #include <cstrike> #include <fun> #include <hamsandwich> #include <engine> #define ACCESS_FLAG ADMIN_LEVEL_C #define keys (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<9) #define PREFIX "[Випка+админка]" #define fm_get_user_money(%1) get_pdata_int( %1, 115 ) #define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1)) new usersilent[33] enum Color { NORMAL = 1, // clients scr_concolor cvar color GREEN, // Green TEAM_COLOR, // Red, grey, blue GREY, // grey RED, // Red BLUE, // Blue }; new TeamName[][] = { "", "TERRORIST", "CT", "SPECTATOR" }; new s_Menu[] = "\rМеню админа^n^n\r1.\w Воскреснуть \d(1 раз в 2 раунда)^n\r2.\w Комплект гранат \d(1 раз в 1 раунда)^n\r3.\w Взять деньги 5000$ \d(1 раз в 1 раунд)^n\r4.\w Взять калаш \d(1 раз в 1 раунда)^n\r5.\w Взять м4а1 \d(1раз в раунд)^n\r6.\w взять авп \d(1 раз в раунд)^n\^n\r0.\w Выход" new rounddelay[33][10], mxplr new items[][]= { "воскресился", "взял комплект гранат", "Взял деньги", "взял калаш", "взял м4а1", "взял авп", "дигл" } public plugin_init() { register_plugin("SuperMenu", "1.0", "Diamond") register_dictionary("acm.txt") register_cvar("acm_logfile", "0") register_logevent("round_end", 2, "0=World triggered", "1=Round_End") register_clcmd("supermenu", "showMenu", ACCESS_FLAG, "- Открыть Супер Меню.") register_menucmd(register_menuid("menu"), keys, "actionMenu") mxplr = get_maxplayers() register_event("DeathMsg", "eDeath", "a"); register_event("ResetHUD", "ResetHUD", "be") } public client_connect( id ) { usersilent [id]= 0; } public ResetHUD(id) { set_task(0.5, "VIP", id + 6910) } public VIP(TaskID) { new id = TaskID - 6910 if(get_user_flags(id) & ACCESS_FLAG) { message_begin(MSG_ALL, get_user_msgid("ScoreAttrib")) write_byte(id) write_byte(4) message_end() } return PLUGIN_HANDLED } public client_disconnect( id ) { usersilent [id]= 0; } // User Death event public eDeath( id ) { new victem = read_data(2); usersilent [victem]= 0; } public round_end() { static id, k for(id = 0; id < mxplr; id++) { if(!is_user_connected(id)) continue for(k = 0; k < 10;k++) { if(rounddelay[id] [k]> 0) { rounddelay[id][k]-- } } } } public showMenu(id) { if(get_user_flags(id) & ACCESS_FLAG) { show_menu(id, keys, s_Menu, -1, "menu") } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ACCESS_MSG") } return PLUGIN_HANDLED } public actionMenu(id, key) { new user[32] get_user_name(id, user, 31) if(rounddelay[id] [key]> 0) { client_print(id, print_chat, "Подождите %d раунда!", rounddelay[id][key]) return PLUGIN_HANDLED } switch(key) { case 0: { ExecuteHam(Ham_CS_RoundRespawn, id) set_user_health(id, 100) set_user_godmode(id, 0) set_user_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, 30) set_task(0.0, "respawn", id) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "RESPAWN_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s воскресил себя.", PREFIX, user) } rounddelay[id] [key]= 2 } case 1: { if(is_user_alive(id)) { give_item(id, "weapon_flashbang") give_item(id, "weapon_flashbang") give_item(id, "weapon_hegrenade") give_item(id, "weapon_smokegrenade") client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "NADE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе гранаты.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 2: { if(is_user_alive(id)) { new money = cs_get_user_money(id) if( money < 16000) { cs_set_user_money (id, 5000, 1) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "MONEY_MSG") } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "MONEY_ERROR_MSG") } if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s сделал себе 5000$", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 3: { if(is_user_alive(id)) { give_item(id, "weapon_ak47") cs_set_user_bpammo( id , CSW_AK47, 90 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе калаш.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 4: { if(is_user_alive(id)) { give_item(id, "weapon_m4a1") cs_set_user_bpammo( id , CSW_M4A1, 90 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе m4a1.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 5: { if(is_user_alive(id)) { give_item(id, "weapon_awp") cs_set_user_bpammo( id , CSW_AWP, 30 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе AWP.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 6: { if(is_user_alive(id)) { give_item(id, "weapon_deagle") cs_set_user_bpammo( id , CSW_DEAGLE, 28 ) client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "ORYGHIE_MSG") if(get_cvar_num("acm_logfile") == 1) { log_amx("%s %s выдал себе deagle.", PREFIX, user) } } else { client_print(id, print_chat, "%s %L", PREFIX, LANG_SERVER, "DIED_MSG") } rounddelay[id] [key]= 1 client_cmd(id, "supermenu") } case 9: { return PLUGIN_HANDLED } } if(key != 9) { //client_print(0, print_chat, "[Випка+админка]:Админ %s %s", user, items[key]) ColorChat(0, BLUE, "^x04[VIP]^x01 Админ^x04 %s ^x01 %s", user, items[key]) } return PLUGIN_CONTINUE } public client_PreThink(id) { if(is_user_alive(id)) { if(usersilent [id]== 1) { new oldbuttons = get_user_oldbutton(id); oldbuttons &= ~IN_JUMP; entity_set_int(id, EV_INT_oldbuttons, oldbuttons); } } } public respawn(id) { set_user_godmode(id, 0) set_user_rendering(id, kRenderFxNone, 255, 255, 255, kRenderNormal, 16) return PLUGIN_CONTINUE } // ColorChat - Start ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...) { new message[256]; switch(type) { case NORMAL: message[0] = 0x01; case GREEN: message[0] = 0x04; default: message[0] = 0x03; } vformat(message[1], 251, msg, 4); // Make sure message is not longer than 192 character. Will crash the server. message[192] = '^0'; new team, ColorChange, index, MSG_Type; if(id) { MSG_Type = MSG_ONE; index = id; } else { index = FindPlayer(); MSG_Type = MSG_ALL; } team = get_user_team(index); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if(ColorChange) Team_Info(index, MSG_Type, TeamName[team]); } ShowColorMessage(id, type, message[]) { static bool:saytext_used; static get_user_msgid_saytext; if(!saytext_used) { get_user_msgid_saytext = get_user_msgid("SayText"); saytext_used = true; } message_begin(type, get_user_msgid_saytext, _, id); write_byte(id); write_string(message); message_end(); } Team_Info(id, type, team[]) { static bool:teaminfo_used; static get_user_msgid_teaminfo; if(!teaminfo_used) { get_user_msgid_teaminfo = get_user_msgid("TeamInfo"); teaminfo_used = true; } message_begin(type, get_user_msgid_teaminfo, _, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type) { switch(Type) { case RED: return Team_Info(index, type, TeamName[1]); case BLUE: return Team_Info(index, type, TeamName[2]); case GREY: return Team_Info(index, type, TeamName[0]); } return 0; } FindPlayer(){ new i = -1; while(i <= get_maxplayers()) if(is_user_connected(++i)) return i; return -1; }
САНЕК9055 Дата: Воскресенье, 03.03.2013, 10:25 | Сообщение # 14
Сообщения: 132
Награды: 1
Замечания:
Спасибо киска)
gamora2014 Дата: Воскресенье, 03.03.2013, 12:51 | Сообщение # 15
Сообщения: 77
Награды: 1
Замечания:
САНЕК9055 ,
САНЕК9055 Дата: Вторник, 05.03.2013, 19:38 | Сообщение # 16
Сообщения: 132
Награды: 1
Замечания:
gamora2014 , )) Но опять же,не помогло((