Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

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.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

proszę o dodanie Flagi H


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 ZombieKiller

    Pomocny

  • Użytkownik

Reputacja: 6
Nowy

  • Postów:60
  • Imię:Marcin
  • Lokalizacja:Nie Wiem
Offline

Napisano 09.08.2013 12:53

#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#include <fakemeta>
#include <engine>

new const PLUGIN[] = "[CSO] Class String Finger"
new const VERSION[] = "1.0"
new const AUTHOR[] =  "ShuriK"

new const zclass1_name[] = { "String Finger[**ViP**]" }
new const zclass1_info[] = { "Q - Gravity , G - Long Attack " }
new const zclass1_model[] = { "resident_zombi_host" }
new const zclass1_clawmodel[] = { "v_knife_zombieresident.mdl" }
const zclass1_health = 2500
const zclass1_speed = 240 

const Float:zclass1_gravity = 1.0 //Гравитация в обычном режиме
const Float:zclass1_knockback = 1.0 //Отдача
const Float:gravity_time = 10.0 //Czas Gravity;
const Float:realod_gravity  =  20.0 //Odliczanie do grawitacji;
const Float:realod_gmg  = 20.0 //Countdown wyciągnąć ręce;
const Float:finger_gravity = 0.2 //Ciężkości zdolność;

const dmg_long = 100 //Uszkodzenia rozciąganie rąk;
const Distance = 300 //Odległość do rysowania rąk;

const MAX_CLIENTS = 32 ;

const FINGER_MAX_STRING = 128;

enum _:FINGER_ANIMATIONS
{
	LongDamageAnim   = 8,
	GravAnim      = 9,
	EndGrav        = 10,
	skill1        = 91,
	skill2       = 98
};

enum _:FINGER_SOUNDS
{
	SKILL_2 = 0,
	SKILL_1,
	OVER_SKILL_GRAV,
	STAB,
	STAB_MISS,
	DEATH,
	INFECT,
	PAIN1,
	PAIN2
};

new g_stinger_sound[FINGER_SOUNDS][FINGER_MAX_STRING] = 
{
	"zombi/resident_skill2.wav",
	"zombi/resident_skill1.wav",
	"zombi/resident_tw.wav" ,
	"zombi/resident_stab.wav" ,
	"zombi/resident_stab_miss.wav" ,
	"zombi/resident_death.wav" ,
	"zombi/resident_infect.wav" ,
	"zombi/resident_hurt1.wav" ,
	"zombi/resident_hurt1.wav"
};

new g_string , 
    g_msgScreenFade,
	g_damage_use[ MAX_CLIENTS + 1 ] , 
    g_gravity_use[ MAX_CLIENTS + 1] ,
    g_coldown[ MAX_CLIENTS + 1 ] ,
    g_clodown_grav[MAX_CLIENTS + 1] ,
    g_coldown_dmg_time[MAX_CLIENTS + 1] , 
	g_coldown_grav_time[MAX_CLIENTS + 1] ;
     
public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR) ;
	
	register_forward(FM_CmdStart , "fm_cmdstart" ) ;
	
	register_clcmd("drop" , "Abil_LongDmg" );
	
	RegisterHam(Ham_TakeDamage, "player", "String_TakeDamage");
	
	register_event("DeathMsg", "Death", "a");
	
	g_msgScreenFade = get_user_msgid("ScreenFade");
	
	register_dictionary( "zp_string.txt" ) ;
}

public plugin_precache()
{
	g_string = zp_register_zombie_class(zclass1_name, zclass1_info, zclass1_model, zclass1_clawmodel, zclass1_health, zclass1_speed, zclass1_gravity, zclass1_knockback) ;
	
	static i ;
	
	for(i = 0; i < sizeof g_stinger_sound; i++)
	{
		precache_sound(g_stinger_sound[i]);
	}
}

public Death()
{
	new player = read_data(2)

	if(zp_get_user_zombie(player) && zp_get_user_zombie_class(player) == g_string && !zp_get_user_nemesis(player))
	{
		engfunc( EngFunc_EmitSound, player, CHAN_ITEM, g_stinger_sound[DEATH], 1.0, ATTN_NORM, 0, PITCH_NORM)	
	}
}


public zp_user_infected_post( player  )
{
	if(zp_get_user_zombie_class(player) == g_string && !zp_get_user_nemesis(player))
	{
		g_damage_use[player] = false 
		g_gravity_use[player] = false 
		
		g_coldown[player] = false 
		g_clodown_grav[player] = false 
		
		engfunc( EngFunc_EmitSound, player, CHAN_ITEM, g_stinger_sound[INFECT], 1.0, ATTN_NORM, 0, PITCH_NORM)
		
		g_coldown_dmg_time[player] = floatround(realod_gmg) 
		g_coldown_grav_time[player] = floatround(realod_gravity) 
		remove_task(player) 

		cahtcol(player , "%L" , LANG_PLAYER , "FINGER")
		{
			return PLUGIN_HANDLED
		}
	}
	
	return PLUGIN_CONTINUE	 
}

public String_TakeDamage(player, iVictim, iInflictor, iAttacker, Float:flDamage, bitsDamage)
{
	if (zp_get_user_zombie_class(player) == g_string && zp_get_user_zombie(player) && !zp_get_user_nemesis(player))
	{
		switch(random_num(1,2))
  		{
			case 1: emit_sound(player, CHAN_WEAPON, g_stinger_sound[PAIN1], 1.0, ATTN_NORM, 0, PITCH_LOW)
			case 2: emit_sound(player, CHAN_WEAPON, g_stinger_sound[PAIN2], 1.0, ATTN_NORM, 0, PITCH_LOW)
		}
	}
} 
 
public client_connect(player)
{
	g_damage_use[player] = false 
	g_gravity_use[player] = false 
}

public client_disconnect(player)
{
	g_damage_use[player] = false 
	g_gravity_use[player] = false 
}
	
public fm_cmdstart(player , UC_Handle , seed)
{
	if (!is_user_alive(player))
	{
		return FMRES_IGNORED
	}
		
	if(zp_get_user_zombie_class(player) == g_string && zp_get_user_zombie(player) && !zp_get_user_nemesis(player))
	{
		if(g_clodown_grav[player] == 0)
		{
			new gButton, gOldButton 
			
			gButton = get_uc(UC_Handle, UC_Buttons) 
			gOldButton = pev(player, pev_oldbuttons) 
			
			if((gButton & IN_RELOAD) && !(gOldButton & IN_RELOAD))
		    {
                   UTIL_Gravity(player) 
            }
	    } 
	}	
	return FMRES_IGNORED 
}

public Abil_LongDmg(player)
{
	if (!is_user_alive(player))
	{
		return FMRES_IGNORED
	}
	
	if(zp_get_user_zombie_class(player) == g_string && zp_get_user_zombie(player) && !zp_get_user_nemesis(player))
	{
		if(g_coldown[player] == 0)
		{
			UTIL_LongDamage(player)
		}
	}
	
	return FMRES_IGNORED 
}

stock UTIL_Gravity(player)
{
	if (!is_user_alive(player))
	{
		return FMRES_IGNORED
	}
	
	if(zp_get_user_zombie_class(player) == g_string && zp_get_user_zombie(player) && !zp_get_user_nemesis(player))
	{
				   g_gravity_use[player] = true 
				   
				   UTIL_PlayAnim(player , GravAnim) 
				   
				   g_clodown_grav[player] = true 
				   
				   UTIL_ScreenFade(player , 255 , 255 , 255)
				   
				   entity_set_int( player , EV_INT_sequence, skill2) 
				   
				   set_pdata_float(player , 83, 1.0 , 5) 
	               
				   set_pev( player, pev_gravity, finger_gravity )
				   
				   set_task(gravity_time , "remove_abil" , player )  
				   
				   g_coldown_grav_time[player] = floatround(realod_gravity) 
				   
				   set_task(1.0, "ShowHUD_grav", player , _, _, "a",g_coldown_grav_time[player]) 
				   
				   set_task(realod_gravity , "reset_grav" , player)		 		   
	}
	return FMRES_IGNORED 
}	

public ShowHUD_grav(player)
{
	if(is_user_alive(player) && zp_get_user_zombie(player))
	{
	     g_coldown_grav_time[player] = g_coldown_grav_time[player] - 1 
	     set_hudmessage(200, 100, 0, -1.0, 0.87, 0, 1.0, 1.1, 0.0, 0.0 , -1) 
	     show_hudmessage(player, "%L", LANG_PLAYER, "GRAV_USE" , g_coldown_grav_time[player])
	}
	else
    {
        remove_task(player)
	} 	
}


public remove_abil(player)
{
	if (!is_user_alive(player))
	{
		return FMRES_IGNORED
	}
	
	if(zp_get_user_zombie_class(player) == g_string && zp_get_user_zombie(player) && !zp_get_user_nemesis(player))
	{
	   g_gravity_use[player] = false  
	
	   set_pev( player, pev_gravity, zclass1_gravity ) 
	
	   UTIL_PlayAnim(player , EndGrav) 
	  
	   UTIL_ScreenFade(player , 255 , 255 , 255)
	
	   cahtcol(player , "%L" , LANG_PLAYER , "FINGER_GRAV_OVER" )  
	}  
	return FMRES_IGNORED 
	
}

