Raised This Month: $ Target: $400
 0% 

[HELP] Check for smoke, he, weapons, flash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 07-27-2009 , 18:27   [HELP] Check for smoke, he, weapons, flash
Reply With Quote #1

Hey on my BM coding... I would like to know how when you step on a block it CHECKS to see if you already have a weapon/nade,smoke,flash. Like right now if you have a smoke and you step on it. It acts like you didnt have one. It doest stack but lets say u use that smoke and step on it it wont give you one anymore.
Attached Files
File Type: sma Get Plugin or Get Source (temp.sma - 70 views - 144.0 KB)
malec321 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-27-2009 , 19:17   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #2

user_has_weapon()
__________________
Arkshine is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 07-27-2009 , 20:26   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #3

so it would be

if user_has_weapon(id, weapon_smokegrenade, 0)
malec321 is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 07-27-2009 , 20:27   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #4

CSW_SMOKEGRENADE
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 07-27-2009 , 20:44   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #5

if user_has_weapon(id, CSW_SMOKEGRENADE, 0)

does that check if the user has NO smokes?
malec321 is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 07-27-2009 , 20:52   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #6

if( !user_has_bla bla
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 07-27-2009 , 23:49   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #7

if( !user_has_weapon(id, CSW_SMOKEGRENADE, 0))

?

=)

Last edited by malec321; 07-27-2009 at 23:55.
malec321 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-28-2009 , 04:58   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #8

You are in the SCRIPTING section. It means you are there to learn how to code, thus please test yourself instead of asking each time if it's good or not. -_-
__________________
Arkshine is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 09-11-2010 , 18:18   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #9

Bringing old topic back up,

I tryed

if ( get_user_team ( id ) == 1 && user_has_weapon( id, CSW_FLASHBANG, 0) )

and it wont work.. It compiled fine, am i not supposed to use , 0?
__________________
Ayyylmao
malec321 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-11-2010 , 18:29   Re: [HELP] Check for smoke, he, weapons, flash
Reply With Quote #10

If that doesn't work, you can get the bpammo of the grenade.

Code:
if ( get_user_team ( id ) == 1 && cs_get_user_bpammo( id, CSW_FLASHBANG ) > 0 )
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 18:23.


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