Raised This Month: $ Target: $400
 0% 

[TF2] Holy Arrows (Beta)


Post New Thread Reply   
 
Thread Tools Display Modes
machede
Member
Join Date: Nov 2011
Location: Italia
Old 04-09-2012 , 11:42   Re: [TF2] Holy Arrows (Beta)
Reply With Quote #41

Quote:
Originally Posted by Horsedick View Post
You can change whatever you want...? It's really a simple change for one thing in the code unless of course you wish to change out the other notations of what the items are such as HolyRockets to BurningRockets etc etc...
Mr. Horsedick
sorry, are you able to create the file of: "rotating planets sentry effect".
if you can do it, can you inviate me to email?
thanks.
machede is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 04-09-2012 , 15:51   Re: [TF2] Holy Arrows (Beta)
Reply With Quote #42

Quote:
Originally Posted by machede View Post
Mr. Horsedick
sorry, are you able to create the file of: "rotating planets sentry effect".
if you can do it, can you inviate me to email?
thanks.
I've not tried with a sentry... may not work.

In the mean time I'm just waiting on options for this on/off addition before I continue fooling with it.
Horsedick is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 04-09-2012 , 17:50   Re: [TF2] Holy Arrows (Beta)
Reply With Quote #43

I'll add a per-player toggle once I finish some updates to my other plugins.
__________________
DarthNinja is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 04-09-2012 , 17:54   Re: [TF2] Holy Arrows (Beta)
Reply With Quote #44

Quote:
Originally Posted by DarthNinja View Post
I'll add a per-player toggle once I finish some updates to my other plugins.
Great..thanks DN
Horsedick is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 04-14-2012 , 00:58   Re: [TF2] Holy Arrows (Beta)
Reply With Quote #45

This version (1.1.2.5) adds the command sm_holy to toggle holy arrows on/off on a per-player basis.
Currently the command is set to public use, however this can be modified via SourceMod's admin_overrides.cfg.

The command is: sm_holy [0/1], where the argument is optional.

@DarthNinja and the curious. I added the following. Feel free to incorporate it into the current plugin.
Code:
new bool:b_PlayerEnabled[MAXPLAYERS+1] = {true, ...};

In OnPluginStart():
RegAdminCmd("sm_holy", OnHolyCmd, 0, "Toggles Holy Arrows on/off");

Added OnHolyCmd():
public Action:OnHolyCmd(client, args)
{
	if (GetConVarBool(v_Enabled))
	{
		if (args == 0)
		{
			b_PlayerEnabled[client] = !(b_PlayerEnabled[client]);
			PrintToChat(client, "[SM] Holy arrows are now %s!", (b_PlayerEnabled[client]?"enabled":"disabled"));
		}
		else if (args == 1)
		{
			decl String:s_Arg1[32];
			GetCmdArg(1, s_Arg1, sizeof(s_Arg1));
			if (StringToInt(s_Arg1) == 0)
			{
				b_PlayerEnabled[client] = false;
			}
			else
			{
				b_PlayerEnabled[client] = true;
			}
			PrintToChat(client, "[SM] Holy arrows are now %s.", (b_PlayerEnabled[client]?"enabled":"disabled"));
		}
		else
		{
			ReplyToCommand(client, "[SM] Usage: sm_holy [0/1]");
		}
	}
	else
	{
		ReplyToCommand(client, "[SM] Plugin is not enabled.");
	}
	return Plugin_Handled;
}

Changed 2nd line in Arrow():
if(client < 1 || !(b_PlayerEnabled[client]))

And finally added OnClientDisconnect() to reset the bool:
public OnClientDisconnect(client)
{
	b_PlayerEnabled[client] = true;
}
Enjoy!

Edit: If you want the plugin's holy arrows disabled to players by default (i.e. when they join) then in the code above change the top line's true to false and the 2nd to last line to false as well.

Edit2: I'm too lazy to change it, but in the alpha version you might want to change '1 = Huntsman, 2 = Medic' to either Huntsman+Crossbow or Sniper+Medic instead of a mix of the two.
Attached Files
File Type: sp Get Plugin or Get Source (HolyArrows.sp - 395 views - 6.7 KB)
File Type: smx HolyArrows.smx (5.7 KB, 191 views)

Last edited by 11530; 04-14-2012 at 01:25.
11530 is offline
Otokiru
Senior Member
Join Date: Apr 2012
Old 06-10-2012 , 09:14   Re: [TF2] Holy Arrows (Beta)
Reply With Quote #46

Anybody know how to attach a custom .pcf file to this plugin?
Otokiru is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 06-10-2012 , 21:54   Re: [TF2] Holy Arrows (Beta)
Reply With Quote #47

You should add "ALLELUJA" sound (holy hand granade from worms sound) when killing someone
__________________
Velture is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode