Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: EnEsCe on November 29, 2006, 09:05:33 am

Title: Notice to scripters
Post by: EnEsCe on November 29, 2006, 09:05:33 am
As of Soldat 1.3.2 (2.6.0 dedicated server), all scripts MUST make the following changes (If you dont, the server wont respond to any / command and will crash after 10 minutes)
Change:
Code: [Select]
procedure OnCommand(ID: integer; Text: string);
begin
end;
To:
Code: [Select]
function OnCommand(ID: integer; Text: string): boolean;
begin
  Result := false; // Return true if you want to ignore the command typed.
end;

I am sorry to have to change the format, but its a must. This change fixes various problems. The scripting system is still beta anyway. More changes may come.


Another change, you must add the following event to your Core.pas file.
Code: [Select]
procedure OnException(ErrorMessage: string);
begin
end;
Title: Re: Notice to scripters
Post by: cooz on November 29, 2006, 11:09:53 am
mmmkay sir,
i was planning rewrite most of scripts for v2.6.0 anyway

one but, where(when;D) can i find this new soldat/server, hehe

i know, when it'll be finished ;P
Title: Re: Notice to scripters
Post by: mikembm on November 30, 2006, 02:11:36 am
EnEsCe, remember you told me that you may add an option in OnCommand to check if they were admin, thus allowing for anyone to use custom commands. Just wondering if you were still planning on adding this.
Title: Re: Notice to scripters
Post by: EnEsCe on November 30, 2006, 06:11:13 am
Updated again.

and mikembm, I don't think its really necessary since you can just use OnPlayerSpeak for player commands.
Title: Re: Notice to scripters
Post by: mikembm on November 30, 2006, 09:16:03 pm
Well it would be useful for something such as /login password or something along those lines. Right now, such things are not possible.

The only real reason I want it for it to make a custom admin command for people with dynamic IP's. Because adminlog makes it so that they cannot be kicked or banned and also give them access to arsse - both of which I do not want.

So I would suggest to make a parameter for being admin in OnCommand or just add that one command in.
Title: Re: Notice to scripters
Post by: EnEsCe on December 05, 2006, 09:21:11 am
I am going to add another event, OnPlayerCommand.
Title: Re: Notice to scripters
Post by: mikembm on December 05, 2006, 12:02:10 pm
ok, that works.  ;D