#include #include #include #include #include #include #include #include #include #define NO_BULLET_WEAPONS_BITSUM ((1< 0) { for(x = 0 ; x < count ; x++) { len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"") if(len > 96 ) { print_message(user, message) len = format(message, 255, "%s ",COLOR) } } print_message(user, message) } else { len += format(message[len], 255-len, "No VIP online.") print_message(user, message) } get_cvar_string("amx_contactinfo", contact, 63) if(contact[0]) { format(contactinfo, 111, "%s VIP GameServer Info -- %s", COLOR, contact) print_message(user, contactinfo) } } print_message(id, msg[]) { message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id) write_byte(id) write_string(msg) message_end() } public UpdateRadar() { static bombOrigin[3], id; for (id = 1; id <= maxPlayers; id++) { if (user_has_weapon(id, CSW_C4)) { get_user_origin(id, bombOrigin); break; } } for (id = 1; id <= maxPlayers; id++) { if (HasVip[id] && (get_user_team(id) == 2) && is_user_alive(id) ) { message_begin(MSG_ONE_UNRELIABLE, msgidHostagePos, {0, 0, 0}, id); write_byte(id); write_byte(0); write_coord(bombOrigin[0]); write_coord(bombOrigin[1]); write_coord(bombOrigin[2]); message_end(); message_begin(MSG_ONE_UNRELIABLE, msgidHostageK, {0, 0, 0}, id); write_byte(0); message_end(); } } } public plugin_end( ) { nvault_close( gVault ) } public Say( id ) { if( get_pcvar_num( pVipOnly ) && !IsVip( id )) return PLUGIN_CONTINUE new Said[ 96 ] read_args( Said, 95 ) remove_quotes( Said ) if( Said[ 0 ] == '/' && Said[ 2 ] == 'i' && Said[ 1] == 'v' && Said[ 4 ] == 'm' ) { new Arg[ 64 ] strbreak( Said, Said, 95, Arg, 63 ) remove_quotes( Arg ) if( !Arg[ 0 ] ) { if( gMessage[ id ][ 0 ] ) PrintColor( id, "Your current Vips message is ^"%s^", to remove it type /vipmsg ^"remove^".", gMessage[ id ] ); else PrintColor( id, "You haven't set a Vips message yet. To do so, type /vipmsg ^"message^"." ); } else if( equali( Arg, "remove" ) ) { gMessage[ id ] = "" nvault_remove( gVault, gAuth[ id ] ) PrintColor( id, "Your Vip message was removed." ) } else { copy( gMessage[ id ], 63, Arg ) PrintColor( id, "Your Vip message has been set to ^"%s^"", Arg ) } } return PLUGIN_CONTINUE; } PrintColor( id, Text[ ], any:... ) { new Msg[ 191 ], Len = formatex( Msg, 190, "^x04%s^x01 ", TAG ) vformat( Msg[ Len ], 190 - Len, Text, 3 ) message_begin( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, gSayText, _, id ) write_byte( 1 ) write_string( Msg ) message_end( ) } public handleSayText(msgId,msgDest,msgEnt){ new id = get_msg_arg_int(1); if(!IsVip( id )) return PLUGIN_CONTINUE; new szTmp[256],szTmp2[256] get_msg_arg_string(2,szTmp, charsmax( szTmp ) ) new szPrefix[64] formatex(szPrefix,charsmax( szPrefix ),"^x04-%s-",gMessage[ id ]); if(!equal(szTmp,"#Cstrike_Chat_All")){ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2)," "); add(szTmp2,charsmax(szTmp2),szTmp); } else{ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 : %s2"); } set_msg_arg_string(2,szTmp2); return PLUGIN_CONTINUE; } /* Action That Will Show You The Menu */ public CmdMainMenu(id) { if(!(get_user_flags(id) && HasVip[id])) { Print(id, "you do not have access to use this menu"); } else { ShowMainMenu(id); } } /* The Main Menu */ ShowMainMenu(id) { static title[128]; formatex(title, sizeof(title) - 1, "\r[MY] \w-CS- Club Vip Panel\y v1.0^n\y - Main Menu"); new menu = menu_create(title, "MenuMain"); menu_additem(menu, "Slap", "1"); menu_additem(menu, "Slay^n", "2"); menu_additem(menu, "Kick Menu", "3"); menu_additem(menu, "Ban Menu^n", "4"); menu_display(id, menu); } public MenuMain(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return; } static _access, info[4], callback; menu_item_getinfo(menu, item, _access, info, sizeof(info) - 1, _, _, callback); menu_destroy(menu); switch( info[0] ) { case '1': { SlapMenu(id); } case '2': { SlayMenu(id); } case '3': { KickMenu(id); } case '4': { BanMenu(id); } } } /*Action for the Slap Menu*/ public SlapMenu(id) { new SlapPlayer = menu_create ("\r[MY] \w-CS- Club Vip Panel\y - Slap Menu", "HandleSlap") new num, players[32], tempid, szTempID [10], tempname [32] get_players (players, num, "a") for (new i = 0; i < num; i++) { tempid = players [ i ] get_user_name (tempid, tempname, 31) num_to_str (tempid, szTempID, 9) menu_additem (SlapPlayer, tempname, szTempID, 0) } menu_display (id, SlapPlayer) return PLUGIN_HANDLED } /*Action for the Slay Menu*/ public SlayMenu(id) { new SlayPlayer = menu_create ("\r[MY] \w-CS- Club Vip Panel\y - Slay Menu", "HandleSlay") new num, players[32], tempid, szTempID [10], tempname [32] get_players (players, num, "a") for (new i = 0; i < num; i++) { tempid = players [ i ] get_user_name (tempid, tempname, 31) num_to_str (tempid, szTempID, 9) menu_additem (SlayPlayer, tempname, szTempID, 0) } menu_display (id, SlayPlayer) return PLUGIN_HANDLED } /*Action for the Kick Menu*/ public KickMenu(id) { new KickPlayer = menu_create ("\r[MY] \w-CS- Club Vip Panel\y - Kick Menu", "HandleKick") new num, players[32], tempid, szTempID [10], tempname [32] get_players (players, num, "a") for (new i = 0; i < num; i++) { tempid = players [ i ] get_user_name(tempid, tempname, 31) num_to_str(tempid, szTempID, 9) menu_additem(KickPlayer, tempname, szTempID, 0) } menu_display (id, KickPlayer) return PLUGIN_HANDLED } /*Action for the Ban Menu*/ public BanMenu(id) { new BanPlayer = menu_create ("\r[MY] \w-CS- Club Vip Panel\y - Ban Menu", "HandleBan") new num, players[32], tempid, szTempID [10], tempname [32] get_players (players, num, "a") for (new i = 0; i < num; i++) { tempid = players [ i ] get_user_name(tempid, tempname, 31) num_to_str(tempid, szTempID, 9) menu_additem(BanPlayer, tempname, szTempID, 0) } menu_display (id, BanPlayer) return PLUGIN_HANDLED } /*HANDLES*/ /*The handle of the Slap Menu*/ public HandleSlap(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], name[64] new access, callback menu_item_getinfo (menu, item, access, data, 5, name, 63, callback) new tempid = str_to_num (data) get_user_name(id, szName, 32) get_user_name(tempid, szPlayerName, 32) Print(0, "%s^04 slapped^03 %s^04!", szName, szPlayerName); user_slap(tempid, 0) SlapMenu(id) return PLUGIN_CONTINUE } /*The handle of the Slay Menu*/ public HandleSlay(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], name[64] new access, callback menu_item_getinfo (menu, item, access, data, 5, name, 63, callback) new tempid = str_to_num (data) get_user_name(id, szName, 32) get_user_name(tempid, szPlayerName, 32) Print(0, "%s^04 slayed^03 %s^04!", szName, szPlayerName); user_silentkill(tempid) CmdMainMenu(id) return PLUGIN_CONTINUE } /*The handle of the Kick Menu*/ public HandleKick(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], name[64] new access, callback, UserID menu_item_getinfo (menu, item, access, data, 5, name, 63, callback) new tempid = str_to_num(data) get_user_name(id, szName, 32) get_user_name(tempid, szPlayerName, 32) UserID = get_user_userid(tempid) Print(0, "%s^04 kicked^03 %s^04!", szName, szPlayerName); server_cmd("kick ^"#%d^" ^"kicked by VIP^"", UserID) CmdMainMenu(id) return PLUGIN_CONTINUE } /*The handle of the Ban Menu*/ public HandleBan(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], name[64] new access, callback, UserID menu_item_getinfo (menu, item, access, data, 5, name, 63, callback) new tempid = str_to_num(data) get_user_name(id, szName, 32) get_user_name(tempid, szPlayerName, 32) UserID = get_user_userid(tempid) Print(0, "VIP:%s^04 banned^03 %s^04!", szName, szPlayerName); server_cmd("amx_ban ^"#%d^" ^"30^" ^"Banned by VIP ", UserID) CmdMainMenu(id) return PLUGIN_CONTINUE } Print(id, const szMessage[], any:...) { static szBuffer[192]; vformat(szBuffer, charsmax(szBuffer), szMessage, 3); ColorChat(id, TEAM_COLOR, "^04%s^03 %s", Prefix, szBuffer); } public TakeDamage(idvictim, idinflictor, idattacker, Float:damage, damagebits) { if (!is_user_alive(idattacker) || (get_user_team(idvictim) == get_user_team(idattacker))) { return; } if (HasVip[idattacker]) { set_hudmessage(180, 180, 180, 0.51, 0.51, 0, 6.0, 3.0, _, _, 3); show_hudmessage(idattacker, "%d", floatround(damage)); } }