User Tools

Site Tools


Scripting Systems

Reusing Existing Scripts

Before making your own scripts, you should check that one does't already exist: you can re-use any script for any ERF that is flagged as accessible on Sinfar, even if you don't personally have access to this script. Just set their name in the field that they are meant to be used:

You can also call them from your own script:

void main()
    if (GetLocalInt(OBJECT_SELF, "USE_MAV_SYSTEM"))
        ExecuteScript("mv_awesomesystem", OBJECT_SELF);
        ExecuteScript("my_system", OBJECT_SELF);

And by using the #include directive, you can even bypass the fact that a specific script is “not” accessible on the server that you are building on. Not that you should do that, but at least you should not hesite to #include someone else script instead of re-coding all functions:

#include "any_script"
#include "really_anyscript"
building/scripts.txt · Last modified: 2019/03/26 21:08 by murdrkitten

phpBB Appliance - Powered by TurnKey Linux