Shouldn't this work?....cuz it doesn't :S
Code:
public player_replace_weapon(id,gunid,ammo,clips,extras)
{
client_cmd(id,"weapon_%i;wait;drop",gunid)
new Float:origin[3]
pev(id,pev_origin,origin)
new ent = 0, Float:radius = 64.0, classname[32]
while((ent = find_ent_in_sphere(ent,origin,radius)) != 0)
{
pev(ent,pev_classname,classname,31)
client_print(id,print_chat,"Class: %s",classname)
if(equali(classname,"weapon_tsgun"))
{
remove_entity(ent)
}
}
ts_giveweapon(id,gunid,clips,extras)
//ts_set_weapon_ammo(id,gunid,ammo)
return PLUGIN_HANDLED
}
Doesn't give me a new gun, Drop the Old gun, and Doesn't delete it.... :-\...
Any ideas anyone?
Thanks
__________________