I have a button within a map that resets a bunch of destructibles - how do I go about making my gamemode script "press" it?
I've tried
[lua]game.ConsoleCommand("ent_fire button_reset use\n")[/lua]
but ingame it the console says "Command Blocked!" because apparantly ent_fire is illegal. Whats another method of doing it / getting around it?
I think you could search for the ent and fire it directly?
Use this [B][URL="http://wiki.garrysmod.com/?title=Ents.FindByName"]Ents.FindByName[/URL][/B] to find your entity, then run [B][URL="http://wiki.garrysmod.com/?title=Entity.Input"]Entity.Input[/URL][/B] on it.
[QUOTE=IceBreaker88;34255545]I think you could search for the ent and fire it directly?
Use this [B][URL="http://wiki.garrysmod.com/?title=Ents.FindByName"]Ents.FindByName[/URL][/B] to find your entity, then run [B][URL="http://wiki.garrysmod.com/?title=Entity.Input"]Entity.Input[/URL][/B] on it.[/QUOTE]
That works <3
Sorry, you need to Log In to post a reply to this thread.