AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Doomsday Nuke (https://forums.alliedmods.net/showthread.php?t=240606)

Pelipoika 05-18-2014 14:27

[TF2] Doomsday Nuke
 
1 Attachment(s)
[TF2] The Doomsday nuke

Description:

Allows you to place the nuke from the end of sd_doomsday at wherever you're pointing (With radiation and fancy particle effects)

Cmands:

sm_nuke (default acces: ROOT): "Place a nuke at your cursor location".

CVars:

sm_radiation_damage (default: 10.0) How much damage the radiation does.
sm_nuke_delay (default 6.1) How long after the command a nuke will explode.
Changelog:

1.0 - First release.
1.1
- Changed override sm_nuke to sm_nuke_acces due to issues.
- Changed PrecacheModel to PrecacheGeneric.
- Added sm_nuke_delay.
1.2 - Removed sm_nuke_acces override, just override sm_nuke
1.3
- Converted to 1.7 syntax
- Now damages everything you'd expect and explosion to damage
- No longer damages through walls

404UserNotFound 05-18-2014 21:05

Re: [TF2] Doomsday Nuke
 
PHP Code:

PrecacheModel("mvm_path_marker"); 

Why are you precaching particles using PrecacheModel? I'm confused.

martellus 05-18-2014 22:19

Re: [TF2] Doomsday Nuke
 
Admin restriction doesn't seem to work. I left it at default and I had a random player spamming nukes everywhere.

404UserNotFound 05-18-2014 23:18

Re: [TF2] Doomsday Nuke
 
Quote:

Originally Posted by martellus (Post 2139698)
Admin restriction doesn't seem to work. I left it at default and I had a random player spamming nukes everywhere.

Command should really be a RegAdminCmd with an ADMFLAG specified.

ddhoward 05-19-2014 02:31

Re: [TF2] Doomsday Nuke
 
PHP Code:

public OnPluginStart()
{
    
RegConsoleCmd("sm_nuke"Command_Nuke"Place a nuke at your curson");
    
// ...
}

public 
Action:Command_Nuke(clientargs)
{
    if(!
CheckCommandAccess(client"sm_nuke_acces"ADMFLAG_ROOT))
        return 
Plugin_Handled;
    
// ...


why

PHP Code:

public OnPluginStart()
{
    
RegAdminCmd("sm_nuke"Command_NukeADMFLAG_KICK"Place a nuke at your cursor");
    
// ...
}

public 
Action:Command_Nuke(clientargs)
{
    
// if(!CheckCommandAccess(client, "sm_nuke_acces", ADMFLAG_ROOT))
    //    return Plugin_Handled;
    // this shit ain't needed no more

    // ...


also access has 2 s's

Pelipoika 05-19-2014 02:46

Re: [TF2] Doomsday Nuke
 
Quote:

Originally Posted by ddhoward (Post 2139762)
PHP Code:

public OnPluginStart()
{
    
RegConsoleCmd("sm_nuke"Command_Nuke"Place a nuke at your curson");
    
// ...
}

public 
Action:Command_Nuke(clientargs)
{
    if(!
CheckCommandAccess(client"sm_nuke_acces"ADMFLAG_ROOT))
        return 
Plugin_Handled;
    
// ...


why

PHP Code:

public OnPluginStart()
{
    
RegAdminCmd("sm_nuke"Command_NukeADMFLAG_KICK"Place a nuke at your cursor");
    
// ...
}

public 
Action:Command_Nuke(clientargs)
{
    
// if(!CheckCommandAccess(client, "sm_nuke_acces", ADMFLAG_ROOT))
    //    return Plugin_Handled;
    // this shit ain't needed no more

    // ...


also access has 2 s's

Because i thought that in order to override sm_nuke you'd need to do something fancy in the code

xDeRpYx 06-17-2014 16:55

Re: [TF2] Doomsday Nuke
 
Oh this is fun to use~
http://www.derpygamers.com/dlbox/Adm...in%20Nuke.html <thats a video link btw to what it looks like

Such boom

FlaminSarge 06-18-2014 14:40

Re: [TF2] Doomsday Nuke
 
Pelipoika: there was a change to SM a while ago that made RegConsoleCmd the same as RegAdminCmd in terms of command overridability. You should go with howard's advice, RegAdminCmd, since the point of CheckCommandAccess is now more to prevent specific features on a command from being accessible (e.g. targetting abilities).
Of note, it was RegConsoleCmd that wasn't overridable, where RegAdminCmd always was (both behave the same now, so you might as well just set the flag when you create the command rather than later).

Pelipoika 06-18-2014 14:52

Re: [TF2] Doomsday Nuke
 
Quote:

Originally Posted by FlaminSarge (Post 2153648)
Pelipoika: there was a change to SM a while ago that made RegConsoleCmd the same as RegAdminCmd in terms of command overridability. You should go with howard's advice, RegAdminCmd, since the point of CheckCommandAccess is now more to prevent specific features on a command from being accessible (e.g. targetting abilities).
Of note, it was RegConsoleCmd that wasn't overridable, where RegAdminCmd always was (both behave the same now, so you might as well just set the flag when you create the command rather than later).

I changed it to RegAdminCmd soon after Howard posted

Sreaper 06-18-2014 18:16

Re: [TF2] Doomsday Nuke
 
Cool plugin, though it seems to have no effect on explosive barrels, or player buildings. Any chance of updating your plugin to damage those too?


All times are GMT -4. The time now is 15:43.

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