new helpoff;
helpoff = 1;
if(helpoff == 1)
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;
Originally Posted by Mo3
On top..
Код:
new helpoff; Код:
helpoff = 1; Код:
if(helpoff == 1) 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; |
// 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; }
Originally Posted by JonyAvati
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; } ![]() |