Author Topic: MSAC ScriptCore extensions  (Read 7269 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: MSAC ScriptCore extensions
« Reply #20 on: April 24, 2011, 09:33:36 am »
also u can add this script to MSAC.dll file, ya? it would be turning on/off by command :)

This is not possible due to how MSAC works. I can not just combine it with a script which is executed from memory. Please use the script on your server instead.

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: MSAC ScriptCore extensions
« Reply #21 on: April 25, 2011, 04:11:41 am »
  • msac-liststatus -> [Error] (45:1): Syntax error
  • msac-liststatus -> [Error] (45:1): Unexpected end of file
I get the same error.
Re-downloaded and works fine now.Ty.
« Last Edit: April 25, 2011, 08:42:43 am by Leo »

Offline VirtualTT

  • Veteran
  • *****
  • Posts: 1026
Re: MSAC ScriptCore extensions
« Reply #22 on: May 13, 2011, 10:14:16 am »
i've got two questions:
1) what is reliable way to determine whether MSAC is running o not
2) What the difference between GetPlayerStat(ID, 'MSAC.ClientInstalled') returning false and GetPlayerStat(ID, 'MSAC.Status') returning MSAC_STATUS_NO_CLIENT or MSAC_STATUS_NO_CLIENT_AND_WARNED? I mean is the second function just extended version of the first, or are they completely different?

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: MSAC ScriptCore extensions
« Reply #23 on: May 14, 2011, 10:31:49 am »
To 1)
I have not implemented a method to check if the server itself is running MSAC yet as there is no way to do so for me. Adding a function to check this would break the scripts if they are running on non-MSAC servers since the function will not be defined there.
To check if MSAC it running, call GetPlayerStat(1, 'MSAC.GUID'). If it equals an empty or nonempty string, MSAC is running. If the type is not a string, MSAC is not running.

To 2)
You are right that GetPlayerStat(ID, 'MSAC.ClientInstalled') isn't anything but an alias to several MSAC.Status queries. However, in case that I ever add new status constants, MSAC.ClientInstalled will still return the correct value.

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: MSAC ScriptCore extensions
« Reply #24 on: June 04, 2011, 05:21:19 pm »
Important update for scripters:

The latest MSAC server (released just 5 minutes ago) fixes the GetPlayerStat(ID, 'MSAC.ClientInstalled') function. It now really returns a boolean, while an integer (0 or 1) has been returned before. If you were using GetPlyerStat(...) = 1 in your scripts before, remove the '= 1' please as else this call will always evaluate to false.

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: MSAC ScriptCore extensions
« Reply #25 on: June 04, 2011, 06:34:20 pm »
Kewl, I'll give it later a try (once I get my hand out of plaster thingy).
"My senses are so powerful that I can hear the blood pumping through your veins."