Skip to content

Iswenzz/gsclib

Repository files navigation

gsclib

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.

Documentation

Module Description
System Library init, versioning, async status, system commands
Async Critical sections and async request helpers
File File and directory operations
Zip Zip archive creation and manipulation
HTTP HTTP/HTTPS GET and POST requests
FTP FTP, FTPS, and SFTP file transfers
MySQL MySQL database queries and prepared statements
LINQ Array querying and transformation utilities
Regex Regular expression matching, splitting, and replacing
Math Trigonometric and arithmetic functions
Utility String formatting, type conversion, and helpers
Player Player movement and state accessors

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.

Server

  1. Edit plugin_handler.h and set #define MAX_SCRIPTFUNCTIONS to 256.
  2. Run the script install.bat or install.sh located in the api folder.
  3. Clean the server build then recompile.

Building (Windows)

Pre-Requisites:

  1. MinGW
  2. CMake and vcpkg

Build Command:

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

Building (Linux)

Pre-Requisites:

  1. CMake and vcpkg

Pre-Requisites:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install build-essential gcc-multilib g++-multilib pkg-config linux-libc-dev nasm:i386

Build Command:

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

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.

About

gsclib acts as a standard library extension for the Call of Duty 4 scripting language. The features this library provides consists of an FTP client, an HTTP client, Regular Expression (PCRE2), Language Integrated Query (Linq).

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors