Raised This Month: $ Target: $400
 0% 

adding custom commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mikeyD
Junior Member
Join Date: Oct 2006
Old 04-28-2007 , 02:10   adding custom commands
Reply With Quote #1

I added a vote command to uaio and it shows up in the menu, but it's greyed out (I have super access). I edited all the constants and global arrays to add the menu item and I added the function to the actions_vote.inc.

The resultant command is registered in a seperate plugin with the ADMIN_VOTE access flag. When I try to run the (non-UAIO) command from console, UAIO tells me I have no access:

Code:
] amx_headshot on
[AMXX] UAIO (Admin Menu) You Have No Access To 'amx_headshot' Command
How can I define the correct access flag? (or what am I forgetting/doing wrong)?

I appreciate any help, I hope to implement many more additional commands through this menu - it's so convenient to use.
-------------------------------
Here is what I edited specifically:



---------------------
const.inc
---------------------
Code:
//    _______________
//___/ Command Types \______________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Max Command Types (Vote/Good/Evil/Misc)
#define MAX_CMD_TYPES   4

// Command Type Indexes
#define CMDTYPE_VOTE    0
#define CMDTYPE_GOOD    1
#define CMDTYPE_EVIL    2
#define CMDTYPE_MISC    3

// Command Type Counts
#define MAX_V_COMMANDS  13  // Vote Command Count (Max 32)
#define MAX_G_COMMANDS  19  // Good Command Count (Max 32)
#define MAX_E_COMMANDS  23  // Evil Command Count (Max 32)
#define MAX_M_COMMANDS  17  // Misc Command Count (Max 32)


//    __________________
//___/ Command Task IDs \___________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#define TASK_COMMON     10000

// Vote Tasks
#define TASK_V_MAP      11033
#define TASK_V_GRAV     11066
#define TASK_V_FF       11100
#define TASK_V_C4TIMER  11133
#define TASK_V_RR       11166
#define TASK_V_ALLTALK  11200
#define TASK_V_KICK     11233
#define TASK_V_SLAP     11266
#define TASK_V_SLAY     11300
#define TASK_V_GLOW     11333
#define TASK_V_GAG      11366
#define TASK_V_KNIFE    11400
#define TASK_V_PISTOL   11433
#define TASK_V_SHOTTY   14466
#define TASK_V_SUBS     11500
#define TASK_V_RIFLE    11533
#define TASK_V_SNIPER   11566
#define TASK_V_ARENA    11600
#define TASK_V_HS    11633



