Thread: Weapon Return
View Single Post
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-30-2011 , 11:16   Re: Weapon Return
Reply With Quote #8

Quote:
Originally Posted by abdul-rehman View Post
You have included Hamsandwich just for ham_strip_weapons which is not a good idea, remove ham and include fun and then use strip_user_weapons, bcoz its more effecient and much faster.
I only need to strip the weapon their holding, and strip_user_weapons strips all the weapons that a player has.

Quote:
Originally Posted by ConnorMcLeod View Post
You don't need to check for weapon_knife and weapon_c4.
Instead you can :
- check if iWeapon is CSW_C4 or CSW_KNIFE
or
- check weapon cost before you send ham_strip_weapon and then check if price is > 0

You don't need to clamp money, just use min(cs_get_user_money( id ) + iRefund, 16000).

You could add shield return.

Other than that, code is ok.
Alright, I just couldn't find a way to strip a users shield. Got any ideas?

Quote:
Originally Posted by bibu View Post
Didn't find that before. I guess the only thing that makes mine different is the fact that I have grenade support + will be adding shield support soon if I figure out how to do it xD

Also, my CVar allows you to put a percentage, rather than dividing by a certain amount. And since it must be an integer in the other plugin, you have less choices for prices.

Approvers can determine if the changes suffice to make this plugin approved.

Quote:
Originally Posted by xPaw View Post
You also should check if user is alive.
Easy enough.



Updated to version 1.1
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 07-30-2011 at 11:19.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345