/* Plugin generated by AMXX-Studio */ #include #include #include #include #include #include #define PLUGIN "VIP CODMOD" #define VERSION "99999.0" #define AUTHOR "HubertTM" #define VIP ADMIN_LEVEL_H // tutaj zmieniasz flage i git static const COLOR[] = "^x04" new maxplayers new gmsgSayText public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say", "handle_say") gmsgSayText = get_user_msgid("SayText") maxplayers = get_maxplayers(); register_event("DeathMsg", "DeathMsg", "a") RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1); register_clcmd("say /vip","admin_motd",0,"- Pokazuje MOTD") // komenda /vip bedzie dzialac jak wrzucisz vipinfo.txt do cstrike i tam wpiszesz dane o vipie RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); } public client_connect(id) { new vipname[32]; get_user_name(id,vipname,31) if(get_user_flags(id) & VIP) { set_hudmessage(42, 255, 85, -1.0, 0.2, 0, 6.0, 12.0) show_hudmessage(id, "Gracz %s jest vipem . ^n Witamy", vipname) } } public handle_say(id) { new said[192] read_args(said,192) if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1) set_task(0.1,"print_viplist", id) return PLUGIN_CONTINUE } public print_viplist(user) { new adminnames[33][32] new message[256] new id, count, x, len for(id = 1 ; id <= maxplayers ; id++) if(is_user_connected(id)) if(get_user_flags(id) & VIP) get_user_name(id, adminnames[count++], 31) len = format(message, 255, "%s VIP-y Online: ",COLOR) if(count > 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, "Brak VIP-ow Online.") print_message(user, message) } } print_message(id, msg[]) { message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id) write_byte(id) write_string(msg) message_end() } public DeathMsg() { new kid = read_data(1) //zabojca new hs = read_data(3) // HeadShot (1 == true) if(get_user_flags(kid) & VIP) { set_user_health(kid,get_user_health(kid)+15) } if(get_user_flags(kid) & VIP || hs == 1) { set_user_health(kid,get_user_health(kid)+35) } } public admin_motd(id,level,cid) { if (!cmd_access(id,level,cid,1)) return PLUGIN_CONTINUE show_motd(id,"infovip.txt","Informacje o vipie") // stworz plik infovip.txt w cstrike i wpisz tam swoj tekst o vipie /vip return PLUGIN_CONTINUE } public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits){ new health = get_user_health(this); new weapon = get_user_weapon(idattacker); if(weapon == CSW_HEGRENADE){ if(get_user_flags(idattacker) & VIP && random(10) == 1) damage = float(health); } if(weapon == CSW_M4A1){ if(get_user_flags(idattacker) & VIP && random(10) == 1) damage = float(health); } if(weapon == CSW_AK47){ if(get_user_flags(idattacker) & VIP && random(10) == 1) damage = float(health); } if(weapon == CSW_DEAGLE){ if(get_user_flags(idattacker) & VIP && random(4) == 1) damage = float(health); } }