Hardcoded commands - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Hardcoded commands (/Thread-Hardcoded-commands) |
Hardcoded commands - Leonidas - 11-08-2016 05:31 AM Trying to change my .go, Code: [function f_oncommand] So I'm lowering my plevel and testing to see if it works. I made it so ".go" doesn't work when lower than plevel 7, but if i type .go vesper it works. What do I add after the "GO" so it will stop everything? I figured "GO **" would work, but it did not. And yes I know I can change the default command plevel in spheretables, I'm just testing with this. RE: Hardcoded commands - Coruja - 11-08-2016 12:46 PM STRCMP and STRCMPI will check for values that are exactly the same. So if you check for "GO", it will only work for "GO" and not for "GO vesper", "GO 1234,4321", ... to check using "GO *" you must use STRMATCH, where * can be used Code: [function f_oncommand] RE: Hardcoded commands - ShiryuX - 11-09-2016 06:38 AM Code: if !strcmpi(go,<strarg <args>>) RE: Hardcoded commands - Leonidas - 11-10-2016 07:10 AM Awesome, thank you guys RE: Hardcoded commands - darksun84 - 11-10-2016 07:16 PM Why not put the GO command in the [PLEVEL 7] block? It's in spheretables.scp, then restart server. RE: Hardcoded commands - Leonidas - 11-11-2016 12:13 PM This wasn't the entire script, I've added a function after a staff with plevel 7 uses go, wanted to give my staff some "flashy" .go commands. |