znalazłęs juz
Mozeto sie nada
To równanie zostało stworzone przy pomocy kodu LaTeX:
Edytor LaTeX online: CodeCogs.com/latex/eqneditor.php
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
witam w cs gram od jakiś 3 lat niestety z przerwami spowodowanymi brakiem czasu
lub zajmowaniem sie swoja była siecią
CS-ZIGI.pl
obecnie jestem administratorem sieci serwerów PZB psychopaci z bronia
ZIGI89 nie posiada znajomych
Napisane przez ZIGI89
w 17.11.2015 18:48
Napisane przez ZIGI89
w 13.11.2015 23:20
#include <amxmodx> #include <engine> #include <zombieplague> #include <hamsandwich> #include <fun> #include <fakemeta_util> #define PLUGIN "[ZP] Extra Item: Force Field Grenade" #define VERSION "v2.3" #define AUTHOR "lucas_7_94" // Thanks To Users in credits too!. #define CAMPO_ROUND_NAME "Force Shield (Complete Round)" #define CAMPO_TIME_NAME "Pole silowe (15s)" #define ValidTouch(%1) ( is_user_alive(%1) && zp_get_user_zombie(%1) ) /*=============================[Plugin Customization]=============================*/ #define CAMPO_TASK //#define CAMPO_ROUND #define RANDOM_COLOR //#define ONE_COLOR new const NADE_TYPE_CAMPO = 6545 #if defined ONE_COLOR new Float:CampoColors[ 3 ] = { 255.0 , 0.0 , 0.0 } #endif new TrailColor[ 3 ] = { 000, 255, 255 } new Float:Maxs[ 3 ] = { 100.0 , 100.0 , 100.0 } new Float:Mins[ 3 ] = { -100.0, -100.0, -100.0 } new const model_grenade[] = "models/zombie_plague/v_auragren.mdl" new const model[] = "models/zombie_plague/aura8.mdl" new const w_model[] = "models/zombie_plague/w_aura.mdl" new const sprite_grenade_trail[] = "sprites/laserbeam.spr" new const entclas[] = "campo_grenade_forze" new cvar_flaregrenades, g_trailSpr, g_SayText, g_itemID new gBomb const Float:Push = 15.0 const item_cost = 15 /*=============================[End Customization]=============================*/ public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam(Ham_Think, "grenade", "fw_ThinkGrenade") RegisterHam(Ham_Killed, "player", "fw_PlayerKilled") cvar_flaregrenades = get_cvar_pointer("zp_flare_grenades") register_forward(FM_SetModel, "fw_SetModel") RegisterHam(Ham_Item_Deploy, "weapon_smokegrenade", "shield_deploy", 1) register_event("HLTV", "event_round_start", "a", "1=0", "2=0") register_forward(FM_Touch, "fw_touch") g_SayText = get_user_msgid("SayText") register_cvar("zp_shield_creator", "lucas_7_94", FCVAR_SERVER|FCVAR_PROTECTED) #if defined CAMPO_ROUND g_itemID = zp_register_extra_item ( CAMPO_ROUND_NAME , item_cost * 2 , ZP_TEAM_HUMAN , 0) #else g_itemID = zp_register_extra_item ( CAMPO_TIME_NAME , item_cost , ZP_TEAM_HUMAN , 0) #endif } public event_round_start() { #if defined CAMPO_ROUND remove_entity_name(entclas) #endif gBomb = 0 } public plugin_precache() { g_trailSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_trail) engfunc(EngFunc_PrecacheModel, model_grenade) engfunc(EngFunc_PrecacheModel, model) engfunc(EngFunc_PrecacheModel, w_model) } public client_disconnect(id) gBomb &= ~( 1 << ( id % 32 ) ) public zp_extra_item_selected(player, itemid) { if(itemid == g_itemID) { if( gBomb & ( 1 << ( player % 32 ) ) ) Color(player, "!g[Shield]!y You already have a force field") else { gBomb |= ( 1 << ( player % 32 ) ) if( !user_has_weapon( player, CSW_SMOKEGRENADE ) ) give_item(player,"weapon_smokegrenade") #if defined CAMPO_ROUND Color(player, "!g[Pole silowe]!y Kupiles pole silowe! Trwa ono cala runde.") #else Color(player, "!g[Pole silowe]!y Kupiles pole silowe! Dziala ono przez 15s!") #endif } } } public fw_PlayerKilled(victim, attacker, shouldgib) { if( ( 1 <= attacker <= 32 ) && ( gBomb & ( 1 << ( victim % 32 ) ) ) ) gBomb &= ~( 1 << ( victim % 32 ) ) } public fw_ThinkGrenade(entity) { if(!pev_valid(entity)) return HAM_IGNORED static Float:dmgtime pev(entity, pev_dmgtime, dmgtime) if (dmgtime > get_gametime()) return HAM_IGNORED if(pev(entity, pev_flTimeStepSound) == NADE_TYPE_CAMPO) crear_ent(entity) return HAM_SUPERCEDE } public fw_SetModel(entity, const model[]) { static Float:dmgtime pev(entity, pev_dmgtime, dmgtime) if (dmgtime == 0.0) return FMRES_IGNORED; if (equal(model[7], "w_sm", 4)) { new owner = pev(entity, pev_owner) if( is_user_alive(owner) && !zp_get_user_zombie(owner) && ( gBomb & ( 1 << ( owner % 32 ) ) ) ) { set_pcvar_num(cvar_flaregrenades,0) fm_set_rendering(entity, kRenderFxGlowShell, 000, 255, 255, kRenderNormal, 16) message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(TE_BEAMFOLLOW) // TE id write_short(entity) // entity write_short(g_trailSpr) // sprite write_byte(10) // life write_byte(10) // width write_byte(TrailColor[ 0 ]) // r write_byte(TrailColor[ 1 ]) // g write_byte(TrailColor[ 2 ]) // b write_byte(500) // brightness message_end() set_pev(entity, pev_flTimeStepSound, NADE_TYPE_CAMPO) set_task(6.0, "DeleteEntityGrenade" ,entity) gBomb &= ~( 1 << ( owner % 32 ) ) entity_set_model(entity, w_model) return FMRES_SUPERCEDE } } return FMRES_IGNORED } public DeleteEntityGrenade(entity) if( is_valid_ent( entity ) ) remove_entity(entity) public crear_ent(id) { set_pcvar_num(cvar_flaregrenades,1) // Create entitity new iEntity = create_entity("info_target") if(!is_valid_ent(iEntity)) return PLUGIN_HANDLED new Float: Origin[3] entity_get_vector(id, EV_VEC_origin, Origin) entity_set_string(iEntity, EV_SZ_classname, entclas) entity_set_vector(iEntity,EV_VEC_origin, Origin) entity_set_model(iEntity,model) entity_set_int(iEntity, EV_INT_solid, SOLID_TRIGGER) entity_set_size(iEntity, Mins, Maxs ) entity_set_int(iEntity, EV_INT_renderfx, kRenderFxGlowShell) entity_set_int(iEntity, EV_INT_rendermode, kRenderTransAlpha) entity_set_float(iEntity, EV_FL_renderamt, 50.0) #if defined RANDOM_COLOR if(is_valid_ent(iEntity)) { new Float:vColor[3] for(new i; i < 3; i++) vColor[i] = random_float(0.0, 255.0) entity_set_vector(iEntity, EV_VEC_rendercolor, vColor) } #endif #if defined ONE_COLOR entity_set_vector(iEntity, EV_VEC_rendercolor, CampoColors) #endif #if defined CAMPO_TASK set_task(15.0, "DeleteEntity", iEntity) #endif return PLUGIN_CONTINUE; } public zp_user_infected_post(infected, infector) if ( gBomb & ( 1 << ( infected % 32 ) ) ) gBomb &= ~( 1 << ( infected % 32 ) ) public fw_touch(ent, touched) { if ( !pev_valid(ent) ) return FMRES_IGNORED; static entclass[32]; pev(ent, pev_model, entclass, 31); if ( strcmp( entclass, model ) == 0 ) { if( ValidTouch(touched) ) { static Float:pos_ptr[3], Float:pos_ptd[3] pev(ent, pev_origin, pos_ptr) pev(touched, pev_origin, pos_ptd) for(new i = 0; i < 3; i++) { pos_ptd[i] -= pos_ptr[i] pos_ptd[i] *= Push } set_pev(touched, pev_velocity, pos_ptd) set_pev(touched, pev_impulse, pos_ptd) } } return FMRES_HANDLED } public DeleteEntity( entity ) // Thanks xPaw For The Code =D if( is_valid_ent( entity ) ) remove_entity( entity ); stock Color(const id, const input[], any:...) { static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") replace_all(msg, 190, "!y", "^1") replace_all(msg, 190, "!t", "^3") message_begin(MSG_ONE_UNRELIABLE, g_SayText, _, id) write_byte(id) write_string(msg) message_end() } public shield_deploy( shield_ent ) { if( pev_valid( shield_ent ) != 2 ) return HAM_IGNORED; static const mPlayer = 41 new id = get_pdata_cbase( shield_ent, mPlayer, 4 ); if( ( gBomb & ( 1 << ( id % 32 ) ) ) && !zp_get_user_zombie( id ) ) set_pev( id, pev_viewmodel2, model_grenade ); return HAM_IGNORED; }
MAM JESZCZE PYTANIE czy da sie dopisac cos do pluginu
aby nieuaktywnił sie inny plugin gdy ten jest aktywny
dokładnie chodzi mi o plugin który daje 25 ap za zabicie namka surwa assasina snipera
i chciał bym aby na modzie sniper vs assasin był wyłaczony, mod jest to dodatkowy plugin
sma dodatkowe 25 ap
#include <amxmodx> #include <fakemeta> #include <engine> #include <hamsandwich> #include <zombie_plague_advance> #define AMMO_REWARD 25 #define LASERMINE_REWARD 6 #define is_valid_player(%1) (1 <= %1 <= 32) // Get server's max players | Create custom chat print new g_maxplayers, g_msgSayText //g_damageCount[33]; public plugin_init() { register_plugin("[ZP] Sub Rewards", "1.4", "93()|29!/< ") register_dictionary("zp_rewards.txt") RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1) RegisterHam(Ham_TakeDamage, "func_breakable", "fw_BreakableAttacked"); //RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage"); g_maxplayers = get_maxplayers() g_msgSayText = get_user_msgid("SayText") } /* public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damagebits){ if (zp_get_user_nemesis(victim) && !zp_is_lnj_round()) if (is_valid_player(attacker)) g_damageCount[attacker] += floatround(damage); return HAM_IGNORED; } public zp_round_ended(winteam){ if (zp_is_nemesis_round()){ static aname[32]; new mostDmgId = 1; for (new id = 2; id < 33; id++) if (g_damageCount[id] > mostDmgId) mostDmgId = id; get_user_name(mostDmgId, aname, 31) zp_set_user_ammo_packs(mostDmgId, zp_get_user_ammo_packs(mostDmgId) + AMMO_REWARD); zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKN", aname, AMMO_REWARD) } } */ // Ham Player Killed Forward public fw_PlayerKilled_Post(victim, attacker, shouldgib) { // Get deathmatch mode status and whether the player killed himself static selfkill selfkill = (victim == attacker || !is_user_connected(attacker)) ? true : false // Killed by a non-player entity or self killed or plague/armageddon round if (selfkill || zp_is_plague_round() || zp_is_lnj_round() || zp_get_user_assassin(attacker) || zp_get_user_hunter(attacker) || zp_get_user_nemesis(attacker)) return; // Get attacker and victim's name static aname[32]; get_user_name(attacker, aname, 31) // A Zombie was killed if (zp_get_user_zombie(victim)) { // Victim was Nemesis. What?! He's a Zombie too, you know? if (zp_get_user_nemesis(victim)) { // Human makes the kill, award him zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + AMMO_REWARD) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKN", aname, AMMO_REWARD) } else if (zp_get_user_assassin(victim)) { // Human makes the kill, award him zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + AMMO_REWARD) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKA", aname, AMMO_REWARD) } } // Survivor or Human else { // Killed player was Survivor if (zp_get_user_survivor(victim)) { // So let's give him something... Paulie want a cracker? zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + AMMO_REWARD) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZKS", aname, AMMO_REWARD) } else if (zp_get_user_sniper(victim)) { // So let's give him something... Paulie want a cracker? zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + AMMO_REWARD) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZKSN", aname, AMMO_REWARD) } else if (zp_get_user_hunter(victim)) { // So let's give him something... Paulie want a cracker? zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + AMMO_REWARD) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZKH", aname, AMMO_REWARD) } } } public fw_BreakableAttacked(entity, weapon, killer, Float: dmg){ new sz_classname[32] entity_get_string( entity , EV_SZ_classname , sz_classname , 31 ) if( !equali(sz_classname,"lasermine") ) return HAM_IGNORED; new health = pev(entity,pev_health) - floatround(dmg); if (zp_get_user_zombie(killer)){ if (health <= 0){ zp_set_user_ammo_packs(killer, zp_get_user_ammo_packs(killer)+LASERMINE_REWARD); } return HAM_IGNORED; } //Block Damage return HAM_SUPERCEDE; } // Colored chat print. Thanks to MeRcyLeZZ zp_colored_print(target, const message[], any:...) { static buffer[512], i, argscount argscount = numargs() // Send to everyone if (!target) { static player for (player = 1; player <= g_maxplayers; player++) { // Not connected if (!is_user_connected(player)) continue; // Remember changed arguments static changed[5], changedcount // [5] = max LANG_PLAYER occurencies changedcount = 0 // Replace LANG_PLAYER with player id for (i = 2; i < argscount; i++) { if (getarg(i) == LANG_PLAYER) { setarg(i, 0, player) changed[changedcount] = i changedcount++ } } // Format message for player vformat(buffer, charsmax(buffer), message, 3) // Send it message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player) write_byte(player) write_string(buffer) message_end() // Replace back player id's with LANG_PLAYER for (i = 0; i < changedcount; i++) setarg(changed[i], 0, LANG_PLAYER) } } // Send to specific target else { // Not connected if (!is_user_connected(target)) return; // Format message for player vformat(buffer, charsmax(buffer), message, 3) // Send it message_begin(MSG_ONE, g_msgSayText, _, target) write_byte(target) write_string(buffer) message_end() } } // Stock from AmxMisc stock get_configsdir(name[], len) return get_localinfo("amxx_configsdir", name, len); /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */
sma sniper vs assasin
/***************************************************************************\ ======================================== * || [ZPA] Example Game Mode v1.6 || * ======================================== ------------------- *||DESCRIPTION||* ------------------- This is an example game mode in which there are half Assassins and half Snipers. You can use this plugin as a guide on how to make custom game modes for Zombie Plague Advance. ------------- *||CVARS||* ------------- - zp_avsm_minplayers 2 - Minimum players required for this game mode to be activated - zp_avsm_sniper_hp 1.5 - Snipers HP multiplier - zp_avsm_assassin_hp 1.0 - Assassins HP multiplier - zp_avsm_inf_ratio 0.5 - Infection ratio of this game mode i.e how many players will turn into assassins [Total players * infection ratio] \***************************************************************************/ #include < amxmodx > #include < fun > #include < zombie_plague_advance > /************************************************************\ | Customizations Section | | You can edit here according to your liking | \************************************************************/ // This is the chance value according to which this game mode will be called // The higher the value the lesser the chance of calling this game mode new const g_chance = 15 // This is the access flag required to start the game mode // through the admin menu. Look in users.ini for more details new const g_access_flag[] = "a" // This is the sound which is played when the game mode is triggered // Add as many as you want [Randomly chosen if more than one] new const g_play_sounds[][] = { "zombie_plague/nemesis1.wav" , "zombie_plague/survivor1.wav" } // Comment the following line to disable ambience sounds // Just add two slashes ( // ) #define AMBIENCE_SOUNDS #if defined AMBIENCE_SOUNDS // Ambience Sounds (only .wav and .mp3 formats supported) // Add as many as you want [Randomly chosen if more than one] new const g_sound_ambience[][] = { "zombie_plague/ambience.wav" } // Duration in seconds of each sound new const Float:g_sound_ambience_duration[] = { 58.0 , 56.0 } #endif /************************************************************\ | Customizations Ends Here..!! | | You can edit the cvars in the plugin init | \************************************************************/ // Variables new g_gameid, g_maxplayers, cvar_minplayers, cvar_ratio, cvar_sniperhp, cvar_assahp, g_msg_sync // Ambience sounds task #define TASK_AMB 3256 public plugin_init( ) { // Plugin registeration. register_plugin( "[ZP] Assassin vs Snipers Mode","1.0", "@bdul!" ) // Register some cvars // Edit these according to your liking cvar_minplayers = register_cvar("zp_avsm_minplayers", "2") cvar_sniperhp = register_cvar("zp_avsm_sniper_hp", "1.5") cvar_assahp = register_cvar("zp_avsm_assassin_hp", "1.0") cvar_ratio = register_cvar("zp_avsm_inf_ratio", "0.5") // Get maxplayers g_maxplayers = get_maxplayers( ) // Hud stuff g_msg_sync = CreateHudSyncObj() } // Game modes MUST be registered in plugin precache ONLY public plugin_precache( ) { // Read the access flag new access_flag = read_flags( g_access_flag ) new i // Precache the play sounds for (i = 0; i < sizeof g_play_sounds; i++) precache_sound( g_play_sounds[i] ) // Precache the ambience sounds #if defined AMBIENCE_SOUNDS new sound[100] for (i = 0; i < sizeof g_sound_ambience; i++) { if (equal(g_sound_ambience[i][strlen(g_sound_ambience[i])-4], ".mp3")) { formatex(sound, sizeof sound - 1, "sound/%s", g_sound_ambience[i]) precache_generic( sound ) } else { precache_sound( g_sound_ambience[i] ) } } #endif // Register our game mode g_gameid = zp_register_game_mode( "Assassin vs Snipers Mode", access_flag, g_chance, 0, ZP_DM_BALANCE ) } // Player spawn post public zp_player_spawn_post( id ) { // Check for current mode if( zp_get_current_mode() == g_gameid ) { // Check if the player is a zombie if( zp_get_user_zombie( id )) { // Make him an assassin instead zp_make_user_assassin( id ) // Set his health set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) ) } else { // Make him a sniper zp_make_user_sniper( id ) // Set his health set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) ) } } } public zp_round_started_pre( game ) { // Check if it is our game mode if( game == g_gameid ) { // Check for min players if( fn_get_alive_players() < get_pcvar_num(cvar_minplayers) ) { /** * Note: * This very necessary, you should return ZP_PLUGIN_HANDLED if * some conditions required by your game mode are not met * This will inform the main plugin that you have rejected * the offer and so the main plugin will allow other game modes * to be given a chance */ return ZP_PLUGIN_HANDLED } // Start our new mode start_avs_mode( ) } // Make the compiler happy =) return PLUGIN_CONTINUE } public zp_round_started( game, id ) { // Check if it is our game mode if( game == g_gameid ) { // Show HUD notice set_hudmessage(221, 156, 21, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1) ShowSyncHudMsg(0, g_msg_sync, "Assassins vs Snipers Mode !!!") // Play the starting sound client_cmd(0, "spk ^"%s^"", g_play_sounds[ random_num(0, sizeof g_play_sounds -1) ] ) // Remove ambience task affects remove_task( TASK_AMB ) // Set task to start ambience sounds #if defined AMBIENCE_SOUNDS set_task( 2.0, "start_ambience_sounds", TASK_AMB ) #endif } } public zp_game_mode_selected( gameid, id ) { // Check if our game mode was called if( gameid == g_gameid ) start_avs_mode( ) // Make the compiler happy again =) return PLUGIN_CONTINUE } // This function contains the whole code behind this game mode start_avs_mode( ) { // Create and initialize some important vars static i_assassins, i_max_assassins, id, i_alive i_alive = fn_get_alive_players() id = 0 // Get the no of players we have to turn into assassins i_max_assassins = floatround( ( i_alive * get_pcvar_float( cvar_ratio ) ), floatround_ceil ) i_assassins = 0 // Randomly turn players into Assassins while (i_assassins < i_max_assassins) { // Keep looping through all players if ( (++id) > g_maxplayers) id = 1 // Dead if ( !is_user_alive(id) ) continue; // Random chance if (random_num(1, 5) == 1) { // Make user assassin zp_make_user_assassin(id) // Set his health set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) ) // Increase counter i_assassins++ } } // Turn the remaining players into snipers for (id = 1; id <= g_maxplayers; id++) { // Only those of them who are alive and are not assassins if ( !is_user_alive(id) || zp_get_user_assassin(id) ) continue; // Turn into a sniper zp_make_user_sniper(id) // Set his health set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) ) } } #if defined AMBIENCE_SOUNDS public start_ambience_sounds( ) { // Variables static amb_sound[64], sound, Float:duration // Select our ambience sound sound = random_num( 0, sizeof g_sound_ambience - 1 ) copy( amb_sound, sizeof amb_sound - 1 , g_sound_ambience[ sound ] ) duration = g_sound_ambience_duration[ sound ] // Check whether it's a wav or mp3, then play it on clients if ( equal( amb_sound[ strlen( amb_sound ) - 4 ], ".mp3" ) ) client_cmd( 0, "mp3 play ^"sound/%s^"", amb_sound ) else client_cmd( 0, "spk ^"%s^"", sound ) // Start the ambience sounds set_task( duration, "start_ambience_sounds", TASK_AMB ) } public zp_round_ended( winteam ) { // Stop ambience sounds on round end remove_task( TASK_AMB ) } #endif // This function returns the no. of alive players // Feel free to use this in your plugin when you // are making your own game modes. fn_get_alive_players( ) { static i_alive, id i_alive = 0 for ( id = 1; id <= g_maxplayers; id++ ) { if( is_user_alive( id ) ) i_alive++ } return i_alive; }