Z Piątnicy no bo skąd 🙈🤣majster skąd te eventy wziąłeś? bo bym sam skorzystał
A tak serio: https://github.com/r...ripting/include
wskaż w którym pliku masz te eventy, a najlepiej zacytuj segmenty z nimi, bo chyba jestem ślepy
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Napisano 30.03.2026 16:48
Z Piątnicy no bo skąd 🙈🤣majster skąd te eventy wziąłeś? bo bym sam skorzystał
A tak serio: https://github.com/r...ripting/include
Napisano 30.03.2026 18:04
jestem ślepy
/* * Hook API function that are available into enum. * Look at the enums for parameter lists. * * @param function The function to hook * @param callback The forward to call * @param post Whether or not to forward this in post * * @return Returns a hook handle. Use EnableHookChain/DisableHookChain to toggle the forward on or off */ native HookChain:RegisterHookChain(ReAPIFunc:function_id, const callback[], post = 0);...
define ReAPIFunc {EngineFunc, GamedllFunc, GamedllFunc_CBaseAnimating, GamedllFunc_CBasePlayer, GamedllFunc_CSGameRules, GamedllFunc_CGrenade, GamedllFunc_CWeaponBox, ReCheckerFunc, GamedllFunc_CBasePlayerWeapon, GamedllFunc_CGib, GamedllFunc_CBaseEntity, GamedllFunc_CBotManager}
edict_t* CreateEntity(); edict_t* CreateNamedEntity();
Napisano 30.03.2026 19:37
jestem ślepy
/* * Hook API function that are available into enum. * Look at the enums for parameter lists. * * @param function The function to hook * @param callback The forward to call * @param post Whether or not to forward this in post * * @return Returns a hook handle. Use EnableHookChain/DisableHookChain to toggle the forward on or off */ native HookChain:RegisterHookChain(ReAPIFunc:function_id, const callback[], post = 0);...
define ReAPIFunc {EngineFunc, GamedllFunc, GamedllFunc_CBaseAnimating, GamedllFunc_CBasePlayer, GamedllFunc_CSGameRules, GamedllFunc_CGrenade, GamedllFunc_CWeaponBox, ReCheckerFunc, GamedllFunc_CBasePlayerWeapon, GamedllFunc_CGib, GamedllFunc_CBaseEntity, GamedllFunc_CBotManager}edict_t* CreateEntity(); edict_t* CreateNamedEntity();Nawet fakemeta ma takie same cuda
Napisano 02.04.2026 12:45
#include <amxmodx>
#include <engine>
#define PLUGIN "Entity & Drop Fix"
#define VERSION "1.1"
#define AUTHOR "Misiaczek ;c / Err0r"
new g_pMaxWeapons;
new g_pWeaponLife;
new g_pMaxEdicts;
new g_pDebug;
new g_iWeaponCount;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
g_pMaxWeapons = register_cvar("guard_max_weapons", "20");
g_pWeaponLife = register_cvar("guard_weapon_life", "12.0");
g_pMaxEdicts = register_cvar("guard_max_edicts", "850");
g_pDebug = register_cvar("guard_debug", "0");
register_event("CurWeapon", "OnWeaponDropCheck", "be");
set_task(1.0, "CleanupWeapons", _, _, _, "b");
set_task(3.0, "CheckEdicts", _, _, _, "b");
}
public plugin_cfg()
{
SyncWeapons();
}
public OnWeaponDropCheck(id)
{
if (!is_user_alive(id))
return;
SyncWeapons();
if (g_iWeaponCount >= get_pcvar_num(g_pMaxWeapons))
{
client_print(id, print_center, "[GUARD] Za duzo broni na mapie!");
}
}
public CleanupWeapons()
{
new ent = -1;
new Float:time = get_gametime();
new Float:lifetime = get_pcvar_float(g_pWeaponLife);
while ((ent = find_ent_by_class(ent, "weaponbox")))
{
if (!is_valid_ent(ent))
continue;
if (IsC4(ent))
continue;
new Float:spawn = entity_get_float(ent, EV_FL_fuser1);
if (spawn == 0.0)
{
entity_set_float(ent, EV_FL_fuser1, time);
continue;
}
if ((time - spawn) > lifetime)
{
remove_entity(ent);
}
}
}
public CheckEdicts()
{
new total = 0;
new ent = -1;
while ((ent = find_ent_by_class(ent, "*")))
{
if (is_valid_ent(ent))
total++;
}
if (total >= get_pcvar_num(g_pMaxEdicts))
{
new w = -1;
while ((w = find_ent_by_class(w, "weaponbox")))
{
if (is_valid_ent(w))
remove_entity(w);
}
if (get_pcvar_num(g_pDebug))
server_print("[GUARD] CLEANUP! Edicts: %d", total);
}
}
public SyncWeapons()
{
new ent = -1;
g_iWeaponCount = 0;
while ((ent = find_ent_by_class(ent, "weaponbox")))
{
if (is_valid_ent(ent) && !IsC4(ent))
g_iWeaponCount++;
}
}
stock bool:IsC4(ent)
{
static model[64];
entity_get_string(ent, EV_SZ_model, model, charsmax(model));
return containi(model, "c4") != -1;
}
mój błąd wcześniej, w reapi sugerowałem się częściowo fakemeta, przez co nieściłośc wyszła, ale prosze , to działa bez problemu
//AMXXPC compile.exe // by the AMX Mod X Dev Team //// test.sma // // Header size: 728 bytes // Code size: 2480 bytes // Data size: 1684 bytes // Stack/heap size: 16384 bytes // Total requirements: 21276 bytes // Done. // // Compilation Time: 0,7 sec // ----------------------------------------
Napisano 03.04.2026 08:07
Użytkownik Boziak edytował ten post 03.04.2026 08:09
Napisano 03.04.2026 20:00
#include <amxmodx> #include <engine> #define PLUGIN "Entity & Drop Fix" #define VERSION "1.1" #define AUTHOR "Misiaczek ;c / Err0r" new g_pMaxWeapons; new g_pWeaponLife; new g_pMaxEdicts; new g_pDebug; new g_iWeaponCount; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); g_pMaxWeapons = register_cvar("guard_max_weapons", "20"); g_pWeaponLife = register_cvar("guard_weapon_life", "12.0"); g_pMaxEdicts = register_cvar("guard_max_edicts", "850"); g_pDebug = register_cvar("guard_debug", "0"); register_event("CurWeapon", "OnWeaponDropCheck", "be"); set_task(1.0, "CleanupWeapons", _, _, _, "b"); set_task(3.0, "CheckEdicts", _, _, _, "b"); } public plugin_cfg() { SyncWeapons(); } public OnWeaponDropCheck(id) { if (!is_user_alive(id)) return; SyncWeapons(); if (g_iWeaponCount >= get_pcvar_num(g_pMaxWeapons)) { client_print(id, print_center, "[GUARD] Za duzo broni na mapie!"); } } public CleanupWeapons() { new ent = -1; new Float:time = get_gametime(); new Float:lifetime = get_pcvar_float(g_pWeaponLife); while ((ent = find_ent_by_class(ent, "weaponbox"))) { if (!is_valid_ent(ent)) continue; if (IsC4(ent)) continue; new Float:spawn = entity_get_float(ent, EV_FL_fuser1); if (spawn == 0.0) { entity_set_float(ent, EV_FL_fuser1, time); continue; } if ((time - spawn) > lifetime) { remove_entity(ent); } } } public CheckEdicts() { new total = 0; new ent = -1; while ((ent = find_ent_by_class(ent, "*"))) { if (is_valid_ent(ent)) total++; } if (total >= get_pcvar_num(g_pMaxEdicts)) { new w = -1; while ((w = find_ent_by_class(w, "weaponbox"))) { if (is_valid_ent(w)) remove_entity(w); } if (get_pcvar_num(g_pDebug)) server_print("[GUARD] CLEANUP! Edicts: %d", total); } } public SyncWeapons() { new ent = -1; g_iWeaponCount = 0; while ((ent = find_ent_by_class(ent, "weaponbox"))) { if (is_valid_ent(ent) && !IsC4(ent)) g_iWeaponCount++; } } stock bool:IsC4(ent) { static model[64]; entity_get_string(ent, EV_SZ_model, model, charsmax(model)); return containi(model, "c4") != -1; }mój błąd wcześniej, w reapi sugerowałem się częściowo fakemeta, przez co nieściłośc wyszła, ale proszę , to działa bez problemu
//AMXXPC compile.exe // by the AMX Mod X Dev Team //// test.sma // // Header size: 728 bytes // Code size: 2480 bytes // Data size: 1684 bytes // Stack/heap size: 16384 bytes // Total requirements: 21276 bytes // Done. // // Compilation Time: 0,7 sec // ---------------------------------------- oj cos nie dziala bo crashuje serwer itak Na serwerze wystąpił błąd: ERROR : ED_Alloc_internal: no free edicts
Napisano 04.04.2026 22:28
#include <amxmodx> #include <engine> #define PLUGIN "Entity & Drop Fix" #define VERSION "1.1" #define AUTHOR "Misiaczek ;c / Err0r" new g_pMaxWeapons; new g_pWeaponLife; new g_pMaxEdicts; new g_pDebug; new g_iWeaponCount; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); g_pMaxWeapons = register_cvar("guard_max_weapons", "20"); g_pWeaponLife = register_cvar("guard_weapon_life", "12.0"); g_pMaxEdicts = register_cvar("guard_max_edicts", "850"); g_pDebug = register_cvar("guard_debug", "0"); register_event("CurWeapon", "OnWeaponDropCheck", "be"); set_task(1.0, "CleanupWeapons", _, _, _, "b"); set_task(3.0, "CheckEdicts", _, _, _, "b"); } public plugin_cfg() { SyncWeapons(); } public OnWeaponDropCheck(id) { if (!is_user_alive(id)) return; SyncWeapons(); if (g_iWeaponCount >= get_pcvar_num(g_pMaxWeapons)) { client_print(id, print_center, "[GUARD] Za duzo broni na mapie!"); } } public CleanupWeapons() { new ent = -1; new Float:time = get_gametime(); new Float:lifetime = get_pcvar_float(g_pWeaponLife); while ((ent = find_ent_by_class(ent, "weaponbox"))) { if (!is_valid_ent(ent)) continue; if (IsC4(ent)) continue; new Float:spawn = entity_get_float(ent, EV_FL_fuser1); if (spawn == 0.0) { entity_set_float(ent, EV_FL_fuser1, time); continue; } if ((time - spawn) > lifetime) { remove_entity(ent); } } } public CheckEdicts() { new total = 0; new ent = -1; while ((ent = find_ent_by_class(ent, "*"))) { if (is_valid_ent(ent)) total++; } if (total >= get_pcvar_num(g_pMaxEdicts)) { new w = -1; while ((w = find_ent_by_class(w, "weaponbox"))) { if (is_valid_ent(w)) remove_entity(w); } if (get_pcvar_num(g_pDebug)) server_print("[GUARD] CLEANUP! Edicts: %d", total); } } public SyncWeapons() { new ent = -1; g_iWeaponCount = 0; while ((ent = find_ent_by_class(ent, "weaponbox"))) { if (is_valid_ent(ent) && !IsC4(ent)) g_iWeaponCount++; } } stock bool:IsC4(ent) { static model[64]; entity_get_string(ent, EV_SZ_model, model, charsmax(model)); return containi(model, "c4") != -1; }mój błąd wcześniej, w reapi sugerowałem się częściowo fakemeta, przez co nieściłośc wyszła, ale proszę , to działa bez problemu
//AMXXPC compile.exe // by the AMX Mod X Dev Team //// test.sma // // Header size: 728 bytes // Code size: 2480 bytes // Data size: 1684 bytes // Stack/heap size: 16384 bytes // Total requirements: 21276 bytes // Done. // // Compilation Time: 0,7 sec // ---------------------------------------- oj cos nie dziala bo crashuje serwer itak Na serwerze wystąpił błąd: ERROR : ED_Alloc_internal: no free edicts
// Time to remove item that have been dropped from the players. (in seconds)
mp_item_staytime "5"
0 użytkowników, 3 gości, 0 anonimowych