All Projects → Open-GTO → protection

Open-GTO / protection

Licence: MIT license
Flexible server protection system (development)

Programming Languages

Pawn
127 projects

Projects that are alternatives of or similar to protection

rustext
Fix Russian text plugin for SA-MP: GameText's, TextDraw's and Menu's
Stars: ✭ 15 (-34.78%)
Mutual labels:  gta, sa-mp, samp, sanandreas, gtasa
Open-GTO
RPG gamemode for SA-MP
Stars: ✭ 45 (+95.65%)
Mutual labels:  gta, sa-mp, samp, sanandreas, gtasa
GWRP-0.3
Игровой режим для San Andreas Multiplayer
Stars: ✭ 22 (-4.35%)
Mutual labels:  gta, sa-mp, samp, sanandreas, gtasa
samp-node-lib
NodeJS library for Scripting San Andreas Multiplayer:SAMP depends on samp-node plugin
Stars: ✭ 23 (+0%)
Mutual labels:  gta, sa-mp, samp, gtasa
gta-samp-mouse-only
Play GTA San Andreas Multiplayer with mouse only and no keyboard
Stars: ✭ 22 (-4.35%)
Mutual labels:  sa-mp, samp, gtasa
gtasa-savegame-editor
GUI tool to edit GTA San Andreas savegames.
Stars: ✭ 56 (+143.48%)
Mutual labels:  gta, sanandreas, gtasa
Pawn.CMD
🚀 Plugin-powered command processor for SA:MP server
Stars: ✭ 80 (+247.83%)
Mutual labels:  sa-mp, samp
Pawn.Regex
🔎 Plugin that adds support for regular expressions in Pawn
Stars: ✭ 34 (+47.83%)
Mutual labels:  sa-mp, samp
samp-foreach
foreach standalone include (non y_iterate version)
Stars: ✭ 20 (-13.04%)
Mutual labels:  sa-mp, samp
samp-discord-plugin
SA:MP Discord Rich Presence plugin
Stars: ✭ 63 (+173.91%)
Mutual labels:  sa-mp, samp
samp-ptl
SA:MP Plugin Template Library (C++17)
Stars: ✭ 16 (-30.43%)
Mutual labels:  sa-mp, samp
eSelection
Dynamic model selection library for SA-MP servers
Stars: ✭ 28 (+21.74%)
Mutual labels:  sa-mp, samp
PacPaw
Pawn package manager for SA-MP
Stars: ✭ 14 (-39.13%)
Mutual labels:  sa-mp, samp
SS-Gang-System-SQLITE
SS Gang System for SA-MP
Stars: ✭ 23 (+0%)
Mutual labels:  sa-mp, samp
code-parse.inc
Pre-processor macros for analysing PAWN functions.
Stars: ✭ 23 (+0%)
Mutual labels:  sa-mp, samp
Anti cheat pack
An anti cheat library improved over 3 years
Stars: ✭ 25 (+8.7%)
Mutual labels:  sa-mp, anticheat
VehFuncs
New vehicle features for GTA San Andreas mods
Stars: ✭ 30 (+30.43%)
Mutual labels:  gta, gtasa
SafeValues
A simple Unity library for cheating prevention
Stars: ✭ 75 (+226.09%)
Mutual labels:  protection, anticheat
trilogymp
Trilogy Multiplayer (TMP) is a work in progress nonprofit open source multiplayer software project for Grand Theft Auto: The Trilogy. This repository serves as a base for discussions and project management.
Stars: ✭ 105 (+356.52%)
Mutual labels:  gta, gtasa
lift
🏋️‍♂️ Up your service locally.
Stars: ✭ 13 (-43.48%)
Mutual labels:  development

Protection

Flexible server protection system (development).

Dependencies

Callbacks

forward OnPlayerGetProtectionWarning(playerid, Protection:protection, bool:warn_reached, message[]);

Functions

// protection params
Protection_SetParamInt(Protection:protection, ProtectionParams:param, value);
Protection_GetParamInt(Protection:protection, ProtectionParams:param);
Protection_SetParamFloat(Protection:protection, ProtectionParams:param, Float:value);
Float:Protection_GetParamFloat(Protection:protection, ProtectionParams:param);
Protection_SetParamString(Protection:protection, ProtectionParams:param, value[]);
Protection_GetParamString(Protection:protection, ProtectionParams:param, value[], size = sizeof(value));
Protection_SetParamArray(Protection:protection, ProtectionParams:param, values[], const size = sizeof(values));
Protection_GetParamArray(Protection:protection, ProtectionParams:param, values[], size = sizeof(values));

