Скриптер
Проверенный
Пользователь
ArKaNeMaN
Квалифицированный специалист по VipModular
- Сообщения
- 434
- Реакции
- 296
- Помог
- 5 раз(а)
AMX Mod X Compiler 1.9.0.5271
//// VipModular.sma
//
// VipM/Core/Configs/Vips.inc(24) : error 088: number of arguments does not match definition
//
// 1 Error.
// Could not locate output file compiled\VipModular.amx (compile failed).
//
// Compilation Time: 1 sec
// ----------------------------------------
5.0.0-beta.10
- можно. Через натив VipM_WeaponMenu_SetExpireStatus
можно выставить каждому игроку строковый статус окончания привилегии.#include <amxmodx>
#include <VipModular>
forward AccessManager_AccessAdded(iUserID, iCallerID);
forward client_admin(pPlayer, bitAccessFlags);
forward amxx_admin_access(pPlayer, bitAccessFlags, iExpireTimeStamp);
native admin_expired(pPlayer);
public VipM_OnLoaded() {
register_plugin("[VipM] Expiration Time Example", "1.0.0", "ArKaNeMaN");
}
public AccessManager_AccessAdded(iUserID) {
VipM_UserUpdate(iUserID);
}
public client_admin(pPlayer) {
VipM_UserUpdate(pPlayer);
}
public amxx_admin_access(pPlayer) {
VipM_UserUpdate(pPlayer);
}
public VipM_OnUserUpdated(const UserId) {
new iExpiringTimestamp = admin_expired(UserId);
if (iExpiringTimestamp < 0) {
return;
}
VipM_WeaponMenu_SetExpireStatus(UserId, fmt("~%d мин.", (iExpiringTimestamp - get_systime()) / 60 / 60));
}
Тут уже надо смотреть что в таких случаях тот натив возвращаету человека у которого нет срока окончания(стоит навсегда) все равно идёт отсчёт
{
"Name": "Custom-меню",
"Title": "\\y[\\wCustom-меню\\y]",
"Items": [
{
"Title": "Deagle + AK47",
"Items": [
{
"Type": "Cwapi",
"Name": "DeagleCustom",
"GiveType": "Replace"
},
{
"Type": "Cwapi",
"Name": "AK47Custom",
"GiveType": "Replace"
}
]
},
{
"Title": "Deagle + M4A1",
"Items": [
{
"Type": "Cwapi",
"Name": "DeagleCustom",
"GiveType": "Replace"
},
{
"Type": "Cwapi",
"Name": "M4A1Custom",
"GiveType": "Replace"
}
]
},
{
"Title": "Deagle + MP5",
"Items": [
{
"Type": "Cwapi",
"Name": "DeagleCustom",
"GiveType": "Replace"
},
{
"Type": "Cwapi",
"Name": "MP5Custom",
"GiveType": "Replace"
}
]
},
{
"Title": "Deagle + Famas",
"Items": [
{
"Type": "Cwapi",
"Name": "DeagleCustom",
"GiveType": "Replace"
},
{
"Type": "Cwapi",
"Name": "FAMASCustom",
"GiveType": "Replace"
}
]
},
{
"Title": "Deagle + AWP",
"ActiveLimits": "File:Limits/Menus/AwpAccess",
"FakeInactive": true,
"Items": [
{
"Type": "Cwapi",
"Name": "DeagleCustom",
"GiveType": "Replace"
},
{
"Type": "Cwapi",
"Name": "AWPCustom",
"GiveType": "Replace"
}
]
},
{
"Title": "Гранаты",
"Items": [
"File:Items/AllGrenades"
]
}
]
}
{
"DefaultName": "deagle",
"DamageMult": 1.3,
"MaxClip": 10,
"MaxAmmo": 70,
"DeployTime": 0.1,
"Price": 1000,
"Models": {
"View": "models/custom/v_deagle.mdl",
"Player": "models/custom/p_deagle.mdl",
"World": "models/custom/w_deagle.mdl"
}
}
{
"DefaultName": "ak47",
"ClipSize": 40,
"MaxAmmo": 150,
"Models": {
"v": "models/custom/v_ak47.mdl",
"p": "models/custom/p_ak47.mdl",
"w": "models/custom/w_ak47.mdl"
},
"DamageMult": 1.15,
"Price": 1200
}
MWallet-Buy
из соответствующего расширения.L 07/07/2023 - 03:15:18: Start of error session.
L 07/07/2023 - 03:15:18: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20230707.log")
L 07/07/2023 - 03:15:18: [JSON] Invalid JSON value! 0
L 07/07/2023 - 03:15:18: [AMXX] Displaying debug trace (plugin "VipModular.amxx", version "5.0.0-beta.10")
L 07/07/2023 - 03:15:18: [AMXX] Run time error 10: native error (native "json_object_set_value")
L 07/07/2023 - 03:15:18: [AMXX] [0] Utils.inc::Json_ParseFromFileEx (line 90)
L 07/07/2023 - 03:15:18: [AMXX] [1] Utils.inc::Json_ParseFromFileEx (line 81)
L 07/07/2023 - 03:15:18: [AMXX] [2] Vips.inc::Cfg_LoadVipsConfigs (line 10)
L 07/07/2023 - 03:15:18: [AMXX] [3] VipModular.sma::plugin_precache (line 42)