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

On top..

Код:
new helpoff;
Then on /switchoffhelp

Код:
helpoff = 1;
And then, at /help:

Код:
if(helpoff == 1)
I hope I remembered that correctly.

EDIT: Sorry, didnt see the pastebin link, do it this way:

Код:
new HelpActivated = 1;
//forward not needed.

// Command to switch off
if(strcmp("/switchoffhelp", cmd, true) == 0) || if(Logged[playerid] == 1) //You forgot the || here
{
HelpActivated == 0); // 0 = no, 1 = yes
}
return 1;

// Help command

if(strcmp(cmd,"/help",true) == 0)
{
if(HelpActivated == 1) // == instead of =
{
SendClientMessage(playerid,COLOR_WHITE,"Help text...");
}
else
}
SendClientMessage(playerid,COLOR_WHITE,"The help command has been desactivated");
}
return 1;
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)