AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Holy Arrows (Beta) (https://forums.alliedmods.net/showthread.php?t=145777)

machede 04-09-2012 11:42

Re: [TF2] Holy Arrows (Beta)
 
Quote:

Originally Posted by Horsedick (Post 1685339)
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.

Horsedick 04-09-2012 15:51

Re: [TF2] Holy Arrows (Beta)
 
Quote:

Originally Posted by machede (Post 1685364)
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.

DarthNinja 04-09-2012 17:50

Re: [TF2] Holy Arrows (Beta)
 
I'll add a per-player toggle once I finish some updates to my other plugins.

Horsedick 04-09-2012 17:54

Re: [TF2] Holy Arrows (Beta)
 
Quote:

Originally Posted by DarthNinja (Post 1685647)
I'll add a per-player toggle once I finish some updates to my other plugins.

Great..thanks DN

11530 04-14-2012 00:58

Re: [TF2] Holy Arrows (Beta)
 
2 Attachment(s)
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. :)

Otokiru 06-10-2012 09:14

Re: [TF2] Holy Arrows (Beta)
 
Anybody know how to attach a custom .pcf file to this plugin? :3

Velture 06-10-2012 21:54

Re: [TF2] Holy Arrows (Beta)
 
You should add "ALLELUJA" sound (holy hand granade from worms sound) when killing someone :D


All times are GMT -4. The time now is 14:26.

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