GERTERsasha | Дата: Пятница, 2012-09-21, 16:18 | Сообщение # 1 |
Сообщений: 20
| Как сделать что бы когда VIP что то берёт из вип меню, посылалось сообщение в чат + цветное а не просто желтое! Вот меню:
#include <amxmodx> #include <fun> #include <cstrike> #include <engine> #include <fakemeta> #include <hamsandwich>
#define PLUGINAME "VIP_MENU" #define VERSION "0.1" #define AUTHOR "ozon"
#define DEF_TRAIL_LIFE 2 #define MAX_DISTANCE 200 #define MAX_PLAYERS 32 #define NUM_SPRITES 1 #define TASKID 1337 #define TICK 0.1
new onoff[33] new offon[33] new off[33] new on[33] new tra[33] new ren[33] new gondon[33]
public plugin_init() { register_clcmd( "vip_menu", "vipmenu_new" ) register_clcmd( "say /vipmenu", "vipmenu_new" ) }
public vipmenu_new(id) { if(get_user_flags(id) & ADMIN_LEVEL_H) { new new_menu = menu_create( "\rVIP Меню ^n\dby CaH9", "menu_admin" ) if(!onoff[id]) { menu_additem( new_menu,"200 ХП\d: \rВыкл ", "1", 0) } else { menu_additem( new_menu,"200 ХП\d: \rВкл", "1", 0) } if(!off[id]) { menu_additem( new_menu,"Гравитация\d: \rВыкл", "2", 0) } else { menu_additem( new_menu,"Гравитация\d: \rВкл", "2", 0) } if(!on[id]) { menu_additem( new_menu,"Скорость\d: \rВыкл", "3", 0) } else { menu_additem( new_menu,"Скорость\d: \rВкл", "3", 0) } if(!ren[id]) { menu_additem( new_menu,"Свечение\d: \rВыкл^n", "4", 0) } else { menu_additem( new_menu,"Свечение\d: \rВкл^n", "4", 0) } if(!tra[id]) { menu_additem( new_menu,"Взять \r+ \y5000$", "5", 0) } else { menu_additem( new_menu,"Взять \r+ \y5000$", "5", 0) } if(!gondon[id]) { menu_additem( new_menu,"Двойные\r Биреты", "6", 0) } else { menu_additem( new_menu,"Двойные\r Биреты", "6", 0) } if(!offon[id]) { menu_additem( new_menu,"Воскреснуть^n^n", "7", 0) } else { menu_additem( new_menu,"Воскреснуть^n^n", "7", 0) } menu_additem( new_menu, "Выйти", "0") menu_setprop( new_menu, MPROP_PERPAGE, 0) menu_display( id, new_menu, 0 ) } }
public menu_admin( id, menu, item, iEnt, player) { if( item == MENU_EXIT ) { menu_destroy( menu ) return PLUGIN_HANDLED } new data[6], iName[64] new name[32] get_user_name(id,name,31) new access, callback menu_item_getinfo( menu, item, access, data,5, iName, 63, callback ) new key = str_to_num( data ) switch( key ) { case 1: { if(onoff[id]) { set_user_health(id, 100) client_cmd(id,"ozon"); onoff[id] = 0 } else { set_user_health(id, 200) client_cmd(id,"ozon"); onoff[id] = 1 } client_print(0,print_chat,"[VIP] %s взял 200 HP.",name,onoff[id]?100:200) set_task(0.1, "ozon", id) } case 2: { if(off[id]) { set_user_gravity(id, 1.0) client_cmd(id,"ozon"); off[id] = 0 } else { client_print(0,print_chat,"[VIP] %s использует низкую гравитацию.",name) set_user_gravity(id, 0.4) client_cmd(id,"ozon"); off[id] = 1 } set_task(0.1, "ozon", id) } case 3: { if(on[id]) { set_user_maxspeed(id, 250.0) client_cmd(id,"ozon"); on[id] = 0 } else { client_print(0,print_chat,"[VIP] %s использует скорость.",name) set_user_maxspeed(id, 555.0) client_cmd(id,"ozon"); on[id] = 1 } set_task(0.1, "ozon", id) } case 4: { if(ren[id]) { set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,0) client_cmd(id,"ozon"); ren[id] = 0 } else { new Red = random_num(0,9) new Green = random_num(0,4) new Blue = random_num(0,191) client_print(0,print_chat,"[VIP] %s теперь светится.",name) set_user_rendering(id,kRenderFxGlowShell,Red,Green,Blue,kRenderNormal,9999) client_cmd(id,"ozon"); ren[id] = 1 } set_task(0.1, "ozon", id) } case 5: { if(tra[id]) { cs_set_user_money (id, cs_get_user_money(id) + 5000) client_cmd(id,"ozon"); tra[id] = 0 } else { cs_set_user_money (id, cs_get_user_money(id) + 5000) client_cmd(id,"ozon"); tra[id] = 1 } client_print(0,print_chat,"[VIP] %s взял 5000$ денег.",name) set_task(0.1, "ozon", id) } case 6: { if(gondon[id]) { give_item(id, "weapon_elite") cs_set_user_bpammo( id, CSW_ELITE, 9999 ); client_cmd(id,"sn1kmenu"); gondon[id] = 0 } else { give_item(id, "weapon_elite") cs_set_user_bpammo( id, CSW_ELITE, 9999 ); client_cmd(id,"sn1kmenu"); gondon[id] = 1 } client_print(0,print_chat,"[VIP] %s взял беретты.",name) set_task(0.1, "sn1kmenu", id) } case 7: { if(offon[id]) { ExecuteHam(Ham_CS_RoundRespawn, id) client_cmd(id,"ozon"); offon[id] = 0 } else { ExecuteHam(Ham_CS_RoundRespawn, id) client_cmd(id,"ozon"); offon[id] = 1 } client_print(0,print_chat,"[VIP] %s возродился.",name) set_task(0.1, "ozon", id) } } menu_destroy( menu ) 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 } */Добавлено (2012-09-21, 16:18) --------------------------------------------- Хочу что бы что берёт Вип и его ник были зелёного цвета)
http://vk.com/club37607189в
|
|
| |