0 Members and 2 Guests are viewing this topic.
if $MESSAGE = !commands/say Available commands:(... more /say's)endif
/say !rules - will show the rules
if (text = '!commands') then begin for i:=0 to (GetArrayLength(commands)-1) do Command('/say '+commands); end;
RulesScript -> [Error] (106:33): Unknown identifier 'commands'Script "rulesscript" disabled due to errors. Recompile to try again.
vari, autospit_time, antispam_time : integer;Rules, commands : TstringArray;
Command('/say ' + commands[i]);
Procedure UpdateCommands(ID: byte);var index : integer;begin commands := xsplit(readfile(commandsTXT), #13#10); index := (GetArrayLength(commands)-1) for i:=0 to index do if (commands[index-i] = '') then SetArrayLength(commands, index-i);end;
constRulesTXT = './scripts/RulesScript/Rules.txt';
procedure ActivateServer();begin UpdateRules(255); autospit_time := AUTOSPIT_DEF;end;
function OnCommand(ID: Byte; Text: string): boolean;begin if (text = '/loadrules') then UpdateRules(ID); Result := false;end;
thankyou, all fixed nowfor those who are interested, my server, when online is:127.0.0.1:23073