Raised This Month: $ Target: $400
 0% 

[SOLVED] Multi dimensional array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 08-13-2012 , 12:12   [SOLVED] Multi dimensional array
Reply With Quote #1

I don't know what i'm doing :s
Code:
#include < amxmodx > public plugin_init( ) {     new const g_szCommands[ ][ ] =     {         { "war3menu",               "show_wc3Menu" },         { "say /war3Menu",          "show_wc3Menu" },         { "say_team /war3Menu",     "show_wc3Menu" },         { "changerace",             "command_ChangeRace" },         { "say /changerace",        "command_ChangeRace" },         { "say_team /changerace",   "command_ChangeRace" },         { "selectskill",            "command_SelectSkill" },         { "say /selectskill",       "command_SelectSkill" },         { "say_team /selectskill""command_SelectSkill" },         { "playerskills",           "command_PlayerSkills" },         { "say /playerskills",      "command_PlayerSkills" },         { "say_team /playerskills", "command_PlayerSkills" },         { "skillsinfo",             "command_SkillsInfo" },         { "say /skillsinfo",        "command_SkillsInfo" },         { "say_team /skillsinfo",   "command_SkillsInfo" },         { "itemsinfo",              "command_ItemInfo" },         { "say /itemsinfo",         "command_ItemInfo" },         { "say /itemsinfo",         "command_ItemInfo" },         { "war3help",               "command_wc3Help" },         { "say /war3help",          "command_wc3Help" },         { "say_team /war3help",     "command_wc3Help" },         { "ultimate",               "command_Ultimate" },         { "icons",                  "command_Icons" },         { "say /icons",             "command_Icons" },         { "say_team /icons",        "command_Icons" },         { "shopmenu",               "command_ShopMenu" },         { "say /shopmenu",          "command_ShopMenu" },         { "say_team /shopmenu",     "command_ShopMenu" },         { "level",                  "command_Level" },         { "say /level",             "command_Level" },         { "say_team /level",        "command_Level" }     }     //for( new i = 0; i < sizeof g_szCommands; i++ )         //register_clcmd( g_szCommands[ i ], g_szCommands[ i ][ ] ) }
How can i use multi-dimensional array to register commands ?
I don't want to use 2 arrays, one for command, one for handle.

Last edited by OvidiuS; 08-13-2012 at 12:19.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
 



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 05:53.


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