CVars Access System

Post Reply
User avatar
greenie
Full Member
Full Member
Posts: 4444
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Da

CVars Access System

Post by greenie »

CVars Access System
Description
Plugin allow to change access level(s) for a certain server CVar(s).
Notes
CVars is accessed through default amx_cvar command so the admincmd.amxx plugin required.
Plugin must be loaded before admincmd.amxx so put it above admincmd.amxx in plugins.ini.
Refer to plugin_cfg section of admincmd.sma to view/edit AMXX default hardcoded RCon CVars.
Use for example amxmodx\configs\amxx.cfg config file to store a custom access to a CVars.

Commands
amx_cvar_access <cvar> [flag(s)] - gets/sets CVar's access, example: amx_cvar_access amx_vote_delay "j" will set ADMIN_VOTE access level for amx_vote_delay CVar, this mean that admins with a vote access will be able to view/change amx_vote_delay CVar value through amx_cvar command.
Scripting

The cvaraccess.inc file contain <get|set>_cvar_access native functions and some other functions that can be used in other plugins. See the supplied script for a usage example. Note that to simply set a CVars access alternatively you can use the amx_cvar_access command with the server_cmd() native, for example: server_cmd("amx_cvar_access my_cvar j"). This method isn't require *.inc file, native and its filtering.

plugin , source - cvars_access_system.sma

plugin , source - cvars_access_example.sma
π‘΄π’‚π’šπ’ƒπ’† 𝒕𝒉𝒆 𝑬𝒂𝒓𝒕𝒉 π’Šπ’” 𝒕𝒉𝒆 𝑯𝒆𝒍𝒍 𝒐𝒇 𝑨𝒏𝒐𝒕𝒉𝒆𝒓 𝑷𝒍𝒂𝒏𝒆𝒕... ☒️

βœ… GAZDUIRE JOCURI / VPS / GAZDUIRE WEB / SERVERE DEDICATE - Stock NELIMITAT / Valabil comandati pe https://www.zonek.ro/
Post Reply

Return to β€œGeneral Purpose”