// player protection params
Protection_SetPlayerParamInt(playerid, Protection:protection, ProtectionPlayerParams:param, value);
Protection_GetPlayerParamInt(playerid, Protection:protection, ProtectionPlayerParams:param);
Protection_SetPlayerParamFloat(playerid, Protection:protection, ProtectionPlayerParams:param, Float:value);
Float:Protection_GetPlayerParamFloat(playerid, Protection:protection, ProtectionPlayerParams:param);
Protection_SetPlayerParamString(playerid, Protection:protection, ProtectionPlayerParams:param, value[]);
Protection_GetPlayerParamString(playerid, Protection:protection, ProtectionPlayerParams:param, value[], size = sizeof(value));

// player info
Protection_SetPlayerInfoInt(playerid, ProtectionPlayerInfo:param, value);
Protection_GetPlayerInfoInt(playerid, ProtectionPlayerInfo:param);
Protection_SetPlayerInfoFloat(playerid, ProtectionPlayerInfo:param, Float:value);
Float:Protection_GetPlayerInfoFloat(playerid, ProtectionPlayerInfo:param);
Protection_SetPlayerInfoString(playerid, ProtectionPlayerInfo:param, value[]);
Protection_GetPlayerInfoString(playerid, ProtectionPlayerInfo:param, value[], size = sizeof(value));

Function params

enum Protection {
	PROTECTION_ALL,
	PROTECTION_TELEPORT,
	PROTECTION_INTERIOR,
	PROTECTION_SPECIALACTION,
	PROTECTION_RCON,
	PROTECTION_PING,
	PROTECTION_HEALTH,
	PROTECTION_ARMOUR,
	PROTECTION_VEHICLETELEPORT,
	PROTECTION_WEAPON,
	PROTECTION_MONEY,
	PROTECTION_KILLFLOOD,
	PROTECTION_WEAPONDAMAGE,
	PROTECTION_RAPIDFIRE,
	PROTECTION_BADSHOT,
	PROTECTION_PICKUPPICK,
	PROTECTION_VEHICLECOLOR,
	PROTECTION_CAMERA,
	PROTECTION_CAMERAMODE,
	PROTECTION_FAKEKILL,
	PROTECTION_VEHICLETUNING,
}

enum ProtectionParams {
	PROTECTION_NAME[PROTECTION_MAX_STRING],
	PROTECTION_FUNCTION[PROTECTION_MAX_STRING],
	bool:PROTECTION_ENABLED,
	PROTECTION_CHECK_DELAY,
	PROTECTION_LAST_TICKCOUNT,
	PROTECTION_SPAWN_DELAY,
	PROTECTION_MAX_WARNINGS,
	Float:PROTECTION_MAX_DISTANCE,
	Float:PROTECTION_MAX_VEHICLE_DISTANCE,
	PROTECTION_MAX_PING,
	PROTECTION_AVAILABLE_IDS[PROTECTION_MAX_AVAILABLE_IDS],
	PROTECTION_COUNTERACTION,
}

enum ProtectionPlayerParams {
	PROTECTION_PLAYER_DISABLED,
	PROTECTION_PLAYER_COUNTERACTION,
	PROTECTION_PLAYER_WARNING_COUNT,
	PROTECTION_PLAYER_BLOCK_UPDATE,
}

enum ProtectionPlayerInfo {
	bool:PROTECTION_PLAYER_SPAWNED,
	PROTECTION_PLAYER_IP[PROTECTION_MAX_IP + 1],
	PROTECTION_PLAYER_PING,
	PROTECTION_PLAYER_SPAWN_TICK,
}

Examples

#include <a_samp>
#include "foreach"
#include "getspawninfo"
#include "protection"

main() {}

public OnGameModeInit()
{
	// enable all protections
	Protection_SetParamInt(PROTECTION_ALL, PROTECTION_ENABLED, 1);
	// redefine name
	Protection_SetParamString(PROTECTION_TELEPORT, PROTECTION_NAME, "Телепорт");
	return 1;
}

public OnPlayerSpawn(playerid)
{
	// disable all protections for admin
	if (IsPlayerAdmin(playerid)) {
		Protection_SetPlayerParamInt(playerid, PROTECTION_ALL, PROTECTION_PLAYER_DISABLED, 1);
	}
	return 1;
}

public OnPlayerGetProtectionWarning(playerid, Protection:protection, bool:warn_reached, message[])
{
	new
		string[144],
		protection_name[32];

	Protection_GetParamString(protection, PROTECTION_NAME, protection_name);

	format(string, sizeof(string), "* Player: %d | Warn reached: %d | Name: %s | Message: %s", playerid, _:warn_reached, protection_name, message);
	SendClientMessageToAll(-1, string);
	return 1;
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].