Author Topic: Notice to scripters  (Read 3415 times)

0 Members and 1 Guest are viewing this topic.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Notice to scripters
« 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;

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: Notice to scripters
« Reply #1 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
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Notice to scripters
« Reply #2 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.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Notice to scripters
« Reply #3 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.

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Notice to scripters
« Reply #4 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.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Notice to scripters
« Reply #5 on: December 05, 2006, 09:21:11 am »
I am going to add another event, OnPlayerCommand.

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Notice to scripters
« Reply #6 on: December 05, 2006, 12:02:10 pm »
ok, that works.  ;D