open.mp icon indicating copy to clipboard operation
open.mp copied to clipboard

Add natives from YSF

Open Jedrzej94 opened this issue 1 year ago • 2 comments
trafficstars

native LoadFilterScript(const scriptname[]); // difference between "rcon loadfs": Return -> True if success, false if not
native UnLoadFilterScript(const scriptname[]); // ^
native GetFilterScriptCount();
native GetFilterScriptName(id, name[], len = sizeof(name));

the return value of LoadFilterScript is the most important part. SendRconCommand always returns 1.

Jedrzej94 avatar Dec 02 '23 15:12 Jedrzej94

https://github.com/IS4Code/YSF/blob/50a861667370a07aa2c52b3a2fd03c0db566e1c1/src/CFunctions.cpp#L153

Jedrzej94 avatar Dec 02 '23 15:12 Jedrzej94

Please make sure that the message: Filterscript 'xxx' loaded. is not generated when using these functions.

Jedrzej94 avatar Dec 02 '23 15:12 Jedrzej94