[>>REALY<< LITTLE HELP] How to make a switch off system for a command
#6

Are you sure that works? I dont think so, you will have a lot of errors with that, I make a better one:
Код:
// The variable
new HelpActivated = 1;

// The commands
if(strcmp(cmd, "/helpoff", true) == 0)
{
if(Logged[playerid] == 1)
{
HelpActivated = 0;
return 1;
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"SERVER: Unknown command.");
}
return 1;
}
if(strcmp(cmd, "/help", true) == 0)
{
if(HelpActivated == 1)
{
SendClientMessage(playerid,COLOR_WHITE,"Help text...");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"This command has been desactivated");
}
return 1;
}
Tell me if it works / works better
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)