hola nesesito que le agregue un cvar que retrase la desaparicion del arma.
ahora apenas la dropeas desaparece me gustaria que tenga un delay de 30 segundos
Code:
hello I need you to add a cvar that delays the disappearance of the weapon.
now as soon as the droppings disappears I would like it to have a delay of 30 seconds
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new cvar_removedropped
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_SetModel, "fw_SetModel")
cvar_removedropped = register_cvar("cs_remove_dropped", "1")
}
public fw_SetModel(entity, const model[])
{
static Float:removeweapons
removeweapons = get_pcvar_float(cvar_removedropped)
if (removeweapons > 0.0)
{
static class[10]
pev(entity, pev_classname, class, sizeof class - 1)
if (equal(class, "weaponbox"))
{
set_pev(entity, pev_nextthink, get_gametime () + removeweapons)
return;
}
}
}