Raised This Month: $ Target: $400
 0% 

AWP Problem / Grenade Problem - Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 10-05-2009 , 06:28   AWP Problem / Grenade Problem - Help
Reply With Quote #1

Hi,

#1 When I buy a AWP from shop with 1 bullet, then go on AWP block 1 bullet. I end up with 40 bullets / Full Clip. Both Using
PHP Code:
cs_set_weapon_ammo(give_item(id"weapon_awp"), 1); 
#2 When I buy HE, and If I have HE it just does nothing. I want it to add another 1 to the person. So if they have 1 HE and buy one,he get 2.

#3 When i go on HE block and if I have smoke/flash grenade or knife out it just doesn't give the grenade when I get rid of it. But if I have HE out and get rid of it or no HE grenade and go on it I get it.
Conclusion: Something to check if player is carrying a HE. I tried get_user_weapon, but that only works if they are holding it.


Thankyou


+karma
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian
cikjam is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-05-2009 , 06:38   Re: AWP Problem / Grenade Problem - Help
Reply With Quote #2

If you have a problem regarding a specific plugin, post in the plugin thread.
__________________
Arkshine is offline
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 10-05-2009 , 07:11   Re: AWP Problem / Grenade Problem - Help
Reply With Quote #3

It's Not About a Specific Plugin.

It's What I'm Trying to Fix.
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian
cikjam is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-05-2009 , 08:56   Re: AWP Problem / Grenade Problem - Help
Reply With Quote #4

1.
Code:
// 1 bullet in clip, 0 in backpack cs_set_weapon_ammo( give_item( id, "weapon_awp" ), 1 ); cs_set_user_bpammo( id, CSW_AWP, 0 );

3.
Code:
if( user_has_weapon( id, CSW_HEGRENADE ) ) {     // player has grenade }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 10-05-2009 , 22:19   Re: AWP Problem / Grenade Problem - Help
Reply With Quote #5

Thanks Exolent, Ill test now.
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian
cikjam is offline
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 10-05-2009 , 22:36   Re: AWP Problem / Grenade Problem - Help
Reply With Quote #6

HE works fine, haven't found bugs.
AWP gets Error saying to debug.

PHP Code:
[CSTRIKENon-player entity -1 out of range 
and
PHP Code:
[AMXXRun time error 10native error (native "cs_set_weapon_ammo"
[EDIT] I just threw in a check to see if they have the weapon/grenade and it shows message, good enough.

Thanx for helping.
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian

Last edited by cikjam; 10-05-2009 at 22:50.
cikjam is offline
Reply


Thread Tools
Display Modes

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 22:38.


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