PDA

View Full Version : [FF2] [code] block kill, explode cmd on round start ?


AeroAcrobat
03-22-2013, 05:57
not sure if this should stay here on in scripting forum but its ff related.

I'd like to block kill and explode commands in freak fortress but only after the round has started. Not while players can still switch classes and after round end.

this is currently working but it blocks the commands all the time.
code is from: [TF2] Deathrun v1.2.1 (https://forums.alliedmods.net/showthread.php?t=201623)
public OnPluginStart()
{
AddCommandListener(BlockCommand, "kill");
AddCommandListener(BlockCommand, "explode");
}

/// Small userful thingy from cs:s deathrun manager made by Rogue plugin
public Action:BlockCommand(client, const String:command[], args) // Blocks use of commands USED FOR kill & explode things
{
return Plugin_Handled; // blocks command
}

Darthmule
03-22-2013, 06:37
Hi Aero, try this out and tell me if it works!

I am 77% certain that it functions, tell me as soon as possible if it doesn't work.

Darthmule
03-22-2013, 16:38
to the 7 downloaders, does it work, or is it just worthless?

AeroAcrobat
03-23-2013, 09:04
Hi Aero, try this out and tell me if it works!

I am 77% certain that it functions, tell me as soon as possible if it doesn't work.
hey,
tested it today, but its not working :(
kill is always blocked.

Darthmule
03-23-2013, 09:32
On line 41, replace it with this


return Plugin_Continue;

AeroAcrobat
03-23-2013, 10:33
On line 41, replace it with this


return Plugin_Continue;

lets me kill after setup round :c
edit: can use kill all the time now

Darthmule
03-23-2013, 12:06
lets me kill after setup round :c
edit: can use kill all the time now


public Action:BlockCommand(client, const String:command[], args)
{
if (!AllowSuicide)
return Plugin_Handled;

else
return Plugin_Stop;
}

Does it look like this?