Skip to content
/ gsclib Public

gsclib acts as a standard library extension for the Call of Duty 4 scripting language.

License

Notifications You must be signed in to change notification settings

Iswenzz/gsclib

Repository files navigation

gsclib

Checks CodeFactor License

gsclib acts as a standard library extension for the Call of Duty 4 scripting language. The features this library provides consists of an FTP/FTPS/SFTP client, an HTTP/HTTPS client, Regular Expression (PCRE2) support, Language Integrated Query (Linq) support, a MySQL connector for databases, casting/type conversion/fmt and other type utilities, ZIP files, async workers, and much more. More detailed information on each feature can be found in the documentation section.

Features & Documentation

Instructions

In order to use this library, you'll need to compile the binary and place it to the CoD4 plugins directory. Then you can simply use loadplugin gsclib in your server.cfg or as CLI arguments.

To initialize gsclib library you need to call GSCLIB_Init() at the start of your mod entry point.

main()
{
	GSCLIB_Init();
}

Server

  1. Edit plugin_handler.h then recompile the server with a clean obj directory:
#define MAX_SCRIPTFUNCTIONS 256

Building (Linux)

Pre-Requisites:

  1. CGSC and it's pre-requisites.
  2. CMake and vcpkg.

Build Command:

mkdir build && cd build
cmake .. --preset linux
cmake --build .

Building (Windows)

Pre-Requisites:

  1. CGSC and it's pre-requisites.
  2. CMake and vcpkg.

Build Command:

mkdir build && cd build
cmake .. --preset windows
cmake --build .

Troubleshouting

For resolving missing dependencies you can use the ldd command for Linux, and Dependency Walker for Windows.

Contributors:

Note: If you would like to contribute to this repository, feel free to send a pull request, and I will review your code. Also feel free to post about any problems that may arise in the issues section of the repository.