openmultiplayer / server-beta-old

open.mp server beta releases
143 stars 14 forks source link

[BUG]: unloadfs doesn't work on filterscripts loaded from the server start #93

Closed NexiusTailer closed 2 years ago

NexiusTailer commented 2 years ago

Description

Console command unloadfs doesn't work on the filterscripts which were loaded right from the server start, but at the same time there are no problems to unload any filterscript which was loaded whenever in runtime.

How to re-produce this bug

  1. Create two blank filterscripts, for example, "Untitled1" and "Untitled2"
  2. Add "Untitled1" into the server config file so it will be loaded when the server starts
  3. Start omp server and try to load/unload "Untitled2" and unload "Untitled1"

My "Untitled1" code:

#include <a_samp>

public OnFilterScriptInit()
{
    print("OnFilterScriptInit for 'Untitled1' was called!");
    return 1;
}

public OnFilterScriptExit()
{
    print("OnFilterScriptExit for 'Untitled1' was called!");
    return 1;
}

My "Untitled2" code:

#include <a_samp>

public OnFilterScriptInit()
{
    print("OnFilterScriptInit for 'Untitled2' was called!");
    return 1;
}

public OnFilterScriptExit()
{
    print("OnFilterScriptExit for 'Untitled2' was called!");
    return 1;
}

Relevant log output

[Server start] Console output:

OnFilterScriptInit for 'Untitled1' was called!

Console input:

loadfs Untitled2

Console output:

OnFilterScriptInit for 'Untitled2' was called! Filterscript 'Untitled2' loaded.

Console input:

unloadfs Untitled1

Console output:

Filterscript 'Untitled1' unload failed.

Console input:

unloadfs Untitled2

Console output:

OnFilterScriptExit for 'Untitled2' was called! Filterscript 'Untitled2' unloaded.


image

open.mp server version

Build 4

Operating system or distribution

Windows 10 (21H2)

Contact information

Nexius#2253

ksenonadv commented 2 years ago

It was fixed in build5.