Raised This Month: $68 Target: $400

Custom key down for heroes (+power1)

Post New Thread Reply   
Thread Tools Display Modes
Author Message
New Member
Join Date: Jul 2011
Old 01-06-2016 , 13:28   Custom key down for heroes (+power1)
Reply With Quote #1

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 1<= SH_MAXBINDPOWERSx++) {
powerDown[10], powerUp[10]
formatex(powerDowncharsmax(powerDown), "+power%d"x)
formatex(powerUpcharsmax(powerUp), "-power%d"x)

I tried replace with my custom code:
PHP Code:
But unfortunately this doesn't work. Can you help me, what I need to edit to be able use +ability command?
Debute is offline
Veteran Member
Join Date: Dec 2012
Old 12-21-2016 , 00:56   Re: Custom key down for heroes (+power1)
Reply With Quote #2

I dont really know coding much but shouldnt it be

PHP Code:
        new powerDown[10], powerUp[10
formatex(powerDowncharsmax(powerDown), "+ability"
formatex(powerUpcharsmax(powerUp), "-ability"

Not sure about that at all tho. Or is that the same as you did?

Good luck.

Last edited by maxolahird; 12-21-2016 at 00:58.
maxolahird is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 22:58.

Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode