На главную сайта / RAGE:MP | BanAPI

RAGE:MP | BanAPI

26-08-2026, 00:00

Ban system that supports temporarily/permanently banning names, social club names, IP addresses and HWIDs.


Installing

Put banapi into your server's packages directory

Open banapi/database.js and put your MySQL config

All done

API

/*

getUnixTimestamp()

Returns the current Unix timestamp.

*/

mp.bans.getUnixTimestamp()


/*

formatUnixTimestamp(unixTimestamp)

Converts a Unix timestamp to "day/month/year hour:minute:second" format. Returns a string.

*/

mp.bans.formatUnixTimestamp(unixTimestamp)


/*

add(value, banType, reason, endUnixTimestamp)

Adds a ban to the bans table, the ban will be permanent if endUnixTimestamp is -1.

You need to provide the value like a player's serial, IP or name.

endUnixTimestamp must be seconds, NO

Вернуться на сайт