←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

Edycja pluginu speeds.amxx

  • +
  • -
Wiciu1987 - zdjęcie Wiciu1987 14.03.2015

Jak w temacie, czy mógłby mi ktoś dodać do pluginu po wyciągnięciu noża efekt że gracz stanie się na w pół przeźroczysty ??

P.S Zapomniałem dodać wcześniej dodać kod.sma  

Załączone pliki

Odpowiedz

  • +
  • -
Maciejek. - zdjęcie Maciejek. 16.03.2015

daj znać.

#include <amxmodx>
#include <cstrike>
#include <fun>
 
#define PLUGIN	"Various Weapon Speeds"
#define AUTHOR	"v3x"
#define VERSION	"1.03"
 
 
new bool:speed = false
 
public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR)
	register_event("CurWeapon","check_speed","be")
	register_cvar("knife_speed","390")
	register_cvar("c4_speed","230")
	register_cvar("awp_speed","230")
	register_logevent("new_round",2,"1=Round_Start")
	set_cvar_num("mp_freezetime",0)
}
 
public new_round()
{
	speed = false
	new ft = get_cvar_num("mp_freezetime")
	set_task(float(ft),"allow_speed",0)
	return PLUGIN_CONTINUE
}
 
public allow_speed()
{
	speed = true
	return PLUGIN_HANDLED
}
 
 
public check_speed(id)
{
	// If the speed var is false..
	if(!speed) {
		// Stop the function
		return PLUGIN_HANDLED
	}
 
	// Get the users weapon
	new clip, ammo
	new weapon = get_user_weapon(id,clip,ammo)
 
	switch(weapon)
	{
		case CSW_KNIFE:
		{
			// Set the speed for the knife
			set_user_maxspeed(id,float(get_cvar_num("knife_speed")))
			set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderTransAlpha, 125)
		}
 
		case CSW_C4:
		{
			// Set the speed for the C4
			set_user_maxspeed(id,float(get_cvar_num("c4_speed")))
		}
		case CSW_AWP:
		{
			// Set the speed for the AWP
			set_user_maxspeed(id,float(get_cvar_num("awp_speed")))
		}
	}
	return PLUGIN_CONTINUE
}

Odpowiedz

  • +
  • -
Wiciu1987 - zdjęcie Wiciu1987 16.03.2015

Cały czas są na w pół przeźroczyści, a mają być wtedy jak wyciągną nóż.

Odpowiedz