| Blockland Forums > Modification Help |
| Reload script with keybind? |
| << < (2/3) > >> |
| Fluff-is-back:
Or if you still want to... --- Code: ---$scriptPath = "Config/Script.cs"; $remapDivision[$remapCount] = "Script Reload"; $remapName[$remapCount] = "Reload"; $remapCmd[$remapCount] = "reloadScript"; $remapCount++; function reloadScript() { exec($scriptPath); } --- End code --- |
| Swollow:
--- Code: ---===Client=== $remapDivision[$remapCount] = "Reloading"; $remapName[$remapCount] = "Reload"; $remapCmd[$remapCount] = "Reloadcommand"; $remapCount++; function Reloadcommand(%val) { if(%val) { commandtoserver('Reload',""); } } ===Server=== function servercmdreload(%client) { <stuff here> } --- End code --- Something like this? |
| phflack:
i'd suggest making it be a server command, like /light, that way people don't need a client sided addon to use it |
| Swollow:
--- Quote from: phflack on September 25, 2011, 03:02:05 PM ---i'd suggest making it be a server command, like /light, that way people don't need a client sided addon to use it --- End quote --- You could use my way if they don't have the client addon they can type /reload |
| phflack:
true, but it's probably easier to just use an already existing keybind |
| Navigation |
| Message Index |
| Next page |
| Previous page |