//    ______________
//___/ Command Bits \_______________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Vote Commands
#define UAIO_V_MAP      (1<<0)
#define UAIO_V_GRAV     (1<<1)
#define UAIO_V_FF       (1<<2)
#define UAIO_V_C4TIMER  (1<<3)
#define UAIO_V_RR       (1<<4)
#define UAIO_V_ALLTALK  (1<<5)
#define UAIO_V_KICK     (1<<6)
#define UAIO_V_SLAP     (1<<7)
#define UAIO_V_SLAY     (1<<8)
#define UAIO_V_GLOW     (1<<9)
#define UAIO_V_GAG      (1<<10)
#define UAIO_V_ARENA    (1<<11)
#define UAIO_V_HS    (1<<12)
---------------------
global.inc
---------------------
Code:
//    _______________
//___/ Commands Data \______________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Parallel Arrays (Title/Command/Function/Etc..)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Command Titles (ML API)
new g_szVCmdTitle[MAX_V_COMMANDS][] =
{
    "V_CMD_MAP", "V_CMD_GRAV", "V_CMD_FF", "V_CMD_C4", "V_CMD_RR", "V_CMD_ALLTALK",
    "V_CMD_KICK", "V_CMD_SLAP", "V_CMD_SLAY", "V_CMD_GLOW", "V_CMD_GAG", "V_CMD_ARENA",
    "V_CMD_HS"
}
new g_szGCmdTitle[MAX_G_COMMANDS][] =
{
    "G_CMD_GOD", "G_CMD_GRAV", "G_CMD_NOCLIP", "G_CMD_TURBO", "G_CMD_SILENT", "G_CMD_INVIS", 
    "G_CMD_SPY", "G_CMD_HENADES", "G_CMD_FLASHES", "G_CMD_SNADES", "G_CMD_AMMO",
    "G_CMD_EYE", "G_CMD_BCASH", "G_CMD_ICASH", "G_CMD_MIRROR", "G_CMD_TRUEAP", "G_CMD_DIVER",
    "G_CMD_SHADES", "G_CMD_SEER"
}
new g_szECmdTitle[MAX_E_COMMANDS][] =
{
    "E_CMD_PBAN", "E_CMD_TBAN", "E_CMD_KICK", "E_CMD_SLAP", "E_CMD_BSLAP", "E_CMD_SLAY",
    "E_CMD_BURY", "E_CMD_GAG", "E_CMD_WARN", "E_CMD_BLANKS", "E_CMD_FIRE", "E_CMD_POISON",
    "E_CMD_ROCKET", "E_CMD_STRIP", "E_CMD_BLACKOUT", "E_CMD_SHAKE", "E_CMD_NLOCK",
    "E_CMD_BLOCK", "E_CMD_PTRAILS", "E_CMD_GTRAILS", "E_CMD_WTRAILS", "E_CMD_DRUGS", "E_CMD_CRAZYCH"
}
new g_szMCmdTitle[MAX_M_COMMANDS][] =
{
    "M_CMD_MAP", "M_CMD_HP", "M_CMD_AP", "M_CMD_CASH", "M_CMD_TEAM", "M_CMD_MODEL",
    "M_CMD_FRAG", "M_CMD_DEATH", "M_CMD_WEAPON", "M_CMD_RECRUIT", "M_CMD_STACK", "M_CMD_GLOW",
    "M_CMD_CEXEC", "M_CMD_SEXEC", "M_CMD_REVIVE", "M_CMD_ARENA", "M_CMD_MOTD"
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Console Commands
new g_szVCmdConsole[MAX_V_COMMANDS][] =
{
    "uaio_v_map",     "uaio_v_grav",    "uaio_v_ff",      "uaio_v_c4timer",
    "uaio_v_rr",      "uaio_v_alltalk", "uaio_v_kick",    "uaio_v_slap",
    "uaio_v_slay",    "uaio_v_glow",    "uaio_v_gag",     "uaio_v_arena",
    "amx_headshot"
}
new g_szGCmdConsole[MAX_G_COMMANDS][] =
{
    "uaio_god", "uaio_grav",  "uaio_noclip", "uaio_turbo",  "uaio_silent", "uaio_invis",
    "uaio_spy", "uaio_he_nades", "uaio_fb_nades", "uaio_sm_nades", "uaio_ammo", "uaio_eye",
    "uaio_bcash", "uaio_icash", "uaio_mirror", "uaio_trueap", "uaio_diver", "uaio_shades",
    "uaio_seer"
}
new g_szECmdConsole[MAX_E_COMMANDS][] =
{
    "uaio_ban_p", "uaio_ban_t", "uaio_kick",   "uaio_slap", "uaio_bslap", "uaio_slay", 
    "uaio_bury", "uaio_gag",   "uaio_warn",  "uaio_blanks", "uaio_fire", "uaio_poison", 
    "uaio_rocket", "uaio_strip", "uaio_blackout", "uaio_shake", "uaio_namelock",
    "uaio_nobuy", "uaio_ptrails", "uaio_gtrails", "uaio_tracers", "uaio_drugs",
    "uaio_crazych"
}
new g_szMCmdConsole[MAX_M_COMMANDS][] =
{
    "uaio_map", "uaio_health", "uaio_armor", "uaio_cash", "uaio_team", "uaio_model",
    "uaio_frags", "uaio_deaths", "uaio_weapon",  "uaio_recruit", "uaio_stack", "uaio_glow",
    "uaio_cexec", "uaio_sexec", "uaio_revive" , "uaio_arena" , "uaio_motd"
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Functions
new g_szVCmdFunc[MAX_V_COMMANDS][] =
{
    "ActionVoteMap",     "ActionVoteGrav",    "ActionVoteFF",     "ActionVoteC4Timer",
    "ActionVoteRR",      "ActionVoteAlltalk", "ActionVoteKick",   "ActionVoteSlap",
    "ActionVoteSlay",    "ActionVoteGlow",    "ActionVoteGag",    "ActionVoteArena",
    "ActionVoteHS"
}
new g_szGCmdFunc[MAX_G_COMMANDS][] =
{
    "ActionGod", "ActionGrav",  "ActionNoclip", "ActionTurbo",  "ActionSilent", "ActionInvis",
    "ActionSpy", "ActionHENades", "ActionFBNades", "ActionSMNades", "ActionAmmo",   "ActionEye",
    "ActionBcash", "ActionIcash", "ActionMirror", "ActionTrueArmor", "ActionDiveKit", "ActionShades",
    "ActionSeer"
}
new g_szECmdFunc[MAX_E_COMMANDS][] =
{
    "ActionBanP",  "ActionBanT", "ActionKick",   "ActionSlap", "ActionBslap", "ActionSlay", 
    "ActionBury", "ActionGag",   "ActionWarn", "ActionBlanks", "ActionFire", "ActionPoison", 
    "ActionRocket", "ActionStrip", "ActionBlackout", "ActionShake", "ActionNameLock",
    "ActionNoBuy", "ActionPTrails", "ActionGTrails", "ActionWTrails", "ActionDrugs",
    "ActionCrazyCH"
}
new g_szMCmdFunc[MAX_M_COMMANDS][] =
{
    "ActionMap", "ActionHealth", "ActionArmor", "ActionCash", "ActionTeam", "ActionModel",
    "ActionFrags", "ActionDeaths", "ActionWeapon", "ActionRecruit", "ActionStack", "ActionGlow",
    "ActionCExec", "ActionSExec", "ActionRevive" , "ActionArena" , "ActionMotd"
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Configuration Variables
new g_szVCmdCvar[MAX_V_COMMANDS][] =
{
    "_", "sv_uaio_v_grav", "_", "sv_uaio_v_c4timer", "sv_uaio_v_rr", "_",
    "_", "sv_uaio_v_slap", "_", "sv_uaio_v_glow", "sv_uaio_v_gag", "_",
    "_"
}
new g_szGCmdCvar[MAX_G_COMMANDS][] =
{
    "sv_uaio_god",   "sv_uaio_grav", "sv_uaio_noclip", "sv_uaio_turbo", "sv_uaio_silent",
    "sv_uaio_invis", "sv_uaio_spy",  "sv_uaio_he_nades",  "sv_uaio_fb_nades",  "sv_uaio_sm_nades",
    "sv_uaio_ammo", "sv_uaio_eye", "sv_uaio_bcash", "sv_uaio_icash", "sv_uaio_mirror",
    "sv_uaio_trueap", "sv_uaio_diver", "sv_uaio_shades", "sv_uaio_seer"
}
new g_szECmdCvar[MAX_E_COMMANDS][] =
{
    "_", "sv_uaio_ban_temp", "_", "sv_uaio_slap", "sv_uaio_bslap", "_", "_", "sv_uaio_gag",
    "_", "sv_uaio_blanks", "sv_uaio_fire", "sv_uaio_poison", "_", "_", "sv_uaio_blackout",
    "_", "sv_uaio_nlock", "sv_uaio_nobuy", "sv_uaio_ptrails", "sv_uaio_gtrails", "sv_uaio_wtrails",
    "sv_uaio_drugs", "sv_uaio_crazych"
}
new g_szMCmdCvar[MAX_M_COMMANDS][] =
{
    "_", "sv_uaio_health", "sv_uaio_armor", "sv_uaio_cash",  "_", "_", "sv_uaio_frags",
    "sv_uaio_deaths", "_", "_", "_", "sv_uaio_glow", "_", "_", "_", "_", "sv_uaio_motd"
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Configuration Variable Values
new g_szVCmdCvarFlags[MAX_V_COMMANDS][] =
{
    "_",
    "800 700 600 500 400 300 200 100",
    "_",
    "10 15 20",
    "1 2 3 4 5 6 7 8 9",
    "_",
    "_",
    "1 5 10 15 20 50 75 99 100",
    "_",
    "Red Green Blue Cyan Magenta Yellow Orange Purple Random",
    "30 60 90 120 240 300 360 420 480",
    "_",
    "_"
}
new g_szGCmdCvarFlags[MAX_G_COMMANDS][] =
{
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900"
}
new g_szECmdCvarFlags[MAX_E_COMMANDS][] =
{
    "_",
    "5 15 30 60 90 120 300 600 1440",
    "_",
    "1 5 10 15 20 25 50 75 99",
    "10 20 30 40 50 60 70 80 90",
    "_",
    "_",
    "15 30 60 90 120 300 600 900 1200",
    "_",
    "15 30 60 90 120 300 600 900 1200",
    "2 5 10 11 12 13 14 15 20",
    "2 5 10 11 12 13 14 15 20",
    "_",
    "_",
    "1 2 3 5 10 15 20 25 30",
    "_",
    "15 30 60 90 120 300 600 900 1200",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900"
}
new g_szMCmdCvarFlags[MAX_M_COMMANDS][] =
{
    "_",
    "25 50 75 100 125 150 175 200 255",
    "25 50 75 100 125 150 175 200 255",
    "0 800 1500 3000 6000 9000 12000 14000 16000",
    "_",
    "_",
    "-3 -2 -1 1 2 3 4 5 6",
    "0 1 2 3 4 5 6 7 10",
    "_",
    "_",
    "_",
    "Red Green Blue Cyan Magenta Yellow Orange Random",
    "_",
    "_",
    "_",
    "_",
    "rules motd tryout help server admin"
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Argument Counts
new g_iVCmdArgCount[MAX_V_COMMANDS] = { 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1 }  //1, 1, 1, 1, 1
new g_iGCmdArgCount[MAX_G_COMMANDS] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }
new g_iECmdArgCount[MAX_E_COMMANDS] = { 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2 }
new g_iMCmdArgCount[MAX_M_COMMANDS] = { 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2 }
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Uses Players Menu?  (1=yes, 0=no)
new g_iVUsesPMenu[MAX_V_COMMANDS] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0} //0, 0, 0, 0, 0 
new g_iGUsesPMenu[MAX_G_COMMANDS] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
new g_iEUsesPMenu[MAX_E_COMMANDS] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
new g_iMUsesPMenu[MAX_M_COMMANDS] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1}
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Menu Settings Types
new g_iVCmdSetFlags[MAX_V_COMMANDS] =
{
    SM_MAPS, SM_CVAR, SM_TOGGLE, SM_CVAR, SM_CVAR, SM_TOGGLE, SM_NONE, SM_CVAR,
    SM_NONE, SM_CVAR, SM_CVAR, SM_ARENA, SM_TOGGLE
}
new g_iGCmdSetFlags[MAX_G_COMMANDS] =
{
    SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR,
    SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR
}
new g_iECmdSetFlags[MAX_E_COMMANDS] =
{
    SM_NONE, SM_CVAR, SM_NONE, SM_CVAR, SM_CVAR, SM_NONE, SM_BURY, SM_CVAR,
    SM_NONE, SM_CVAR, SM_CVAR, SM_CVAR, SM_NONE, SM_NONE, SM_CVAR, SM_NONE, SM_CVAR,
    SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR
}
new g_iMCmdSetFlags[MAX_M_COMMANDS] =
{
    SM_MAPS, SM_CVAR, SM_CVAR, SM_CVAR, SM_TEAM, SM_MODEL, SM_CVAR, SM_CVAR,
    SM_WEAPON, SM_NONE, SM_STACK, SM_CVAR, SM_FILE, SM_FILE, SM_NONE, SM_ARENA, SM_CVAR
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Usages
new g_szVCmdUsage[MAX_V_COMMANDS][] =
{
    "USAGE_MAP",
    "USAGE_GRAV",
    "USAGE_ONOFF",
    "USAGE_SECS",
    "USAGE_SECS",
    "USAGE_ONOFF",
    "USAGE_PLAYER",
    "USAGE_DAMAGE",
    "USAGE_PLAYER",
    "USAGE_GLOW",
    "USAGE_PL_SECS",
    "USAGE_ARENA",
    "USAGE_ONOFF"
}
new g_szGCmdUsage[MAX_G_COMMANDS][] =
{
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS"
}
new g_szECmdUsage[MAX_E_COMMANDS][] =
{
    "USAGE_PLAYER",
    "USAGE_MINS",
    "USAGE_PLAYER",
    "USAGE_DAMAGE",
    "USAGE_SLAPS",
    "USAGE_PLAYER",
    "USAGE_PL_ONOFF",
    "USAGE_PL_SECS",
    "USAGE_PLAYER",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PLAYER",
    "USAGE_PLAYER",
    "USAGE_PL_SECS",
    "USAGE_PLAYER",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS"
}
new g_szMCmdUsage[MAX_M_COMMANDS][] =
{
    "USAGE_MAP",
    "USAGE_HP",
    "USAGE_AP",
    "USAGE_CASH",
    "USAGE_TEAM",
    "USAGE_MODEL",
    "USAGE_FRAGS",
    "USAGE_DEATHS",
    "USAGE_WEAPON",
    "USAGE_PLAYER",
    "USAGE_STACK",
    "USAGE_GLOW",
    "USAGE_CEXEC",
    "USAGE_SEXEC",
    "USAGE_PLAYER",
    "USAGE_ARENA",
    "USAGE_MOTD"
}
---------------------
actions_vote.inc
---------------------
Code:
//    ________________
//___/ ActionVoteHS() \_____________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Comments..
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public ActionVoteHS( aCmdArgs[] )
{
    #if defined UAIO_DEBUG_MODE
        client_print( aCmdArgs[0], print_chat, "%s {VOTE} Task-Action: 'ActionVoteHS' Called!", PLUGIN_MOD )
        client_print( aCmdArgs[0], print_chat, "%s {VOTE} Parameters: %s", PLUGIN_MOD, g_szCmdArgs[aCmdArgs[0]-1] )
    #endif

    ExecuteVoteCmd( aCmdArgs[0], TASK_V_HS, "V_CMD_HS", "amx_headshot" )
    return PLUGIN_HANDLED
}
and here is the registered command - (this command works independantly from UAIO):
Code:
public plugin_init(){
    register_concmd("amx_headshot", "admin_set_headshot", ADMIN_VOTE, "<on|off> - Set headshot only mode. Overrides current hitboxes")
}

Last edited by mikeyD; 04-28-2007 at 04:36.
mikeyD is offline
Mccarter
Junior Member
Join Date: Jun 2007
Old 06-28-2007 , 17:25   Re: adding custom commands
Reply With Quote #2

Quote:
Originally Posted by mikeyD View Post
I added a vote command to uaio and it shows up in the menu, but it's greyed out (I have super access). I edited all the constants and global arrays to add the menu item and I added the function to the actions_vote.inc.

The resultant command is registered in a seperate plugin with the ADMIN_VOTE access flag. When I try to run the (non-UAIO) command from console, UAIO tells me I have no access:

Code:
] amx_headshot on
[AMXX] UAIO (Admin Menu) You Have No Access To 'amx_headshot' Command
How can I define the correct access flag? (or what am I forgetting/doing wrong)?

I appreciate any help, I hope to implement many more additional commands through this menu - it's so convenient to use.
-------------------------------
Here is what I edited specifically:



---------------------
const.inc
---------------------
Code:
//    _______________
//___/ Command Types \______________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Max Command Types (Vote/Good/Evil/Misc)
#define MAX_CMD_TYPES   4
 
// Command Type Indexes
#define CMDTYPE_VOTE    0
#define CMDTYPE_GOOD    1
#define CMDTYPE_EVIL    2
#define CMDTYPE_MISC    3
 
// Command Type Counts
#define MAX_V_COMMANDS  13  // Vote Command Count (Max 32)
#define MAX_G_COMMANDS  19  // Good Command Count (Max 32)
#define MAX_E_COMMANDS  23  // Evil Command Count (Max 32)
#define MAX_M_COMMANDS  17  // Misc Command Count (Max 32)
 
 
//    __________________
//___/ Command Task IDs \___________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#define TASK_COMMON     10000
 
// Vote Tasks
#define TASK_V_MAP      11033
#define TASK_V_GRAV     11066
#define TASK_V_FF       11100
#define TASK_V_C4TIMER  11133
#define TASK_V_RR       11166
#define TASK_V_ALLTALK  11200
#define TASK_V_KICK     11233
#define TASK_V_SLAP     11266
#define TASK_V_SLAY     11300
#define TASK_V_GLOW     11333
#define TASK_V_GAG      11366
#define TASK_V_KNIFE    11400
#define TASK_V_PISTOL   11433
#define TASK_V_SHOTTY   14466
#define TASK_V_SUBS     11500
#define TASK_V_RIFLE    11533
#define TASK_V_SNIPER   11566
#define TASK_V_ARENA    11600
#define TASK_V_HS    11633
 
 
 
//    ______________
//___/ Command Bits \_______________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Vote Commands
#define UAIO_V_MAP      (1<<0)
#define UAIO_V_GRAV     (1<<1)
#define UAIO_V_FF       (1<<2)
#define UAIO_V_C4TIMER  (1<<3)
#define UAIO_V_RR       (1<<4)
#define UAIO_V_ALLTALK  (1<<5)
#define UAIO_V_KICK     (1<<6)
#define UAIO_V_SLAP     (1<<7)
#define UAIO_V_SLAY     (1<<8)
#define UAIO_V_GLOW     (1<<9)
#define UAIO_V_GAG      (1<<10)
#define UAIO_V_ARENA    (1<<11)
#define UAIO_V_HS    (1<<12)
---------------------
global.inc
---------------------
Code:
//    _______________
//___/ Commands Data \______________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Parallel Arrays (Title/Command/Function/Etc..)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Command Titles (ML API)
new g_szVCmdTitle[MAX_V_COMMANDS][] =
{
    "V_CMD_MAP", "V_CMD_GRAV", "V_CMD_FF", "V_CMD_C4", "V_CMD_RR", "V_CMD_ALLTALK",
    "V_CMD_KICK", "V_CMD_SLAP", "V_CMD_SLAY", "V_CMD_GLOW", "V_CMD_GAG", "V_CMD_ARENA",
    "V_CMD_HS"
}
new g_szGCmdTitle[MAX_G_COMMANDS][] =
{
    "G_CMD_GOD", "G_CMD_GRAV", "G_CMD_NOCLIP", "G_CMD_TURBO", "G_CMD_SILENT", "G_CMD_INVIS", 
    "G_CMD_SPY", "G_CMD_HENADES", "G_CMD_FLASHES", "G_CMD_SNADES", "G_CMD_AMMO",
    "G_CMD_EYE", "G_CMD_BCASH", "G_CMD_ICASH", "G_CMD_MIRROR", "G_CMD_TRUEAP", "G_CMD_DIVER",
    "G_CMD_SHADES", "G_CMD_SEER"
}
new g_szECmdTitle[MAX_E_COMMANDS][] =
{
    "E_CMD_PBAN", "E_CMD_TBAN", "E_CMD_KICK", "E_CMD_SLAP", "E_CMD_BSLAP", "E_CMD_SLAY",
    "E_CMD_BURY", "E_CMD_GAG", "E_CMD_WARN", "E_CMD_BLANKS", "E_CMD_FIRE", "E_CMD_POISON",
    "E_CMD_ROCKET", "E_CMD_STRIP", "E_CMD_BLACKOUT", "E_CMD_SHAKE", "E_CMD_NLOCK",
    "E_CMD_BLOCK", "E_CMD_PTRAILS", "E_CMD_GTRAILS", "E_CMD_WTRAILS", "E_CMD_DRUGS", "E_CMD_CRAZYCH"
}
new g_szMCmdTitle[MAX_M_COMMANDS][] =
{
    "M_CMD_MAP", "M_CMD_HP", "M_CMD_AP", "M_CMD_CASH", "M_CMD_TEAM", "M_CMD_MODEL",
    "M_CMD_FRAG", "M_CMD_DEATH", "M_CMD_WEAPON", "M_CMD_RECRUIT", "M_CMD_STACK", "M_CMD_GLOW",
    "M_CMD_CEXEC", "M_CMD_SEXEC", "M_CMD_REVIVE", "M_CMD_ARENA", "M_CMD_MOTD"
}
 
 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Console Commands
new g_szVCmdConsole[MAX_V_COMMANDS][] =
{
    "uaio_v_map",     "uaio_v_grav",    "uaio_v_ff",      "uaio_v_c4timer",
    "uaio_v_rr",      "uaio_v_alltalk", "uaio_v_kick",    "uaio_v_slap",
    "uaio_v_slay",    "uaio_v_glow",    "uaio_v_gag",     "uaio_v_arena",
    "amx_headshot"
}
new g_szGCmdConsole[MAX_G_COMMANDS][] =
{
    "uaio_god", "uaio_grav",  "uaio_noclip", "uaio_turbo",  "uaio_silent", "uaio_invis",
    "uaio_spy", "uaio_he_nades", "uaio_fb_nades", "uaio_sm_nades", "uaio_ammo", "uaio_eye",
    "uaio_bcash", "uaio_icash", "uaio_mirror", "uaio_trueap", "uaio_diver", "uaio_shades",
    "uaio_seer"
}
new g_szECmdConsole[MAX_E_COMMANDS][] =
{
    "uaio_ban_p", "uaio_ban_t", "uaio_kick",   "uaio_slap", "uaio_bslap", "uaio_slay", 
    "uaio_bury", "uaio_gag",   "uaio_warn",  "uaio_blanks", "uaio_fire", "uaio_poison", 
    "uaio_rocket", "uaio_strip", "uaio_blackout", "uaio_shake", "uaio_namelock",
    "uaio_nobuy", "uaio_ptrails", "uaio_gtrails", "uaio_tracers", "uaio_drugs",
    "uaio_crazych"
}
new g_szMCmdConsole[MAX_M_COMMANDS][] =
{
    "uaio_map", "uaio_health", "uaio_armor", "uaio_cash", "uaio_team", "uaio_model",
    "uaio_frags", "uaio_deaths", "uaio_weapon",  "uaio_recruit", "uaio_stack", "uaio_glow",
    "uaio_cexec", "uaio_sexec", "uaio_revive" , "uaio_arena" , "uaio_motd"
}
 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Functions
new g_szVCmdFunc[MAX_V_COMMANDS][] =
{
    "ActionVoteMap",     "ActionVoteGrav",    "ActionVoteFF",     "ActionVoteC4Timer",
    "ActionVoteRR",      "ActionVoteAlltalk", "ActionVoteKick",   "ActionVoteSlap",
    "ActionVoteSlay",    "ActionVoteGlow",    "ActionVoteGag",    "ActionVoteArena",
    "ActionVoteHS"
}
new g_szGCmdFunc[MAX_G_COMMANDS][] =
{
    "ActionGod", "ActionGrav",  "ActionNoclip", "ActionTurbo",  "ActionSilent", "ActionInvis",
    "ActionSpy", "ActionHENades", "ActionFBNades", "ActionSMNades", "ActionAmmo",   "ActionEye",
    "ActionBcash", "ActionIcash", "ActionMirror", "ActionTrueArmor", "ActionDiveKit", "ActionShades",
    "ActionSeer"
}
new g_szECmdFunc[MAX_E_COMMANDS][] =
{
    "ActionBanP",  "ActionBanT", "ActionKick",   "ActionSlap", "ActionBslap", "ActionSlay", 
    "ActionBury", "ActionGag",   "ActionWarn", "ActionBlanks", "ActionFire", "ActionPoison", 
    "ActionRocket", "ActionStrip", "ActionBlackout", "ActionShake", "ActionNameLock",
    "ActionNoBuy", "ActionPTrails", "ActionGTrails", "ActionWTrails", "ActionDrugs",
    "ActionCrazyCH"
}
new g_szMCmdFunc[MAX_M_COMMANDS][] =
{
    "ActionMap", "ActionHealth", "ActionArmor", "ActionCash", "ActionTeam", "ActionModel",
    "ActionFrags", "ActionDeaths", "ActionWeapon", "ActionRecruit", "ActionStack", "ActionGlow",
    "ActionCExec", "ActionSExec", "ActionRevive" , "ActionArena" , "ActionMotd"
}
 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Configuration Variables
new g_szVCmdCvar[MAX_V_COMMANDS][] =
{
    "_", "sv_uaio_v_grav", "_", "sv_uaio_v_c4timer", "sv_uaio_v_rr", "_",
    "_", "sv_uaio_v_slap", "_", "sv_uaio_v_glow", "sv_uaio_v_gag", "_",
    "_"
}
new g_szGCmdCvar[MAX_G_COMMANDS][] =
{
    "sv_uaio_god",   "sv_uaio_grav", "sv_uaio_noclip", "sv_uaio_turbo", "sv_uaio_silent",
    "sv_uaio_invis", "sv_uaio_spy",  "sv_uaio_he_nades",  "sv_uaio_fb_nades",  "sv_uaio_sm_nades",
    "sv_uaio_ammo", "sv_uaio_eye", "sv_uaio_bcash", "sv_uaio_icash", "sv_uaio_mirror",
    "sv_uaio_trueap", "sv_uaio_diver", "sv_uaio_shades", "sv_uaio_seer"
}
new g_szECmdCvar[MAX_E_COMMANDS][] =
{
    "_", "sv_uaio_ban_temp", "_", "sv_uaio_slap", "sv_uaio_bslap", "_", "_", "sv_uaio_gag",
    "_", "sv_uaio_blanks", "sv_uaio_fire", "sv_uaio_poison", "_", "_", "sv_uaio_blackout",
    "_", "sv_uaio_nlock", "sv_uaio_nobuy", "sv_uaio_ptrails", "sv_uaio_gtrails", "sv_uaio_wtrails",
    "sv_uaio_drugs", "sv_uaio_crazych"
}
new g_szMCmdCvar[MAX_M_COMMANDS][] =
{
    "_", "sv_uaio_health", "sv_uaio_armor", "sv_uaio_cash",  "_", "_", "sv_uaio_frags",
    "sv_uaio_deaths", "_", "_", "_", "sv_uaio_glow", "_", "_", "_", "_", "sv_uaio_motd"
}
 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Configuration Variable Values
new g_szVCmdCvarFlags[MAX_V_COMMANDS][] =
{
    "_",
    "800 700 600 500 400 300 200 100",
    "_",
    "10 15 20",
    "1 2 3 4 5 6 7 8 9",
    "_",
    "_",
    "1 5 10 15 20 50 75 99 100",
    "_",
    "Red Green Blue Cyan Magenta Yellow Orange Purple Random",
    "30 60 90 120 240 300 360 420 480",
    "_",
    "_"
}
new g_szGCmdCvarFlags[MAX_G_COMMANDS][] =
{
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900"
}
new g_szECmdCvarFlags[MAX_E_COMMANDS][] =
{
    "_",
    "5 15 30 60 90 120 300 600 1440",
    "_",
    "1 5 10 15 20 25 50 75 99",
    "10 20 30 40 50 60 70 80 90",
    "_",
    "_",
    "15 30 60 90 120 300 600 900 1200",
    "_",
    "15 30 60 90 120 300 600 900 1200",
    "2 5 10 11 12 13 14 15 20",
    "2 5 10 11 12 13 14 15 20",
    "_",
    "_",
    "1 2 3 5 10 15 20 25 30",
    "_",
    "15 30 60 90 120 300 600 900 1200",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900",
    "0 15 30 60 90 120 300 600 900"
}
new g_szMCmdCvarFlags[MAX_M_COMMANDS][] =
{
    "_",
    "25 50 75 100 125 150 175 200 255",
    "25 50 75 100 125 150 175 200 255",
    "0 800 1500 3000 6000 9000 12000 14000 16000",
    "_",
    "_",
    "-3 -2 -1 1 2 3 4 5 6",
    "0 1 2 3 4 5 6 7 10",
    "_",
    "_",
    "_",
    "Red Green Blue Cyan Magenta Yellow Orange Random",
    "_",
    "_",
    "_",
    "_",
    "rules motd tryout help server admin"
}
 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Argument Counts
new g_iVCmdArgCount[MAX_V_COMMANDS] = { 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1 }  //1, 1, 1, 1, 1
new g_iGCmdArgCount[MAX_G_COMMANDS] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }
new g_iECmdArgCount[MAX_E_COMMANDS] = { 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2 }
new g_iMCmdArgCount[MAX_M_COMMANDS] = { 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2 }
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Uses Players Menu?  (1=yes, 0=no)
new g_iVUsesPMenu[MAX_V_COMMANDS] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0} //0, 0, 0, 0, 0 
new g_iGUsesPMenu[MAX_G_COMMANDS] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
new g_iEUsesPMenu[MAX_E_COMMANDS] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
new g_iMUsesPMenu[MAX_M_COMMANDS] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1}
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Menu Settings Types
new g_iVCmdSetFlags[MAX_V_COMMANDS] =
{
    SM_MAPS, SM_CVAR, SM_TOGGLE, SM_CVAR, SM_CVAR, SM_TOGGLE, SM_NONE, SM_CVAR,
    SM_NONE, SM_CVAR, SM_CVAR, SM_ARENA, SM_TOGGLE
}
new g_iGCmdSetFlags[MAX_G_COMMANDS] =
{
    SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR,
    SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR
}
new g_iECmdSetFlags[MAX_E_COMMANDS] =
{
    SM_NONE, SM_CVAR, SM_NONE, SM_CVAR, SM_CVAR, SM_NONE, SM_BURY, SM_CVAR,
    SM_NONE, SM_CVAR, SM_CVAR, SM_CVAR, SM_NONE, SM_NONE, SM_CVAR, SM_NONE, SM_CVAR,
    SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR, SM_CVAR
}
new g_iMCmdSetFlags[MAX_M_COMMANDS] =
{
    SM_MAPS, SM_CVAR, SM_CVAR, SM_CVAR, SM_TEAM, SM_MODEL, SM_CVAR, SM_CVAR,
    SM_WEAPON, SM_NONE, SM_STACK, SM_CVAR, SM_FILE, SM_FILE, SM_NONE, SM_ARENA, SM_CVAR
}
 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Command Usages
