(31-05-2025, 21:16)Serhat Öndeş Adlı Kullanıcıdan Alıntı: Genel istiyorsan iş değişir, bunu test edersin.güzel mantık hocam map üzerindeki silahları tanımlayıp ona göre spawn ediyor sanırım belli bir süresi varmıKod:#include <amxmodx>
#include <fakemeta>
#include <engine>
#define MAX_WEAPONS 64
new Float:g_weaponOrigins[MAX_WEAPONS][3]
new g_weaponClasses[MAX_WEAPONS][32]
new g_weaponCount
public plugin_init()
{
register_plugin("Weapon Respawner", "1.0", "OSR")
set_task(1.0, "ScanMapWeapons", _, _, _, "b")
set_task(10.0, "RespawnWeapons", _, _, _, "b")
}
public ScanMapWeapons()
{
new ent = -1
while ((ent = find_ent_by_class(ent, "armoury_entity")) > 0)
{
if (g_weaponCount >= MAX_WEAPONS)
break
entity_get_vector(ent, EV_VEC_origin, g_weaponOrigins[g_weaponCount])
entity_get_string(ent, EV_SZ_classname, g_weaponClasses[g_weaponCount], 31)
g_weaponCount++
}
if (g_weaponCount > 0) {
remove_task(ScanMapWeapons)
}
}
public RespawnWeapons()
{
for (new i = 0; i < g_weaponCount; i++)
{
new ent = create_entity("armoury_entity")
if (ent > 0)
{
entity_set_string(ent, EV_SZ_classname, g_weaponClasses[i])
entity_set_origin(ent, g_weaponOrigins[i])
entity_set_int(ent, EV_INT_solid, SOLID_TRIGGER)
entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS)
}
}
}
RE: Map Silah
)

