Is it possible to edit lua for a weapon whilst in game?
4 replies, posted
Basically what the title says. Im wondering if there is way i can edit the lua for a weapon such as bullet spread etc without having to then close the game and wait for it to all load back up?
Thanks.
Yes, type "lua_reloadents" into console (or bind a key to it).
For scripted effects however you need to force a map change.
You can reload effects during a game. Its just a different command. "effects_reload"
[QUOTE=CmdrMatthew;32068610]You can reload effects during a game. Its just a different command. "effects_reload"[/QUOTE]
...Holy poo, I love you.
step 1:
download this:
[url]http://www.garrysmod.org/downloads/?a=view&id=78199[/url]
step 2:
copy your weapon code into it
step 3:
make the first line
[lua]SWEP = player.GetByID(1):GetActiveWeapon()//in SP you are always player 1[/lua]
notes:
this doesn't work on C++ weapons(crowbar, 357, RPG, grenade, etc...)
you aren't editing the actual indexed SWEP, so if you die, it will reset.
Sorry, you need to Log In to post a reply to this thread.