Raised This Month: $51 Target: $400
 12% 

Custom key down for heroes (+power1)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Debute
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++) {
        new 
powerDown[10], powerUp[10]
        
formatex(powerDowncharsmax(powerDown), "+power%d"x)
        
formatex(powerUpcharsmax(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?
Debute is offline
 



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 10:50.


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