Raised This Month: $ Target: $400
 0% 

Has user got XXXX weapon?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-09-2009 , 08:58   Has user got XXXX weapon?
Reply With Quote #1

I need help.
[Note : my english isnt good xD]
if player has got a hegrenade .. ==> set_user_health(id,100)
but users current weapon CAN don't be hegrenade

:S sorry .. xD my english is bad
example :
user has got ak-47...
user is killed another player...
if user buys a hegrenade ..
users hp will be 100
xD

who can help me?

Last edited by Exolent[jNr]; 11-09-2009 at 09:01.
byetovice is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-09-2009 , 09:01   Re: Has user got XXXX weapon?
Reply With Quote #2

Only use bold when it's necessary.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2009 , 09:27   Re: Has user got XXXX weapon?
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
Only use bold when it's necessary.
Fixed.


You are in scripting help section, don't you have any begining of code ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-09-2009 , 10:15   Re: Has user got XXXX weapon?
Reply With Quote #4

if i use get_user_weapon, it gives me current weapons id..
but i dont want it
if want to get to know "has user got xxxx weapon"
example : hegrenade
byetovice is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-09-2009 , 10:16   Re: Has user got XXXX weapon?
Reply With Quote #5

http://forums.alliedmods.net/showthread.php?t=100352

Stop posting in all bold or else your topic will be trashed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-09-2009 , 10:18   Re: Has user got XXXX weapon?
Reply With Quote #6

sorry..
byetovice is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-09-2009 , 12:01   Re: Has user got XXXX weapon?
Reply With Quote #7

PHP Code:
if (user_has_weapon(idCSW_yourwep))
{
    
// Stuff

__________________
hleV is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-09-2009 , 12:41   Re: Has user got XXXX weapon?
Reply With Quote #8

All your weapons

Code:
CSW_P228        1
CSW_SCOUT        3
CSW_HEGRENADE        4
CSW_XM1014        5
CSW_C4            6
CSW_MAC10        7
CSW_AUG            8
CSW_SMOKEGRENADE    9
CSW_ELITE        10
CSW_FIVESEVEN        11
CSW_UMP45        12
CSW_SG550        13
CSW_GALI        14
CSW_GALIL        14
CSW_FAMAS        15
CSW_USP            16
CSW_GLOCK18        17
CSW_AWP            18
CSW_MP5NAVY        19
CSW_M249        20
CSW_M3            21
CSW_M4A1        22
CSW_TMP            23
CSW_G3SG1        24
CSW_FLASHBANG        25
CSW_DEAGLE        26
CSW_SG552        27
CSW_AK47        28
CSW_KNIFE        29
CSW_P90            30
__________________
I am out of order!
grimvh2 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2009 , 12:45   Re: Has user got XXXX weapon?
Reply With Quote #9

And if you want to know if the user is holding a specific weapon, use :

if( get_user_weapon(id) == CSW_KNIFE )
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-10-2009 , 02:08   Re: Has user got XXXX weapon?
Reply With Quote #10

Thanks...
if (user_has_weapon(id, CSW_yourwep))
{
// Stuff
}


it's true
byetovice 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 17:39.


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