AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   AWP Problem / Grenade Problem - Help (https://forums.alliedmods.net/showthread.php?t=105494)

cikjam 10-05-2009 06:28

AWP Problem / Grenade Problem - Help
 
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

Arkshine 10-05-2009 06:38

Re: AWP Problem / Grenade Problem - Help
 
If you have a problem regarding a specific plugin, post in the plugin thread.

cikjam 10-05-2009 07:11

Re: AWP Problem / Grenade Problem - Help
 
It's Not About a Specific Plugin.

It's What I'm Trying to Fix.

Exolent[jNr] 10-05-2009 08:56

Re: AWP Problem / Grenade Problem - Help
 
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 }

cikjam 10-05-2009 22:19

Re: AWP Problem / Grenade Problem - Help
 
Thanks Exolent, Ill test now.

cikjam 10-05-2009 22:36

Re: AWP Problem / Grenade Problem - Help
 
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.


All times are GMT -4. The time now is 22:38.

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