Hello, I have an issue with my server, running f2s stronghold. The video below basically explains it all.
[url]https://www.youtube.com/watch?v=XChC-1POrwo&feature=youtu.be[/url]
I have attempted at solving it with this:
[code]
hook.Add( "KeyPress", "RemoveEntity", function( ply, key )
if ( ply:GetActiveWeapon():GetClass() == "weapon_sh_tool" ) then
if(key == KEY_1 or key == KEY_2 or key == KEY_3 or key == KEY_4)then
for k, ent in pairs( ents.FindByName("GhostEntity"))do
ent:Remove()
end
end
end
end )
[/code]
but that seems to have no effect.
Change the entity to C_BaseFlex like you told me... Also, you don't need to make 20 threads for the same problem; don't mark the others as solved
[QUOTE=code_gs;48616263]Change the entity to C_BaseFlex like you told me... Also, you don't need to make 20 threads for the same problem; don't mark the others as solved[/QUOTE]
my code:
[code]
hook.Add( "KeyPress", "RemoveEntity", function( ply, key )
if ( ply:GetActiveWeapon():GetClass() == "weapon_sh_tool" ) then
if(key == KEY_1 or key == KEY_2 or key == KEY_3 or key == KEY_4)then
for k, ent in pairs( ents.FindByName("C_BaseFlex"))do
ent:Remove()
end
end
end
end )
[/code]
I still have the issue and the code seems to have no effect at all
this is what my lua file looks like so far: [url]http://185.38.148.82/~moogamin/tool%20gun/weapon_sh_tool/stools/weaponcrate.lua[/url]
but it has absolutely no effect
code: (right at the bottom)
[code]
hook.Add( "KeyPress", "RemoveEntity", function( ply, key )
if(key == KEY_1 or key == KEY_2 or key == KEY_3 or key == KEY_4)then
self.GhostEntity:Remove()
end
end)
[/code]
Sorry, you need to Log In to post a reply to this thread.