For some reason my tool's client-side LeftClick, RightClick and Reload hooks are not called in single-player mode.
I'm currently working around that issue with PlayerBindPress.
The disadvantage of that is that I cannot detect whether the weapon selection menu is open, making it harder to switch away from the tool.
Can I fix on of these problems somehow?
I also noticed this. The only workaround that I could think of is to send an usermessage from the server when one of these functions get called.
a user message takes too long.
one of the main advantages of my tool over its predecessor is that it does selection on the server and only sends back the selected element when done, thus greatly increasing the speed with which you can select stuff.
using a user message would remove most of that advantage
I'd rather extend my PlayerBindPress hook to check when the weapon selection menu is open by checking for the slot*/invprev/next binds :D
I don't see why people even use singleplayer to test scripts.. You should always do testing on a dedicated if possible, or a listen server with scriptenforcer..
And if it's in singleplayer, the usermessage should be essentially instantaneous..
Singleplayer is faster to restart (and start), if you can't reload your script.
[QUOTE=Kill coDer;19661247]I don't see why people even use singleplayer to test scripts.. You should always do testing on a dedicated if possible, or a listen server with scriptenforcer..
And if it's in singleplayer, the usermessage should be essentially instantaneous..[/QUOTE]
I prefer a single solution for both singleplayer and multiplayer.
the reason I test my stuff in singleplayer is that gmod caches client-side scripts, so I cannot reload them from disk
PS: you do know [url=http://www.facepunch.com/showthread.php?t=769149]lua_reloadent[/url], right?
just in case anyone cares, I solved the problem now.
I extended my PlayerBindPress hook and it's probably going to stay this way, as it works perfectly
[url]http://codepad.org/5jsudiiu[/url]
Sorry, you need to Log In to post a reply to this thread.