Created
June 20, 2023 00:02
-
-
Save ArKaNeMaN/f3c53992b0f041a647068d74b63aeb54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <amxmodx> | |
#include <VipModular> | |
/* | |
Интеграция с Awp OFF (https://dev-cs.ru/resources/225/ или https://dev-cs.ru/threads/11341/#post-87017). | |
Пример использования: | |
{ // Сработает, если игрок может взять авп | |
"Limit": "AwpOFF-Restricted", | |
"Not": true | |
} | |
{ // Сработает, если игрок НЕ может взять авп | |
"Limit": "AwpOFF-Restricted" | |
} | |
*/ | |
native bool:awpoff_check(const UserId, const bool:bPrintChat = false); | |
public stock const PluginName[] = "[VipM-L] Awp OFF by paffgame"; | |
public stock const PluginVersion[] = "1.0.0"; | |
public stock const PluginAuthor[] = "ArKaNeMaN"; | |
public stock const PluginURL[] = "t.me/arkanaplugins"; | |
public stock const PluginDescription[] = "[VipModular-Limit] Integration with Awp OFF by paffgame."; | |
new const LIMIT_NAME[] = "AwpOFF-Restricted"; | |
public VipM_OnInitModules() { | |
register_plugin(PluginName, PluginVersion, PluginAuthor); | |
VipM_Limits_RegisterType(LIMIT_NAME, true, false); | |
VipM_Limits_AddTypeParams(LIMIT_NAME, | |
"Not", ptBoolean, false | |
); | |
VipM_Limits_RegisterTypeEvent(LIMIT_NAME, Limit_OnCheck, "@OnCheck"); | |
} | |
@OnCheck(const Trie:tParams, const UserId) { | |
new bool:bRes = awpoff_check(UserId); | |
return VipM_Params_GetBool(tParams, "Not", false) ? bRes : !bRes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment