PDA

View Full Version : Drop player's shield


SwataZ
04-14-2008, 13:41
How can i every round drop player's shield?

atomen
04-14-2008, 14:31
register curweapon and if they have shield client_cmd(id, "drop")

pocco299
04-14-2008, 19:24
This seems to work but they get one shot with it i dont see why :/


/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
register_plugin("shielddrop", "1.0", "Bambi")
register_event("CurWeapon","ShieldCheck","be")
// Add your code here...
}

public ShieldCheck(id)
{
if(cs_get_user_shield(id))
{
client_cmd(id, "drop")
}
}

hoboman
04-14-2008, 19:30
yeah, that is because the shield is not a weapon.
You may have to use register touch/FM_Touch to see if a player has touched a shield then set a task to be ran in 0.1 secs to see if the player has a shield.

It would probably be easier to use hamsandwich, but you will have to investigate which forward to use.

pocco299
04-15-2008, 03:56
alright, well then it's out of my reach sorry, I am kinda new and I have no idea how to use hamsandwich, or touch/FM_touch :(

YamiKaitou
04-15-2008, 09:00
Probably right now then. Cause, if you want to prevent them from picking them up or remove them once they drop it, you can look at GunGame or CSDM or a plugin that removes the weapon ents. Based on what you have just said, I would say that you would have a harder time getting this to work then you would like.

VEN
04-15-2008, 10:22
every round What do you mean? Which moment exactly? Player (re)spawn? Freezetime start/end?