#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <ColorChat>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#define PLUGIN "VIP Absolute"
#define VERSION "1.0"
#define AUTHOR "Aki_Lucky"
new awp_off = 8 // Со скольки человек доступно АВП у вип 0-отключить
new awp_text[32]
new players
new Round, X
new VipTime = 1800;
new map_pref[5]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /smenu", "smenu")
register_clcmd("say /vipmenu", "vipmenu")
register_clcmd("say /admmenu", "admmenu")
register_logevent("round_start",2,"1=Round_Start")
register_logevent("round_start",2,"1=Game_Commencing")
RegisterHam(Ham_Spawn, "player", "Spawn_cmd", 1)
RegisterHam(Ham_Killed, "player", "Deimos_Killed")
}
public round_start() {
Round++
if (X == 0){
get_mapname(map_pref,4)
if (equali(map_pref, "aim_") || equali(map_pref, "awp_") || equali(map_pref, "1hp_") || equali(map_pref, "35hp")){
X = 1;
}
else{
X = 2;
}
}
}
public round_restart(){
Round = 0;
X = 0;
}
public Spawn_cmd(id) {
if (X == 2){
if(get_user_flags(id) & ADMIN_LEVEL_H){
players = get_playersnum()
if (players < awp_off){
format(awp_text, 127, "\rAWP Доступно при онлайне %d+", awp_off)
vipmenu(id)
}
else{
format(awp_text, 127, "\wAWP + Deagle")
vipmenu(id)
}
}
else{
new vipaccess = read_flags("stq") // флаги вип
new mytime = get_user_time( id )
if( mytime > VipTime)
{
set_user_flags( id, vipaccess )
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 Вы получили VIP до конца карты за игру более 30минут!")
vipmenu(id)
}
else{
new sec = VipTime - mytime
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 Вы получите VIP через %d секунд!", sec)
}
}
return 1;
}
return 1;
}
public smenu(id) {
new i_Menu = menu_create("Server Menu by Aki_Lucky", "menu_smenu")
menu_additem(i_Menu, "\wКоманды играка", "1", 0)
menu_additem(i_Menu, "\wVIP Оружейка", "2", 0)
menu_additem(i_Menu, "\wМодель VIP игрока", "3", 0)
menu_additem(i_Menu, "\wAдмин меню", "4", 0)
menu_setprop(i_Menu, MPROP_NEXTNAME, "Далее");
menu_setprop(i_Menu, MPROP_BACKNAME, "Назад");
menu_setprop(i_Menu, MPROP_EXITNAME, "Выход");
menu_display(id, i_Menu, 0)
}
public menu_smenu(id, menu, item) {
if( item < 0 ) return PLUGIN_CONTINUE;
new cmd[3], access, callback;
menu_item_getinfo(menu, item, access, cmd,2,_,_, callback);
new Choise = str_to_num(cmd)
switch (Choise) {
case 1:{
servmenu(id)
}
case 2:{
vipmenu(id)
}
case 3: {
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 Данная функция пока не работает!")
}
case 4:{
admmenu(id)
}
}
return PLUGIN_HANDLED;
}
public servmenu(id) {
new i_Menu = menu_create("Server Menu by Aki_Lucky", "menu_servmenu")
menu_additem(i_Menu, "\wМой топ", "1", 0)
menu_additem(i_Menu, "\wОбнулить счет", "2", 0)
menu_additem(i_Menu, "\wRTV (смена карты)", "3", 0)
menu_additem(i_Menu, "\wVoteban", "4", 0)
menu_additem(i_Menu, "\wКогда я буду VIP?", "5", 0)
menu_setprop(i_Menu, MPROP_NEXTNAME, "Далее");
menu_setprop(i_Menu, MPROP_BACKNAME, "Назад");
menu_setprop(i_Menu, MPROP_EXITNAME, "Выход");
menu_display(id, i_Menu, 0)
}
public menu_servmenu(id, menu, item) {
if( item < 0 ) return PLUGIN_CONTINUE;
new cmd[3], access, callback;
menu_item_getinfo(menu, item, access, cmd,2,_,_, callback);
new Choise = str_to_num(cmd)
switch (Choise) {
case 1:{
return client_cmd(id, "say /rank")
}
case 2:{
return client_cmd(id, "say /rs")
}
case 3: {
return client_cmd(id, "say /rtv")
}
case 4:{
return client_cmd(id, "say /voteban")
}
case 5:{
if (X == 2){
if(get_user_flags(id) & ADMIN_LEVEL_H){
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 Вы уже получили VIP!")
}
else{
new mytime = get_user_time( id )
if( mytime < VipTime)
{
new sec = VipTime - mytime
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 Вы получите VIP через %d секунд!", sec)
}
else{
return 1;
}
}
}
else{
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 VIP меню на данной карте недоступно!")
}
}
}
return PLUGIN_HANDLED;
}
public vipmenu(id) {
if(get_user_flags(id) & ADMIN_LEVEL_H){
if (X == 2){
new i_Menu = menu_create("VIP Menu by Aki_Lucky", "menu_vipmenu")
menu_additem(i_Menu, "\wGALIL + Deagle", "1", 0)
menu_additem(i_Menu, "\wFAMAS + Deagle", "2", 0)
menu_additem(i_Menu, "\wM4A1 + Deagle", "3", 0)
menu_additem(i_Menu, "\wAK47 + Deagle", "4", 0)
menu_additem(i_Menu, "\wM249 + Deagle", "5", 0)
menu_additem(i_Menu, awp_text, "6", 0)
menu_setprop(i_Menu, MPROP_NEXTNAME, "Далее");
menu_setprop(i_Menu, MPROP_BACKNAME, "Назад");
menu_setprop(i_Menu, MPROP_EXITNAME, "Выход");
menu_display(id, i_Menu, 0)
}
else{
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 VIP меню на данной карте недоступно!")
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 Х = %d", X)
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 Round = %d", Round)
return 1;
}
}
else{
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 У вас недостаточно прав!")
return 1;
}
return 1;
}
public menu_vipmenu(id, menu, item) {
if( item < 0 ) return PLUGIN_CONTINUE;
new cmd[3], access, callback;
menu_item_getinfo(menu, item, access, cmd,2,_,_, callback);
new Choise = str_to_num(cmd)
switch (Choise) {
case 1:{
strip_user_weapons(id)
give_item( id, "weapon_galil" )
cs_set_user_bpammo( id, CSW_GALIL, 90)
give_item( id, "weapon_deagle" )
cs_set_user_bpammo( id, CSW_DEAGLE, 35)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
}
case 2:{
strip_user_weapons(id)
give_item( id, "weapon_famas" )
cs_set_user_bpammo( id, CSW_FAMAS, 90)
give_item( id, "weapon_deagle" )
cs_set_user_bpammo( id, CSW_DEAGLE, 35)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
}
case 3: {
strip_user_weapons(id)
give_item( id, "weapon_m4a1" )
cs_set_user_bpammo( id, CSW_M4A1, 90)
give_item( id, "weapon_deagle" )
cs_set_user_bpammo( id, CSW_DEAGLE, 35)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
}
case 4:{
strip_user_weapons(id)
give_item( id, "weapon_ak47" )
cs_set_user_bpammo( id, CSW_AK47, 90)
give_item( id, "weapon_deagle" )
cs_set_user_bpammo( id, CSW_DEAGLE, 35)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
}
case 5:{
strip_user_weapons(id)
give_item( id, "weapon_m249" )
cs_set_user_bpammo( id, CSW_M249, 90)
give_item( id, "weapon_deagle" )
cs_set_user_bpammo( id, CSW_DEAGLE, 35)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
}
case 6:{
if (players < awp_off){
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 На сервере недостаточно игроков!")
vipmenu(id)
}
else{
strip_user_weapons(id)
give_item( id, "weapon_awp" )
cs_set_user_bpammo( id, CSW_AWP, 90)
give_item( id, "weapon_deagle" )
cs_set_user_bpammo( id, CSW_DEAGLE, 35)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
}
}
}
return PLUGIN_HANDLED;
}
public admmenu(id) {
if(get_user_flags(id) & ADMIN_BAN){
new i_Menu = menu_create("Admin Menu by Aki_Lucky", "menu_admmenu")
menu_additem(i_Menu, "\wКикнуть игрока", "1", 0)
menu_additem(i_Menu, "\wЗабанить игрока", "2", 0)
menu_additem(i_Menu, "\wУдарить игрока", "3", 0)
menu_additem(i_Menu, "\wСмена карты [Голосование]", "4", 0)
menu_additem(i_Menu, "\wСменить команду игрока", "5", 0)
menu_additem(i_Menu, "\wЗаткнуть игрока", "6", 0)
menu_setprop(i_Menu, MPROP_NEXTNAME, "Далее");
menu_setprop(i_Menu, MPROP_BACKNAME, "Назад");
menu_setprop(i_Menu, MPROP_EXITNAME, "Выход");
menu_display(id, i_Menu, 0)
}
else{
ColorChat (id, RED, "^4[^3EOSCS.RU^4]^3 У вас недостаточно прав!")
return 1;
}
return 1;
}
public menu_admmenu(id, menu, item) {
if( item < 0 ) return PLUGIN_CONTINUE;
new cmd[3], access, callback;
menu_item_getinfo(menu, item, access, cmd,2,_,_, callback);
new Choise = str_to_num(cmd)
switch (Choise) {
case 1:{
return client_cmd(id, "amx_kickmenu")
}
case 2:{
return client_cmd(id, "amx_banmenu")
}
case 3: {
return client_cmd(id, "amx_slapmenu")
}
case 4: {
return client_cmd(id, "amx_votemapmenu")
}
case 5: {
return client_cmd(id, "amx_teammenu")
}
case 6: {
return client_cmd(id, "amx_gagmenu")
}
}
return PLUGIN_HANDLED;
}