[script] Power Struggle System Edit Entry

YEA
✔️ HL Verified
Joined
Oct 31, 2014
Messages
201
Best answers
0
Location
CHINA
in this case, you can write your own power struggle effects if you want.

PHP:
#include <amxmodx>
#include <engine>
#include <fakemeta>

public plugin_init() 
{ 
	register_plugin("PowerStruggleEditEntry", "1.0", "ESFKAMI") 
	register_message(get_user_msgid("PowerStrug"), "PowerStruggle") 
}

public PowerStruggle(megid, param, Client)//Hook 
{
	if(get_msg_arg_int(1) == 127) //Debug
	return;

	if(get_pdata_int(Client, 198) == 1) //Block Struggle
	{
		if(get_msg_arg_int(1) < 0) //While the client is going to lose
		{ 
			entity_set_float( Client, EV_FL_fuser4, 1000.0 )
			client_print(Client, print_center, "[Blocking] %d", get_msg_arg_int(1))

			//Add your own effects here...
		}

		if(get_msg_arg_int(1) > 0) //While the client is going to win
		{ 
			entity_set_float( Client, EV_FL_fuser4, 10.0 )
			client_print(Client, print_center, "[Blocking] %d", get_msg_arg_int(1))

		//Add your own effects here...
		}
	}
	else //Beam Struggle
	{
		if(get_msg_arg_int(1) < 0) //While the client is going to lose
		{ 
			entity_set_float( Client, EV_FL_fuser4, 1000.0 )
			client_print(Client, print_center, "%d", get_msg_arg_int(1))

			//Add your own effects here...
		}

		if(get_msg_arg_int(1) > 0) //While the client is going to win
		{ 
			entity_set_float( Client, EV_FL_fuser4, 10.0 )
			client_print(Client, print_center, "%d", get_msg_arg_int(1))

			//Add your own effects here...
		}
	}

	//set_msg_arg_int(1, ARG_BYTE, 100) //-100 ~ 100: -100 = lose, 100 = win, this only changes the StruggleHud of clients.
}
 

Users who are viewing this thread

Top Bottom