Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started 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:
procedure OnCommand(ID: integer; Text: string);
begin
end;
To:
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.
procedure OnException(ErrorMessage: string);
begin
end;
-
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
-
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.
-
Updated again.
and mikembm, I don't think its really necessary since you can just use OnPlayerSpeak for player commands.
-
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.
-
I am going to add another event, OnPlayerCommand.
-
ok, that works. ;D