Senior Member
Join Date: Nov 2007
Location: New Jersey
|
04-20-2009
, 16:01
[REQ] Disarm,Bury,RemoveDroppedWeapon on Player(s) at round end
|
#1
|
As the title says I'm looking for something that buries and disarms a player at the round's end.
Untested coding but there probably is a better method than this.
PHP Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta>
#define PLUGIN "Omg Disarm And Bury!!" #define VERSION "1.0" #define AUTHOR "Super Central Coding Stuck together by Fang D:?"
//Disarm Code Credited to SuperCentral
new weapons[33][] = { "weapon_usp", "weapon_glock18", "weapon_deagle", "weapon_p228", "weapon_elite", "weapon_fiveseven", "weapon_m3", "weapon_xm1014", "weapon_tmp", "weapon_mac10", "weapon_mp5navy", "weapon_p90", "weapon_ump45", "weapon_famas", "weapon_galil", "weapon_ak47", "weapon_m4a1", "weapon_sg552", "weapon_aug", "weapon_scout", "weapon_sg550", "weapon_awp", "weapon_g3sg1", "weapon_m249", "weapon_hegrenade", "weapon_smokegrenade", "weapon_flashbang", "weapon_shield", "weapon_c4", "weapon_knife", "item_kevlar", "item_assaultsuit", "item_thighpack" }
enum { WEAPON_USP, WEAPON_GLOCK18, WEAPON_DEAGLE, WEAPON_P228, WEAPON_ELITE, WEAPON_FIVESEVEN, WEAPON_M3, WEAPON_XM1014, WEAPON_TMP, WEAPON_MAC10, WEAPON_MP5NAVY, WEAPON_P90, WEAPON_UMP45, WEAPON_FAMAS, WEAPON_GALIL, WEAPON_AK47, WEAPON_M4A1, WEAPON_SG552, WEAPON_AUG, WEAPON_SCOUT, WEAPON_SG550, WEAPON_AWP, WEAPON_G3SG1, WEAPON_M249, WEAPON_HEGRENADE, WEAPON_SMOKEGRENADE, WEAPON_FLASHBANG, WEAPON_SHIELD, WEAPON_C4, WEAPON_KNIFE, ITEM_KEVLAR, ITEM_ASSAULTSUIT, ITEM_THIGHPACK }
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("round_end", 2, "1=Round_End") }
public round_end(id) { //Taken from AMX SUPER but untested. (Will this work?) new origin[3]
get_user_origin(id,origin) origin[2] -= 2000 fm_set_user_origin(id,origin)
new iweapons[32], wpname[32], inum get_user_weapons(id,iweapons,inum)
for(new a=0;a<inum;++a){
get_weaponname(iweapons[a],wpname,31) engclient_cmd(id,"drop",wpname) engfunc(EngFunc_RemoveEntity, wpname) }
engclient_cmd(id,weapons[WEAPON_KNIFE]) }
//Stocks from AMX SUPER stock fm_set_user_origin(index, /* const */ origin[3]) { new Float:orig[3] IVecFVec(origin, orig)
return fm_entity_set_origin(index, orig) } stock fm_entity_set_origin(index, const Float:origin[3]) { new Float:mins[3], Float:maxs[3] pev(index, pev_mins, mins) pev(index, pev_maxs, maxs) engfunc(EngFunc_SetSize, index, mins, maxs)
return engfunc(EngFunc_SetOrigin, index, origin) }
Last edited by fang; 04-20-2009 at 16:07.
|
|