←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Flash działający tylko na CT

Locked

Snejk47's Photo Snejk47 15.12.2009

Witam, jak mogę zrobić flashe, które działaja tylko na CT? (nawet jeżeli CT go rzuci to ma działać tylko na CT)? Chodzi o jakiś prosty kod, aby mógł go wykorzystać (wkleić :P) do gotowego. Nie chce osobnego pluginu.

Pozdro.
Quote

  • +
  • -
Miczu's Photo Miczu 15.12.2009

public plugin_init()
{
	register_event("ScreenFade","det_fade","be","1!0","2!0","7!0")
}

public det_fade(id)
{
	if (get_user_team(id)==1) screen_fade(id,0,0,0,0,0)
}

stock screen_fade(id,r,g,b,alpha,tm){
	message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
	write_short( 1<<tm ) // fade lasts this long duration
	write_short( 1<<tm ) // fade lasts this long hold time
	write_short( 1<<12 ) // fade type (in / out)
	write_byte( r ) // fade red
	write_byte( g ) // fade green
	write_byte( b ) // fade blue
	write_byte( alpha ) // fade alpha
	message_end()
}
Quote

Snejk47's Photo Snejk47 15.12.2009

Dzięki wielki :*
Quote
Locked