PDA

View Full Version : Drop all weapon-Terrorist


tosiek
04-13-2008, 08:55
Please scripting plugin for drop all weapon in the terrorist.....
I have drop bomb... please add drop all weapon:
#include <amxmodx>
#include <engine>

public plugin_init()
{
register_event("ResetHUD", "spawn", "be", "1=1")
}


public spawn(id)
{
set_task(0.1, "drop_bomb", id)
set_task(0.5, "remove_bomb")
}

public drop_bomb(id)
{
engclient_cmd(id, "drop", "weapon_c4")
}

public remove_bomb() {
new ent = find_ent_by_class(-1, "weaponbox")
while (ent > 0) {
new model[33]
entity_get_string(ent, EV_SZ_model, model, 32)
if (equali(model, "models/w_backpack.mdl")) {
remove_entity(ent)
return PLUGIN_CONTINUE
}
ent = find_ent_by_class(ent, "weaponbox")
}
return PLUGIN_CONTINUE
}

grimvh2
04-13-2008, 08:58
more details please

ConnorMcLeod
04-13-2008, 09:01
Use get_user_weapons, then use fm_strip_user_gun (from fakemeta_util.inc) for all weapons

tosiek
04-13-2008, 09:01
OK.
It walks about dropp all weapon in team Terrorist...

It walks about it that (in order to) did not have weapon terrorist.
And could not walk. (i have plugin Hide'n'Seek)
Please, about ready codes :)

Please, about for all this plug-in of throwing out added drop all weapon in the Teroorists (CS 1.6)


#include <amxmodx>
#include <engine>

public plugin_init()
{
register_event("ResetHUD", "spawn", "be", "1=1")
}


public spawn(id)
{
set_task(0.1, "drop_bomb", id)
set_task(0.5, "remove_bomb")
}

public drop_bomb(id)
{
engclient_cmd(id, "drop", "weapon_c4")
}

public remove_bomb() {
new ent = find_ent_by_class(-1, "weaponbox")
while (ent > 0) {
new model[33]
entity_get_string(ent, EV_SZ_model, model, 32)
if (equali(model, "models/w_backpack.mdl")) {
remove_entity(ent)
return PLUGIN_CONTINUE
}
ent = find_ent_by_class(ent, "weaponbox")
}
return PLUGIN_CONTINUE
}