Can you add native like GiveWeaponByName? It will not be sending drop command to player. Because I wrote somethings and I approached.
Code:
public plugin_precache()
{
BuildWeaponModels(Weapon, VMODELI, PMODELI, WMODELI);
}
public plugin_init()
{
register_forward(FM_Touch,"FM_Touch_hook")
register_clcmd("drop","dropped")
}
public dropped(id)
{
justdropped[id]=true
set_task(0.5,"notdropped",id)
}
public notdropped(id) justdropped[id]=false
public FM_Touch_hook(weaponbox,id)
{
if(id && is_user_alive(id) && !is_user_bot(id) && pev_valid(weaponbox) && !justdropped[id])
{
static classname[64]
pev(weaponbox,pev_classname,classname,63)
if(equali(classname,"weaponbox"))
{
pev(weaponbox,pev_model,classname,63)
if(equali(classname,WMODELI))
{
client_print_color(id, id, "dogru/true")
justdropped[id]=true
set_task(0.5,"notdropped",id)
GiveWeaponByName(id,"laserm")
if(pev_valid(weaponbox)) engfunc(EngFunc_RemoveEntity,weaponbox)
}
}
}
}
give_item doesn't send drop command. But your GiveWeaponByName native send drop command.
Does this have anything to do with it?
https://github.com/CodeGhosty/CSWM/b.../CSWM.cpp#L989
---
And I think you can add SlotID to weapons. Because u added hud to weapons.
I'm waiting next version. A very successful module.
__________________