View Single Post
KlausLaw
AlliedModders Donor
Join Date: Feb 2018
Location: Israel
Old 05-16-2018 , 18:18   Re: Fun mod command error
Reply With Quote #3

Code:
RegAdminCmd("sm_funmode", Command_FunMode, ADMFLAG_KICK);
Code:
public Action Command_FunMode(int client, int args) {
	if (args < 1)
	{
		PrintToChat(client, "Usage: sm_funmode <1/0>.");
		return Plugin_Handled;
	}
	char sArg[3];
	GetCmdArg(1, sArg, sizeof(sArg));
	g_EnablePluginu = StringToInt(sArg) == 1;
	
	PrintToChatAll("Plugin %s!", g_EnablePluginu ? "enabled" : "disabled");
	return Plugin_Handled;
}
Enjoy.
__________________
Taking private requests


Last edited by KlausLaw; 05-16-2018 at 18:20.
KlausLaw is offline