new g_szVCmdUsage[MAX_V_COMMANDS][] =
{
    "USAGE_MAP",
    "USAGE_GRAV",
    "USAGE_ONOFF",
    "USAGE_SECS",
    "USAGE_SECS",
    "USAGE_ONOFF",
    "USAGE_PLAYER",
    "USAGE_DAMAGE",
    "USAGE_PLAYER",
    "USAGE_GLOW",
    "USAGE_PL_SECS",
    "USAGE_ARENA",
    "USAGE_ONOFF"
}
new g_szGCmdUsage[MAX_G_COMMANDS][] =
{
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS"
}
new g_szECmdUsage[MAX_E_COMMANDS][] =
{
    "USAGE_PLAYER",
    "USAGE_MINS",
    "USAGE_PLAYER",
    "USAGE_DAMAGE",
    "USAGE_SLAPS",
    "USAGE_PLAYER",
    "USAGE_PL_ONOFF",
    "USAGE_PL_SECS",
    "USAGE_PLAYER",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PLAYER",
    "USAGE_PLAYER",
    "USAGE_PL_SECS",
    "USAGE_PLAYER",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS",
    "USAGE_PL_SECS"
}
new g_szMCmdUsage[MAX_M_COMMANDS][] =
{
    "USAGE_MAP",
    "USAGE_HP",
    "USAGE_AP",
    "USAGE_CASH",
    "USAGE_TEAM",
    "USAGE_MODEL",
    "USAGE_FRAGS",
    "USAGE_DEATHS",
    "USAGE_WEAPON",
    "USAGE_PLAYER",
    "USAGE_STACK",
    "USAGE_GLOW",
    "USAGE_CEXEC",
    "USAGE_SEXEC",
    "USAGE_PLAYER",
    "USAGE_ARENA",
    "USAGE_MOTD"
}
---------------------
actions_vote.inc
---------------------
Code:
//    ________________
//___/ ActionVoteHS() \_____________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Comments..
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public ActionVoteHS( aCmdArgs[] )
{
    #if defined UAIO_DEBUG_MODE
        client_print( aCmdArgs[0], print_chat, "%s {VOTE} Task-Action: 'ActionVoteHS' Called!", PLUGIN_MOD )
        client_print( aCmdArgs[0], print_chat, "%s {VOTE} Parameters: %s", PLUGIN_MOD, g_szCmdArgs[aCmdArgs[0]-1] )
    #endif
 
    ExecuteVoteCmd( aCmdArgs[0], TASK_V_HS, "V_CMD_HS", "amx_headshot" )
    return PLUGIN_HANDLED
}
and here is the registered command - (this command works independantly from UAIO):
Code:
public plugin_init(){
    register_concmd("amx_headshot", "admin_set_headshot", ADMIN_VOTE, "<on|off> - Set headshot only mode. Overrides current hitboxes")
}


Your not the only one with the problem too i think i can do about 6 or 7 commands in vote.. i had installed b4 and it was perfect...
Mccarter is offline
Reply



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 16:29.


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