public reset_grav(player)
{
	if (!is_user_alive(player))
	{
		return FMRES_IGNORED
	}
	
	if(zp_get_user_zombie_class(player) == g_string && zp_get_user_zombie(player) && !zp_get_user_nemesis(player))
	{
		g_clodown_grav[player] = 0
		
		cahtcol(player , "%L" , LANG_PLAYER , "FINGER_GRAV_ALLREADY" )  
	}
	return FMRES_IGNORED
}	
   

stock UTIL_LongDamage(player)
{
	if (!is_user_alive(player))
	{
		return FMRES_IGNORED
	}
	
	if(zp_get_user_zombie_class(player) == g_string && zp_get_user_zombie(player) && !zp_get_user_nemesis(player))
	{
		g_damage_use[player] = true  
		
		UTIL_PlayAnim( player , LongDamageAnim ) 
		
		entity_set_int( player , EV_INT_sequence, skill1) 

		g_coldown[player] = 1
		
		UTIL_ScreenFade(player , 0 , 255 , 0)
		
		set_pdata_float(player , 83, 1.0 , 5) 
		
		Skill(player) 
		
		set_task(realod_gmg , "reset_abil" , player) 
		
		g_coldown_dmg_time[player] = floatround(realod_gmg) 
		
		set_task(1.0, "ShowHUD", player , _, _, "a",g_coldown_dmg_time[player]) 
	}
	
	return FMRES_IGNORED 
}

public ShowHUD(player)
{
	if(is_user_alive(player) && zp_get_user_zombie(player))
	{
	    g_coldown_dmg_time[player] = g_coldown_dmg_time[player] - 1  
	    set_hudmessage(200, 100, 0, 0.80, 0.87, 0, 1.0, 1.1, 0.0, 0.0 , -1) 
	    show_hudmessage(player, "%L", LANG_PLAYER, "DMG_USE" , g_coldown_dmg_time[player]) 
	}
	else
    {
       remove_task(player) 
    }	   
}

stock Skill(player)
{
	if (!is_user_alive(player))
	{
		return FMRES_IGNORED;
	}
	
	static gBody , gTarget  
	get_user_aiming(player , gTarget , gBody , Distance) 
	
	if(gTarget)
	{
		if(is_user_alive(gTarget))
		{
			switch(gBody)
			{
				case HIT_STOMACH: dmg_long * 2.0
				case HIT_HEAD: dmg_long * 3.0 
				case HIT_LEFTARM: dmg_long * 1.0
				case HIT_RIGHTARM: dmg_long * 1.0
				case HIT_LEFTLEG: dmg_long * 0.5
				case HIT_RIGHTLEG: dmg_long * 0.5
			}
			
			ExecuteHamB(Ham_TakeDamage, gTarget, 0, player, dmg_long, DMG_SLASH) 
		}
	}
	return FMRES_IGNORED 
}

public reset_abil(player)
{
	if (!is_user_alive(player))
	{
		return FMRES_IGNORED
	}
	
	if(zp_get_user_zombie_class(player) == g_string && zp_get_user_zombie(player) && !zp_get_user_nemesis(player))
	{
		g_coldown[player] = 0 
		
		cahtcol(player , "%L" , LANG_PLAYER , "FINGER_DMG_ALLREADY" )  
	}
	return FMRES_IGNORED
}
	
stock UTIL_ScreenFade( player, r = 0, g = 0, b = 0)
{
	message_begin( MSG_ONE_UNRELIABLE, g_msgScreenFade, .player = player );
	write_short(  1 << 12  );
	write_short(  1 << 12  );
	write_short( 0x0000 );
	write_byte( r );
	write_byte( g );
	write_byte( b );
	write_byte( 80 );
	message_end( );
}
	
stock UTIL_PlayAnim(player , seq)
{
	set_pev(player, pev_weaponanim, seq)
	
	message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = player)
	write_byte(seq)
	write_byte(pev(player, pev_body))
	message_end()
}	

stock cahtcol(const player, const input[], any:...)
{
    new count = 1, players[32]
    static msg[191]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!g", "^4")
    replace_all(msg, 190, "!y", "^1")
    replace_all(msg, 190, "!team", "^3")
    
    if (player) players[0] = player; else get_players(players, count, "ch")
    {
        for (new i = 0; i < count; i++)
        {
            if (is_user_connected(players[i]))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
                write_byte(players[i]);
                write_string(msg);
                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 }
*/

moze mi ktos dac to na Flage H Admin lvl H 

 

bo ja nie ogarniam tego dziekuje za pomoc dam++

Załączone pliki


Użytkownik ZombieKiller edytował ten post 09.08.2013 12:56

  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych