I made some changes to my SH server, everything is working like I expected, but now I stucked at something, which I cannot find solution on the internet. You know, that hero with bindable power can be executed with bind "+power1". In my server, there is possible to have only one bindable hero, so I would like to have custom bind. For example, "+ability".
In file superheromod.sma with nvault save type, in plugin_init() function, after registering client commands, which I mean this:
PHP Code:
for (new x = 1; x <= SH_MAXBINDPOWERS; x++) {
new powerDown[10], powerUp[10]
formatex(powerDown, charsmax(powerDown), "+power%d", x)
formatex(powerUp, charsmax(powerUp), "-power%d", x)
register_clcmd(powerDown, "powerKeyDown")
register_clcmd(powerUp, "powerKeyUp")
}
I tried replace with my custom code:
PHP Code:
register_clcmd("+ability", "powerKeyDown")
register_clcmd("-ability", "powerKeyUp")
But unfortunately this doesn't work. Can you help me, what I need to edit to be able use +ability command?