Quote:
Originally Posted by Blizzard_87
you need to delay giving items if its on round start / round spawn.
|
Or just remove the entity that strips player weapons and the entity which gives the weapons, then give the weapons manually using a plugin
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
new Trie:g_hClassNames
new g_iForward
public plugin_precache()
{
new szMap[30]
get_mapname(szMap, charsmax(szMap))
if(!equali(szMap, "scoutzknivez"))
{
log_amx("Stopped plugin as map is not scoutzknivez")
return;
}
g_hClassNames = TrieCreate()
TrieSetCell(g_hClassNames, "game_player_equip", 1)
TrieSetCell(g_hClassNames, "player_weaponstrip", 1)
g_iForward = register_forward(FM_Spawn, "fw_EntSpawn", 0)
}
public fw_EntSpawn(iEnt)
{
static szClassName[32]
pev(iEnt, pev_classname, szClassName, charsmax(szClassName))
if(TrieKeyExists(g_hClassNames, szClassName))
{
server_print("*** Ent Removed %s ***", szClassName)
engfunc(EngFunc_RemoveEntity, iEnt)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}
public plugin_init()
{
unregister_forward(FM_Spawn, g_iForward, 0)
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn", 1)
}
public fw_PlayerSpawn(id)
{
if(!is_user_alive(id))
{
return;
}
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_scout")
give_item(id, "weapon_hegrenade")
}
__________________