Raised This Month: $ Target: $400
 0% 

Weapon ammo HELP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 05-18-2010 , 15:52   Re: Weapon ammo HELP
Reply With Quote #1

lol -.-
SaM.ThE.MaN is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-18-2010 , 16:07   Re: Weapon ammo HELP
Reply With Quote #2

Quote:
Originally Posted by SaM.ThE.MaN View Post
lol -.-
What a useless post.

@OP - You don't need to create a variable if that's all you're doing with the entity. You can simply do
Code:
cs_set_weapon_ammo( give_item( id, "weapon_scout" ), 0 )
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-19-2010 , 11:34   Re: Weapon ammo HELP
Reply With Quote #3

Quote:
Originally Posted by wrecked_ View Post
@OP - You don't need to create a variable if that's all you're doing with the entity. You can simply do
Code:
cs_set_weapon_ammo( give_item( id, "weapon_scout" ), 0 )
You are wrong.
You need to create a variable, and check if it's not null before you send cs_set_weapon_ammo.

Code:
new wpn = give_item(id, "weapon_scout") if( wpn > 0 ) {  cs_set_weapon_ammo(wpn, 0) } cs_set_user_bpammo(id, CSW_SCOUT,  0)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 03:34.


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