Raised This Month: $ Target: $400
 0% 

ham_strip_weapon.Won't strip.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-05-2009 , 14:04   Re: ham_strip_weapon.Won't strip.
Reply With Quote #1

What does strip mean to you?

1. Drop a single weapon and leave it on the ground.
2. Drop a single weapon and delete it from the map.
3. Remove all of a players weapons and leave on ground.
4. Remove all of a players weapons and delete from map.
__________________
Bugsy is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 04-05-2009 , 14:08   Re: ham_strip_weapon.Won't strip.
Reply With Quote #2

Quote:
What does strip mean to you?

1. Drop a single weapon and leave it on the ground.
2. Drop a single weapon and delete it from the map.
3. Remove all of a players weapons and leave on ground.
4. Remove all of a players weapons and delete from map.

PHP Code:
stock ham_strip_weapon(id,weapon[])
{
    if(!
equal(weapon,"weapon_",7)) return 0;

    new 
wId get_weaponid(weapon);
    if(!
wId) return 0;

    new 
wEnt;
    while((
wEnt engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
    if(!
wEnt) return 0;

    if(
get_user_weapon(id) == wIdExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);

    if(!
ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
    
ExecuteHamB(Ham_Item_Kill,wEnt);

    
set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));

    return 
1;

When player holding weapon,it dissapears.
xbatista is offline
Send a message via Skype™ to xbatista
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode