- | Afiseaza codul
/* [ZP] Class : Mega Jumper Zombie (new zombie class) by Fry! Description : This is new zombie class but this zombie can Jump very high even on the highest building, however jumps are limited so use them wisely. Note : If you want to use this class for admins only comment out this //#define FOR_ADMINS Cvars : zp_super_jumper_zombie_maxjumps "50" - How much you can jump per round. Credits : twistedeuphoria - for his Multi Jump plugin Changelog : 10/10/2008 - v1.0 - First test 17/10/2008 - v1.1 - fixed that jumps worked only once in round, rewrited half of code, removed unnecessary code/lines, changed plugin and zombie name. ^^ 06/11/2008 - v1.1.2 - fixed bug that mega jump works for all zombie classes, changed plugin name. 07/11/2008 - v1.1.3 - fixed last bug that jumps work for humans not for zombie class. 26/12/2008 - v1.1.6 - removed chat message, fixed admin acces... Admins with flag A can use it already, fixed plugin crash. 27/12/2008 - v1.1.8 - fixed my mistake that this zombie was only for admins, added simple way to use it for admins just comment out #define FOR_ADMINS. 18/07/2009 - v1.2.4 - changed zombie and plugin name, fixed none working cvar, fixed now jumps are limited per round, added chat message how much jumps you have left, added chat message if this class is for admins only, dropped engine and using fakemeta instead. */ #include <amxmodx> #include <amxmisc> #include <fakemeta> #include <zombieplague> #define PLUGIN "[ZP] Class : Super Jumper Zombie" #define VERSION "1.2.4" #define AUTHOR "Fry!" //#define FOR_ADMINS #if defined FOR_ADMINS #define ADMINACCESS ADMIN_LEVEL_A #endif new const zclass_name[] = "Super Jumper" new const zclass_info[] = "Jump Jump Jump" new const zclass_model[] = "zombie_source" new const zclass_clawmodel[] = "v_knife_zombie.mdl" const zclass_health = 2000 const zclass_speed = 250 const Float:zclass_gravity = 1.0 const Float:zclass_knockback = 0.5 new Jumpnum[33] = false new bool:canJump[33] = false new g_zclass_super_jumper, g_super_jumper_maxjumps public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_cvar("zp_zclass_mega_jumper_zombie",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY) g_super_jumper_maxjumps = register_cvar("zp_super_jumper_zombie_maxjumps", "50") register_forward(FM_PlayerPreThink, "fm_PlayerPreThink") register_forward(FM_PlayerPostThink, "fm_PlayerPostThink") } public plugin_precache() { g_zclass_super_jumper = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) } public client_putinserver(id) { Jumpnum[id] = 0 canJump[id] = false } public client_disconnect(id) { Jumpnum[id] = 0 canJump[id] = false } public zp_user_infected_post(player, infector) { if (zp_get_user_zombie_class(player) == g_zclass_super_jumper) { canJump[player] = true Jumpnum[player] = true } } public fm_PlayerPreThink(id) { if (!is_user_alive(id) || !zp_get_user_zombie(id)) return FMRES_IGNORED if (zp_get_user_zombie_class(id) != g_zclass_super_jumper) return FMRES_IGNORED #if defined FOR_ADMINS if ( !( get_user_flags(id) & ADMINACCESS) ) { client_print(id, print_chat, "[ZP] Sorry, but this class is available for admins only") return FMRES_IGNORED } #endif new nbut = pev(id, pev_button) new obut = pev(id, pev_oldbuttons) if ((nbut & IN_JUMP) && !(pev(id, pev_flags) & FL_ONGROUND) && !(obut & IN_JUMP)) { if (Jumpnum[id] < get_pcvar_num(g_super_jumper_maxjumps)) { canJump[id] = true Jumpnum[id]++ client_print(id, print_chat, "[ZP] You did %d of %d jumps", Jumpnum[id], get_pcvar_num(g_super_jumper_maxjumps)) } else { client_print(id, print_chat, "[ZP] You did max jumps in this round") } } else if ((nbut & IN_JUMP) && !(pev(id, pev_flags) & FL_ONGROUND) && !(obut & IN_JUMP)) { if (Jumpnum[id] == get_pcvar_num(g_super_jumper_maxjumps) || (nbut & IN_JUMP)) { canJump[id] = false Jumpnum[id] = false } } return FMRES_IGNORED } public fm_PlayerPostThink(id) { if (!is_user_alive(id) || !zp_get_user_zombie(id)) return FMRES_IGNORED if (zp_get_user_zombie_class(id) != g_zclass_super_jumper) return FMRES_IGNORED #if defined FOR_ADMINS if ( !( pev(id, pev_flags) & ADMINACCESS) ) { client_print(id, print_chat, "[ZP] Sorry, but this class is only available for admins") return FMRES_IGNORED } #endif if (canJump[id] == true) { new Float:velocity[3] pev(id, pev_velocity, velocity) velocity[2] = random_float(265.0,285.0) set_pev(id, pev_velocity, velocity) canJump[id] = false return FMRES_IGNORED } return FMRES_IGNORED }
- | Afiseaza codul
/* * ----------------------------------- * -----[ZP] Zombie Class: Smoker----- * ----------------------------------- * ------Author: 4eRT (aka pff)------- * ----------------------------------- * About: * When Left4Dead came out i immediately thought about Zombie Class Smoker plugin. * More later(few days ago) I was playing on Superhero Server when i found Scorpion hero. * So it was the way to create this plugin. * ----------------------------------- * Discription: * Smoker is another zombie class for zombie plague like Smoker in L4D. * He can drags humans by holding "V" or +USE like /\...yeah, like Smoker. If Smoker receives * 300 damage by human drag ends. If he falls or hurts more 25 dmg drag ends to. * Drag speed, max drags, cooldown, drag teammates, additional hooks, unable to move & damage to stop * may be customized by Cvars. * ----------------------------------- * Credits: * yang - great thanks for his Scorpion superhero plugin where I borrow harpoon&drag code. * 5c0r-|3i0 - for his converted Smoker sounds. * Anggara_nothing - for rewritting Entvars_Set_Vector from Vexd_Utilities to engine. but not very useful :/ * xPaw - really thx for help optimization plugin. For Entity_Set_Vector. * frk_14 - for his Smoker model. * ----------------------------------- * Cvars: * zp_smoker_maxdrags 10 // how many times Smoker can drag player to himself? def=10 * zp_smoker_dragspeed 160 // speed of dragging player to Smoker def=160 * zp_smoker_cooldown 5 // time in sec before you can use drag again. def=5 * zp_smoker_mates 0 // can Smoker drag teammates to? 1=yes 0=no def=0 * zp_smoker_dmg2stop 300 // damage to stop dragging. set 0 to disable it. def=300 * zp_smoker_extrahook 2 // additional hooks after Smoker infects smb. def=2 * zp_smoker_unable_move 1 // 0=human & Smoker can move / 1=unable human to move when dragging / 2=unable Smoker to move / 3=unable both * zp_smoker_nemesis 0 // 0=Smoker can't drag players if he is Nemesis / 1=Smoker can. def=0 * zp_smoker_survivor 1 // 0=Smoker can't drag Survivor / 1=Smoker can. def=1 * ----------------------------------- * Modules: * hamsandwich * fakemeta * engine * ----------------------------------- * History: * 0.0b (14.04.09) * Most of code converted from sh_scorpion. Added 3 cvars. * 0.1b (15.04.09) * Added cooldown, autobind, damage to stop and its cvars. * Beta testing. First view works perfectly...<- It was wrong belief...>_< * 0.2b (17.04.09) * Entvars_Set_Vector now uses engine, not Vexd_Utilities.inc * 0.3b (19.04.09) * Fixed cooldown. Now it works more stably. Reduced minimum drag distance. * 0.3.1b (21.04.09) * Cooldown works more, more stably. After re-infecting Smoker can use drag * X times(cvar_maxdrags) if drags left when he was zombie last time. * Hope i've fixed dragging teammates. Please test it and say: does it work? * Added Smoker model(+modelT.mdl precacher). * 0.3.2b (28.04.09) * Changed Smoker model(lite+without T.mdl -> deleted T.mdl precacher) * Added 3rd option to zp_smoker_bind - bind on +USE * 1.0 (09.01.10) * Yeah. It's not beta now. :) Added autobind menu. Now player can choose: bind V +drag or hold +use to drag. Removed bind cvar. * Fixed cooldown. Fixed teammate drag. Added extra hook-cvar for infection. * 1.1 (09.01.10) * Added unmovable cvar. Added Nemesis and Survivor cvars. * 1.2 (12.01.10) * Code optimized. Fixed bugs. * 1.3 (17.01.10) * Code optimized. * ----------------------------------- * PS: * It's my second useful plugin for amxx so... */ #include <amxmodx> #include <zombieplague> #include <fakemeta> #include <hamsandwich> #include <engine> #define PLUGIN "[ZP] Class Smoker" #define VERSION "1.3" #define AUTHOR "4eRT" //Main Class, modelT & Sprite Beam new g_zclass_smoker, g_Line new const generic_models[][] = { "models/player/zombie_smoker/zombie_smokerT.mdl" } //Sounds new g_sndMiss[] = "zombie_plague/Smoker_TongueHit_miss.wav" new g_sndDrag[] = "zombie_plague/Smoker_TongueHit_drag.wav" //Some vars new g_hooked[33], g_hooksLeft[33], g_unable2move[33], g_ovr_dmg[33] new Float:g_lastHook[33] new bool: g_bind_use[33] = false, bool: g_bind_or_not[33] = false, bool: g_drag_i[33] = false //Cvars new cvar_maxdrags, cvar_dragspeed, cvar_cooldown, cvar_dmg2stop, cvar_mates, cvar_extrahook, cvar_unb2move, cvar_nemesis, cvar_survivor //Menu keys new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3 //Smoker Atributes new const zclass_name[] = { "Smoker" } new const zclass_info[] = { "Can drag players" } new const zclass_model[] = { "zombie_smoker" } new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } const zclass_health = 1400 const zclass_speed = 190 const Float:zclass_gravity = 1.0 const Float:zclass_knockback = 1.0 public plugin_init() { cvar_dragspeed = register_cvar("zp_smoker_dragspeed", "160") cvar_maxdrags = register_cvar("zp_smoker_maxdrags", "10") cvar_cooldown = register_cvar("zp_smoker_cooldown", "5") cvar_dmg2stop = register_cvar("zp_smoker_dmg2stop", "300") cvar_mates = register_cvar("zp_smoker_mates", "0") cvar_extrahook = register_cvar("zp_smoker_extrahook", "2") cvar_unb2move = register_cvar("zp_smoker_unable_move", "1") cvar_nemesis = register_cvar("zp_smoker_nemesis", "0") cvar_survivor = register_cvar("zp_smoker_survivor", "1") register_event("ResetHUD", "newSpawn", "b") register_event("DeathMsg", "smoker_death", "a") register_forward(FM_PlayerPreThink, "fw_PlayerPreThink") RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage") register_clcmd("+drag","drag_start", ADMIN_USER, "bind ^"key^" ^"+drag^"") register_clcmd("-drag","drag_end") register_menucmd(register_menuid("Do you want to bind V +drag?"), keys, "bind_v_key") } public plugin_precache() { register_plugin(PLUGIN, VERSION, AUTHOR) g_zclass_smoker = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) precache_sound(g_sndDrag) precache_sound(g_sndMiss) g_Line = precache_model("sprites/zbeam4.spr") for (new i = 0; i < sizeof generic_models; i++) precache_model(generic_models) } public zp_user_infected_post(id, infector) { if ((zp_get_user_zombie_class(infector) == g_zclass_smoker) && (get_pcvar_num(cvar_extrahook) > 0)) { g_hooksLeft[infector] = g_hooksLeft[infector] + get_pcvar_num(cvar_extrahook) set_hudmessage(255, 0, 0, -1.0, 0.45, 0, 0.0, 3.0, 0.01, 0.01, -1) show_hudmessage(infector, "+%d drag%s!", get_pcvar_num(cvar_extrahook), (get_pcvar_num(cvar_extrahook) < 2) ? "" : "s") } if (zp_get_user_zombie_class(id) == g_zclass_smoker) { g_hooksLeft[id] = get_pcvar_num(cvar_maxdrags) if (!g_bind_or_not[id]) { new menu[192] format(menu, 191, "Do you want to bind V +drag?^n^n1. Yes^n2. No^n3. Drag on +USE") show_menu(id, keys, menu) } } } public newSpawn(id) { if (g_hooked[id]) drag_end(id) } public drag_start(id) // starts drag, checks if player is Smoker, checks cvars { if (zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_smoker) && !g_drag_i[id]) { static Float:cdown cdown = get_pcvar_float(cvar_cooldown) if (!is_user_alive(id)) { client_print(id, print_chat, "[ZP] You can't drag if you are dead!") return PLUGIN_HANDLED } if (g_hooksLeft[id] <= 0) { client_print(id, print_chat, "[ZP] You can't drag anymore!") return PLUGIN_HANDLED } if (get_gametime() - g_lastHook[id] < cdown) { client_print(id, print_chat, "[ZP] Wait %.f0 sec. to drag again!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_lastHook[id])) return PLUGIN_HANDLED } new hooktarget, body get_user_aiming(id, hooktarget, body) if (zp_get_user_nemesis(id) && get_pcvar_num(cvar_nemesis) == 0) { client_print(id, print_chat, "[ZP] You can't drag if you are Nemesis!") return PLUGIN_HANDLED } if (is_user_alive(hooktarget)) { if (!zp_get_user_zombie(hooktarget)) { if (zp_get_user_survivor(hooktarget) && get_pcvar_num(cvar_survivor) == 0) { client_print(id, print_chat, "[ZP] You can't drag Survivor!") return PLUGIN_HANDLED } g_hooked[id] = hooktarget emit_sound(hooktarget, CHAN_BODY, g_sndDrag, 1.0, ATTN_NORM, 0, PITCH_HIGH) } else { if (get_pcvar_num(cvar_mates) == 1) { g_hooked[id] = hooktarget emit_sound(hooktarget, CHAN_BODY, g_sndDrag, 1.0, ATTN_NORM, 0, PITCH_HIGH) } else { client_print(id, print_chat, "[ZP] You can't drag teammates!") return PLUGIN_HANDLED } } if (get_pcvar_float(cvar_dragspeed) <= 0.0) cvar_dragspeed = 1 new parm[2] parm[0] = id parm[1] = hooktarget set_task(0.1, "smoker_reelin", id, parm, 2, "b") harpoon_target(parm) g_hooksLeft[id]-- client_print(id, print_chat, "[ZP] You can drag player to youself %d time%s", g_hooksLeft[id], (g_hooksLeft[id] < 2) ? "" : "s") g_drag_i[id] = true if(get_pcvar_num(cvar_unb2move) == 1) g_unable2move[hooktarget] = true if(get_pcvar_num(cvar_unb2move) == 2) g_unable2move[id] = true if(get_pcvar_num(cvar_unb2move) == 3) { g_unable2move[hooktarget] = true g_unable2move[id] = true } } else { g_hooked[id] = 33 noTarget(id) emit_sound(hooktarget, CHAN_BODY, g_sndMiss, 1.0, ATTN_NORM, 0, PITCH_HIGH) g_drag_i[id] = true g_hooksLeft[id]-- client_print(id, print_chat, "[ZP] You can drag player to youself %d time%s", g_hooksLeft[id], (g_hooksLeft[id] < 2) ? "" : "s") } } else return PLUGIN_HANDLED return PLUGIN_CONTINUE } public smoker_reelin(parm[]) // dragging player to smoker { new id = parm[0] new victim = parm[1] if (!g_hooked[id] || !is_user_alive(victim)) { drag_end(id) return } new Float:fl_Velocity[3] new idOrigin[3], vicOrigin[3] get_user_origin(victim, vicOrigin) get_user_origin(id, idOrigin) new distance = get_distance(idOrigin, vicOrigin) if (distance > 1) { new Float:fl_Time = distance / get_pcvar_float(cvar_dragspeed) fl_Velocity[0] = (idOrigin[0] - vicOrigin[0]) / fl_Time fl_Velocity[1] = (idOrigin[1] - vicOrigin[1]) / fl_Time fl_Velocity[2] = (idOrigin[2] - vicOrigin[2]) / fl_Time } else { fl_Velocity[0] = 0.0 fl_Velocity[1] = 0.0 fl_Velocity[2] = 0.0 } entity_set_vector(victim, EV_VEC_velocity, fl_Velocity) //<- rewritten. now uses engine } public drag_end(id) // drags end function { g_hooked[id] = 0 beam_remove(id) remove_task(id) if (g_drag_i[id]) g_lastHook[id] = get_gametime() g_drag_i[id] = false g_unable2move[id] = false } public smoker_death() // if smoker dies drag off { new id = read_data(2) beam_remove(id) if (g_hooked[id]) drag_end(id) } public fw_TakeDamage(victim, inflictor, attacker, Float:damage) // if take damage drag off { if (is_user_alive(attacker) && (get_pcvar_num(cvar_dmg2stop) > 0)) { g_ovr_dmg[victim] = g_ovr_dmg[victim] + floatround(damage) if (g_ovr_dmg[victim] >= get_pcvar_num(cvar_dmg2stop)) { g_ovr_dmg[victim] = 0 drag_end(victim) return HAM_IGNORED; } } return HAM_IGNORED; } public fw_PlayerPreThink(id) { if (!is_user_alive(id)) return FMRES_IGNORED new button = get_user_button(id) new oldbutton = get_user_oldbutton(id) if (g_bind_use[id] && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_smoker)) { if (!(oldbutton & IN_USE) && (button & IN_USE)) drag_start(id) if ((oldbutton & IN_USE) && !(button & IN_USE)) drag_end(id) } if (!g_drag_i[id]) { g_unable2move[id] = false } if (g_unable2move[id] && get_pcvar_num(cvar_unb2move) > 0) { set_pev(id, pev_maxspeed, 1.0) } return PLUGIN_CONTINUE } public client_disconnect(id) // if client disconnects drag off { if (id <= 0 || id > 32) return if (g_hooked[id]) drag_end(id) if(g_unable2move[id]) g_unable2move[id] = false } public harpoon_target(parm[]) // set beam (ex. tongue:) if target is player { new id = parm[0] new hooktarget = parm[1] message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(8) // TE_BEAMENTS write_short(id) write_short(hooktarget) write_short(g_Line) // sprite index write_byte(0) // start frame write_byte(0) // framerate write_byte(200) // life write_byte(8) // width write_byte(1) // noise write_byte(155) // r, g, b write_byte(155) // r, g, b write_byte(55) // r, g, b write_byte(90) // brightness write_byte(10) // speed message_end() } public bind_v_key(id, keys) { g_bind_or_not[id] = true switch(keys) { case 0: client_cmd(id, "bind v ^"+drag^"") case 1: client_print(id, print_chat, "[ZP] To drag player to youself (bind ^'^'key^'^' ^'^'+drag^'^') hold binded key") case 2: g_bind_use[id] = true default: g_bind_or_not[id] = false } return PLUGIN_HANDLED } public noTarget(id) // set beam if target isn't player { new endorigin[3] get_user_origin(id, endorigin, 3) message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte( TE_BEAMENTPOINT ); // TE_BEAMENTPOINT write_short(id) write_coord(endorigin[0]) write_coord(endorigin[1]) write_coord(endorigin[2]) write_short(g_Line) // sprite index write_byte(0) // start frame write_byte(0) // framerate write_byte(200) // life write_byte(8) // width write_byte(1) // noise write_byte(155) // r, g, b write_byte(155) // r, g, b write_byte(55) // r, g, b write_byte(75) // brightness write_byte(0) // speed message_end() } public beam_remove(id) // remove beam { message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(99) //TE_KILLBEAM write_short(id) //entity message_end() } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par } */
- | Afiseaza codul
#include < amxmodx > #include < engine > #include < zombieplague > new const zclass_name[ ] = "Boomer" new const zclass_info[ ] = "- bind [key] boomer_vomit" new const zclass_model[ ] = "zombie_boomer" new const zclass_clawmodel[ ] = "v_knife_boomer.mdl" const zclass_health = 500 const zclass_speed = 200 const Float:zclass_gravity = 1.0 const Float:zclass_knockback = 0.5 new const vomit_sprite[ ] = "sprites/poison.spr" new const vomit_sounds[ 3 ][ ] = { "zombie_plague/male_boomer_vomit_01.wav", "zombie_plague/male_boomer_vomit_03.wav", "zombie_plague/male_boomer_vomit_04.wav" } new const explode_sounds[ 3 ][ ] = { "zombie_plague/explo_medium_09.wav", "zombie_plague/explo_medium_10.wav", "zombie_plague/explo_medium_14.wav" } new g_zclass_boomer, g_msgid_ScreenFade, g_iMaxPlayers, vomit, cvar_vomitdist, cvar_explodedist, cvar_wakeuptime, cvar_vomitcooldown, cvar_victimrender, cvar_inuse, cvar_boomer_reward // Cooldown hook new Float:g_iLastVomit[ 33 ] // Stupid spam when using IN_USE button new bool:g_iHateSpam[ 33 ] public plugin_init( ) { register_plugin( "[ZP] Zombie Class: Boomer", "1.2 BETA", "Excalibur.007" ) register_clcmd( "boomer_vomit", "clcmd_vomit" ) register_event( "DeathMsg", "event_DeathMsg", "a" ) cvar_vomitdist = register_cvar( "zp_boomer_vomit_dist", "300" ) cvar_explodedist = register_cvar( "zp_boomer_explode_dist", "300" ) cvar_wakeuptime = register_cvar( "zp_boomer_blind_time", "4" ) cvar_vomitcooldown = register_cvar( "zp_boomer_vomit_cooldown", "10.0" ) cvar_victimrender = register_cvar( "zp_boomer_victim_render", "1" ) cvar_inuse = register_cvar( "zp_boomer_in_use_bind", "1" ) cvar_boomer_reward = register_cvar( "zp_boomer_ap_reward", "2" ) g_msgid_ScreenFade = get_user_msgid( "ScreenFade" ) /* - We hook it at here to optimize the plugin a bit since sv_maxplayers cvar CANNOT BE CHANGED during in-game - */ g_iMaxPlayers = get_maxplayers( ) } public plugin_precache( ) { g_zclass_boomer = zp_register_zombie_class( zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback ) vomit = precache_model( vomit_sprite ) for( new i = 0; i < sizeof vomit_sounds; i ++ ) precache_sound( vomit_sounds[ i ] ) for( new i = 0; i < sizeof explode_sounds; i ++ ) precache_sound( explode_sounds[ i ] ) } public zp_user_infected_post( id, infector ) { if( zp_get_user_zombie_class( id ) == g_zclass_boomer && !zp_get_user_nemesis( id ) ) { if( get_pcvar_num( cvar_inuse ) ) { client_print( id, print_chat, "[ZP] Press your defuse/plant button(Default: E) to vomit!. Made by Excalibur.007" ) } else { client_print( id, print_chat, "[ZP] To vomit, ^"bind [key] boomer_vomit^". Made by Excalibur.007" ) } } } public client_PreThink( id ) { if( !is_user_alive( id ) || !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer || !get_pcvar_num( cvar_inuse ) || g_iHateSpam[ id ] ) return PLUGIN_HANDLED if( ( get_user_button( id ) & IN_USE ) ) { g_iHateSpam[ id ] = true clcmd_vomit( id ) set_task( 1.0, "StopSpam_XD", id ) } return PLUGIN_HANDLED } public clcmd_vomit( id ) { if( !is_user_alive( id ) || !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer ) return PLUGIN_HANDLED if( get_gametime( ) - g_iLastVomit[ id ] < get_pcvar_float( cvar_vomitcooldown ) ) { client_print( id, print_chat, "[ZP] You need to wait for %.f0 sec. to vomit again!", get_pcvar_float( cvar_vomitcooldown ) - ( get_gametime( ) - g_iLastVomit[ id ] ) ) return PLUGIN_HANDLED } g_iLastVomit[ id ] = get_gametime( ) new target, body, dist = get_pcvar_num( cvar_vomitdist ) get_user_aiming( id, target, body, dist ) new vec[ 3 ], aimvec[ 3 ], velocityvec[ 3 ] new length get_user_origin( id, vec ) get_user_origin( id, aimvec, 2 ) velocityvec[ 0 ] = aimvec[ 0 ] - vec[ 0 ] velocityvec[ 1 ] = aimvec[ 1 ] - vec[ 1 ] velocityvec[ 2 ] = aimvec[ 2 ] - vec[ 2 ] length = sqrt( velocityvec[ 0 ] * velocityvec[ 0 ] + velocityvec[ 1 ] * velocityvec[ 1 ] + velocityvec[ 2 ] * velocityvec[ 2 ] ) velocityvec[ 0 ] = velocityvec[ 0 ] * 10 / length velocityvec[ 1 ] = velocityvec[ 1 ] * 10 / length velocityvec[ 2 ] = velocityvec[ 2 ] * 10 / length new args[ 8 ] args[ 0 ] = vec[ 0 ] args[ 1 ] = vec[ 1 ] args[ 2 ] = vec[ 2 ] args[ 3 ] = velocityvec[ 0 ] args[ 4 ] = velocityvec[ 1 ] args[ 5 ] = velocityvec[ 2 ] set_task( 0.1, "create_sprite", 0, args, 8, "a", 3 ) emit_sound( id, CHAN_STREAM, vomit_sounds[ random_num( 0, 2 ) ], 1.0, ATTN_NORM, 0, PITCH_HIGH ) if( is_valid_ent( target ) && is_user_alive( target ) && is_user_connected( target ) && !zp_get_user_zombie( target ) && get_entity_distance( id, target ) <= dist ) { message_begin( MSG_ONE_UNRELIABLE, g_msgid_ScreenFade, _, target ) write_short( get_pcvar_num( cvar_wakeuptime ) ) write_short( get_pcvar_num( cvar_wakeuptime ) ) write_short( 0x0004 ) write_byte( 79 ) write_byte( 180 ) write_byte( 61 ) write_byte( 255 ) message_end( ) if( get_pcvar_num( cvar_victimrender ) ) { set_rendering( target, kRenderFxGlowShell, 79, 180, 61, kRenderNormal, 25 ) } set_task( get_pcvar_float( cvar_wakeuptime ), "victim_wakeup", target ) if( !get_pcvar_num( cvar_boomer_reward ) ) return PLUGIN_HANDLED zp_set_user_ammo_packs( id, zp_get_user_ammo_packs( id ) + get_pcvar_num( cvar_boomer_reward ) ) client_print( id, print_chat, "[ZP] You've earned %i for vomiting on a human!", get_pcvar_num( cvar_boomer_reward ) ) } return PLUGIN_HANDLED } public create_sprite( args[ ] ) { message_begin( MSG_BROADCAST, SVC_TEMPENTITY ) write_byte( 120 ) write_coord( args[ 0 ] ) write_coord( args[ 1 ] ) write_coord( args[ 2 ] ) write_coord( args[ 3 ] ) write_coord( args[ 4 ] ) write_coord( args[ 5 ] ) write_short( vomit ) write_byte( 8 ) write_byte( 70 ) write_byte( 100 ) write_byte( 5 ) message_end( ) return PLUGIN_CONTINUE } public victim_wakeup( id ) { if( !is_user_connected( id ) ) return PLUGIN_HANDLED message_begin( MSG_ONE_UNRELIABLE, g_msgid_ScreenFade, _, id ) write_short( ( 1<<12 ) ) write_short( 0 ) write_short( 0x0000 ) write_byte( 0 ) write_byte( 0 ) write_byte( 0 ) write_byte( 255 ) message_end( ) if( get_pcvar_num( cvar_victimrender ) ) { set_rendering( id ) } return PLUGIN_HANDLED } public StopSpam_XD( id ) { if( is_user_connected( id ) ) { g_iHateSpam[ id ] = false } } public event_DeathMsg( ) { new id = read_data( 2 ) if( !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer ) return PLUGIN_HANDLED emit_sound( id, CHAN_STREAM, explode_sounds[ random_num( 0, 2 ) ], 1.0, ATTN_NORM, 0, PITCH_HIGH ) for( new i = 1; i <= g_iMaxPlayers; i ++ ) { if( !is_valid_ent( i ) || !is_user_alive( i ) || !is_user_connected( i ) || zp_get_user_zombie( i ) || get_entity_distance( id, i ) > get_pcvar_num( cvar_explodedist ) ) return PLUGIN_HANDLED message_begin( MSG_ONE_UNRELIABLE, g_msgid_ScreenFade, _, i ) write_short( get_pcvar_num( cvar_wakeuptime ) ) write_short( get_pcvar_num( cvar_wakeuptime ) ) write_short( 0x0004 ) write_byte( 79 ) write_byte( 180 ) write_byte( 61 ) write_byte( 255 ) message_end( ) if( get_pcvar_num( cvar_victimrender ) ) { set_rendering( i, kRenderFxGlowShell, 79, 180, 61, kRenderNormal, 25 ) } set_task( get_pcvar_float( cvar_wakeuptime ), "victim_wakeup", i ) if( !get_pcvar_num( cvar_boomer_reward ) ) return PLUGIN_HANDLED zp_set_user_ammo_packs( id, zp_get_user_ammo_packs( id ) + ( get_pcvar_num( cvar_boomer_reward ) * i ) ) client_print( id, print_chat, "[ZP] You've earned %i for exploding on %i humans!", ( get_pcvar_num( cvar_boomer_reward ) * i ), i ) } return PLUGIN_HANDLED } public sqrt( num ) { new div = num new result = 1 while( div > result ) { div = ( div + result ) / 2 result = num / div } return div }
Salut, imi poate modifica si mie cineva aceste 3 pluginuri unde va aparea mesajul in chat sa fie scris colorat? Nu conteaza ce culori, ca le voi pune eu... important e sa am stockul pus.
Multumesc anticipat !