[Include] Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)
#69

I'm having issues that whenever a command has been disabled it can not be enabled.

This is the code I'm using, most of it has been directly copied from the tutorial and modified so it works properly in the gamemode.

PHP код:
forward CommandDisabled(cmdidplayeridparams[]);
public 
CommandDisabled(cmdidplayeridparams[])
{
    
SendErrorMessage(playerid, -1"The command has been disabled.");
    return 
1;
}
CMD<DISABLECMDS>:disablecmd(cmdidplayeridparams[])
{
    if(!
adminCheck(playerid5)) return 0;
    switch(
ReassignCommandFunction(GetCommandID(params), "CommandDisabled"))
    {
        case -
1: return SendClientMessage(playeridCOLOR_RED"The entered command does not exist.");
        case 
0: return SendClientMessage(playeridCOLOR_RED"The entered command is already disabled.");
        case 
1: return SendClientMessage(playeridCOLOR_WHITE"The entered command has been "COL_RED"disabled"COL_WHITE".");
    }
    return 
CMD_SUCCESS;
}
CMD<DISABLECMDS>:enablecmd(cmdidplayeridparams[])
{
    if(!
adminCheck(playerid5)) return 0;
    new 
cmd_func[MAX_FUNC_NAME], cid GetCommandID(params);
    
GetCommandFunctionName(cidcmd_func);
    
    switch(
ReassignCommandFunction(cidcmd_func))
    {
        case -
1: return SendClientMessage(playeridCOLOR_RED"The entered command does not exist.");
        case 
0: return SendClientMessage(playeridCOLOR_RED"The entered command is already enabled.");
        case 
1: return SendClientMessage(playeridCOLOR_WHITE"The entered command has been "COL_GREEN"enabled"COL_WHITE".");
    }
    return 
CMD_SUCCESS;

Reply


Messages In This Thread
Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 23.10.2016, 06:59
Respuesta: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Unrea1 - 23.10.2016, 07:20
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by DevHarden - 23.10.2016, 08:05
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by RaeF - 23.10.2016, 08:29
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 23.10.2016, 08:39
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by ExTaZZ69 - 23.10.2016, 08:58
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Max_Andolini - 23.10.2016, 10:01
Respuesta: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Whyd - 23.10.2016, 10:29
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by oMa37 - 23.10.2016, 10:38
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Max_Andolini - 23.10.2016, 13:35
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by SyS - 23.10.2016, 13:39
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by SecretBoss - 23.10.2016, 13:40
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Max_Andolini - 23.10.2016, 13:59
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by SecretBoss - 23.10.2016, 14:13
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Battallboi - 23.10.2016, 14:38
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Dayvison_ - 24.10.2016, 03:05
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Gammix - 24.10.2016, 03:18
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by CantBeJohn - 24.10.2016, 06:40
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 24.10.2016, 09:34
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by CantBeJohn - 24.10.2016, 15:31
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by SickAttack - 24.10.2016, 20:14
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by PrO.GameR - 24.10.2016, 20:46
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Crayder - 24.10.2016, 21:11
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by PT - 24.10.2016, 21:13
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Crayder - 24.10.2016, 22:06
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 25.10.2016, 09:53
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by HydraHumza - 25.10.2016, 10:02
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by PrO.GameR - 25.10.2016, 16:40
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 25.10.2016, 16:55
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by SickAttack - 25.10.2016, 18:46
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Jayse - 25.10.2016, 20:26
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by PrO.GameR - 25.10.2016, 22:18
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by SickAttack - 25.10.2016, 23:15
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by PrO.GameR - 26.10.2016, 01:36
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Pottus - 26.10.2016, 02:03
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by SickAttack - 26.10.2016, 04:30
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Crayder - 26.10.2016, 05:27
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 26.10.2016, 08:16
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by AndySedeyn - 30.10.2016, 23:07
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Crayder - 30.10.2016, 23:59
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by AndySedeyn - 31.10.2016, 11:13
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 01.11.2016, 05:05
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by JJohnson1 - 01.11.2016, 08:34
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by AndySedeyn - 01.11.2016, 13:11
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 01.11.2016, 13:19
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 04.11.2016, 14:12
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by kurta999 - 06.11.2016, 13:15
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Max_Andolini - 11.11.2016, 19:47
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 12.11.2016, 05:33
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Max_Andolini - 13.11.2016, 15:02
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 14.11.2016, 12:54
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Max_Andolini - 14.11.2016, 13:04
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 17.11.2016, 10:29
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by ReshiramZekrom - 21.11.2016, 18:31
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Konstantinos - 21.11.2016, 18:41
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 22.11.2016, 07:10
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Nero_3D - 11.12.2016, 11:18
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Crayder - 11.12.2016, 16:36
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Nero_3D - 11.12.2016, 20:11
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Crayder - 12.12.2016, 02:01
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 13.12.2016, 07:46
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by zsoolt997 - 16.12.2016, 07:25
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 16.12.2016, 09:52
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by wallee - 11.01.2017, 04:04
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 14.01.2017, 05:02
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 26.04.2017, 09:00
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by AndySedeyn - 26.04.2017, 11:42
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by wallee - 26.04.2017, 13:29
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Jeroen52 - 18.08.2017, 12:13
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by LosHermanos - 18.08.2017, 16:33
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Banditul18 - 23.09.2017, 20:46
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Jeroen52 - 23.09.2017, 20:48
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 01.10.2017, 09:41
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by m4karow - 01.10.2017, 15:44
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 05.12.2017, 04:54
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Jeroen52 - 05.12.2017, 19:51
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 20.12.2017, 06:38
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Jeroen52 - 20.12.2017, 08:01
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 21.12.2017, 02:41
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Yashas - 25.12.2017, 09:32
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by DeNCHiK01 - 18.05.2018, 09:24
Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+) - by Verc - 18.05.2018, 11:55

Forum Jump:


Users browsing this thread: 13 Guest(s)