ConCommand blocked!

I was wondering how to make certain commands allowed in following example:
[lua]
for k,v in pairs(player.GetAll()) do
v:ConCommand(“rp_toggleholster”)
v:ConCommand(“rp_toggleholster”)
end
[/lua]
I get a “ConCommand blocked! (rp_toggleholster)”
In my serverside console.

EDITED
nevermind, misread my own code lol

post the code for the rp_toggleholster command :slight_smile:

Anything with toggle in the name will get blocked

[lua]
function CCToggleHolster( ply, cmd, arg )

local weap = ply:GetActiveWeapon();

if( weap:IsValid() ) then

    local class = weap:GetClass();
    
    if( class == "weapon_physcannon" or
        class == "weapon_physgun" or
        class == "gmod_tool" or
        class == "ts2_zipties" ) then return; end

    local holstered = !ClientVars["Holstered"];
    ClientVars["Holstered"] = holstered;

    if( not holstered ) then

        weap:GetTable().Primary.PositionMode = 2;
        weap:GetTable().Primary.PositionTime = .3;
        weap:GetTable().Primary.PositionMul = 1;
        
    else
    
        weap:GetTable().Primary.PositionMode = 3;
        weap:GetTable().Primary.PositionTime = .3;
        weap:GetTable().Primary.PositionMul = 0;
                
    end

    RunConsoleCommand( "eng_toggleholster", "" );

end

end
concommand.Add( “rp_toggleholster”, CCToggleHolster );
[/lua]

[editline]08:18PM[/editline]

Really?

ok, good to know :stuck_out_tongue:
why on earth is it blocked tho?

Exploits

I have no idea… Prehaps what Tobba Said?[URL=“http://www.facepunch.com/member.php?u=189868”]

You have to change the name from rp_toggleholster to something without the word toggle in it.

[editline]04:17PM[/editline]

For example change this line: [lua]concommand.Add( “rp_toggleholster”, CCToggleHolster );[/lua] to [lua]concommand.Add( “rp_holster”, CCToggleHolster );[/lua]

How about the fact he is using [lua]RunConsoleCommand[/lua]

Change it to [lua]ConCommand[/lua]