View Single Post
Author Message
Heypio
Junior Member
Join Date: Nov 2017
Old 05-15-2018 , 16:05   Fun mod command error
Reply With Quote #1

plugin enabled command not working.Where is the problem ?

Note: plugin enable, writing not say.

I apologize for my english


Commands
Code:
	
RegAdminCmd("sm_funmodenable", Command_PluginEnable, ADMFLAG_KICK);
RegAdminCmd("sm_funmoddisable", Command_PluginDisable, ADMFLAG_KICK);
Code:
public Action:Command_PluginEnable(client, args) {
	
	new String:arg[3];
	GetCmdArg(1, arg, sizeof(arg));
	int EnableNumber = StringToInt(arg);

	if(EnableNumber == 1) {
		g_EnablePluginu = true;
		PrintToChatAll("Plugin enabled!");  
	   }	
}

public Action:Command_PluginDisable(client, args) {
	new String:arg[3];
	GetCmdArg(1, arg, sizeof(arg));
	int EnableNumber = StringToInt(arg);
	
    if(EnableNumber == 0) {
		g_EnablePluginu = false;
		PrintToChatAll("Plugin disabled!");	
	   }	   
}

Last edited by Heypio; 05-15-2018 at 16:13.
Heypio is offline