script breaking from modifying

Hello, Help, I don't know much about scripting, I found this script on slingscripts archive, I think it's cool. I'd like to change the values of IP settings in it but when I do the script wont auto load. I'd also like to remove the added chat messages it gives but deleting that function seems to break the auto load as well. I'm unsure if there is another way to load a script other than the autoloader.

Maybe i'm missing something easy, not sure, i'm ignorant.


Comments

  • edited June 16

    Are you getting errors in the console when you compile/exec the version of the script you modified in place? It's possible you have a syntax error somewhere, which will be reported in the console with the affected line when it attempts to compile. If the original version continues to load instead, you may also have a cached precompiled .dso in your scripts folder that can be removed.

    If you want to load your own script experiments without fuss, any .cs script file you drop in scripts/autoexec/ under your active mod directory (or base) will automatically execute on start-up.

    At a quick glance to what you're trying to do, you don't want to delete that hooked clientCmdSetWeaponsHudActive function - it's where those interpolation values are being changed on weapon switch. If you want to remove the chat messages, just comment out or delete each addMessageHudLine call.

Sign In or Register to comment.