Raised This Month: $ Target: $400
 0% 

How to know who has c4 ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kevin14144
Member
Join Date: Jul 2007
Old 01-28-2009 , 11:45   How to know who has c4 ?
Reply With Quote #1

I need to strip user weapons so use this code "strip_user_weapons".


I need to know who has c4 and give it again.



If "get_user_weapon()" that no use .

"get_user_weapon()" is when player get weapon now . Is it right ?

Last edited by kevin14144; 01-28-2009 at 11:52.
kevin14144 is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-28-2009 , 12:44   Re: How to know who has c4 ?
Reply With Quote #2

If you are stripping the weapons in spawn, there shouldn't be any problem. I tested it long time ago and bomb was given after spawn. Anyway:
Code:
/* Returns 1 if user has the "skill" to plant bomb, else 0. Normally this would only be true for a terrorist carrying a bomb.
 */
native cs_get_user_plant(index);
Just notice that it doesn't mean that users has a bomb, but if any other plugin isn't editing any bomb things, then it will fill your needs.

Last edited by SnoW; 01-28-2009 at 12:47.
SnoW is offline
Send a message via MSN to SnoW
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-28-2009 , 14:18   Re: How to know who has c4 ?
Reply With Quote #3

Code:
if( user_has_weapon(id, CSW_C4) ) {     ham_strip_weapon(id, "weapon_c4"); }

Use this for ham_strip_weapon().
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
kevin14144
Member
Join Date: Jul 2007
Old 01-28-2009 , 19:56   Re: How to know who has c4 ?
Reply With Quote #4

Quote:
Originally Posted by SnoW View Post
If you are stripping the weapons in spawn, there shouldn't be any problem. I tested it long time ago and bomb was given after spawn. Anyway:
Code:
/* Returns 1 if user has the "skill" to plant bomb, else 0. Normally this would only be true for a terrorist carrying a bomb.
 */
native cs_get_user_plant(index);
Just notice that it doesn't mean that users has a bomb, but if any other plugin isn't editing any bomb things, then it will fill your needs.
thanks , it work !
kevin14144 is offline
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 01:45.


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