Raised This Month: $32 Target: $400
 8% 

Help me PLEASE WITH PLUGIN CS 1.6


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
YaMus
Junior Member
Join Date: Apr 2017
Old 05-19-2017 , 10:10   Help me PLEASE WITH PLUGIN CS 1.6
Reply With Quote #1

Hello every body, who can say me how i can give for player deagle with 1 ammo?!

give_item( id, "weapon_deagle")

i give this but deagle have 7 ammo how change this?
please write me!!!!
YaMus is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-19-2017 , 19:26   Re: Help me PLEASE WITH PLUGIN CS 1.6
Reply With Quote #2

PHP Code:
#include <cstrike>

...

cs_set_user_bpammo(idCSW_DEAGLE1
EDIT: Ops.. you want the clip, to change the clip you need to add some codes, because when you reload the weapon, the clip return to the default value (in this case, 7). Take a look into my extra items.
__________________









Last edited by CrazY.; 05-19-2017 at 19:28.
CrazY. is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-19-2017 , 19:31   Re: Help me PLEASE WITH PLUGIN CS 1.6
Reply With Quote #3

cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 1)
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
YaMus
Junior Member
Join Date: Apr 2017
Old 05-20-2017 , 07:57   Re: Help me PLEASE WITH PLUGIN CS 1.6
Reply With Quote #4

Thank you GUYS!!
YaMus is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 05-20-2017 , 09:56   Re: Help me PLEASE WITH PLUGIN CS 1.6
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 1)
https://forums.alliedmods.net/showpo...23&postcount=9

Should be

Code:
new iEnt = give_item( id, "weapon_deagle") ; if( iEnt ) cs_set_weapon_ammo( iEnt, 1 ) ;

Or this (when you already have a weapon and want to change it's clip)

Code:
new iEnt = find_ent_by_owner( -1, "weapon_deagle", id ) ; if( iEnt ) cs_set_weapon_ammo( iEnt, 1 ) ;

Or by Fakemeta (&Engine)

Code:
new iEnt = find_ent_by_owner( -1, "weapon_deagle", id ) ; if( iEnt ) set_pdata_int( iEnt, 51, 1, 4 ) ;
__________________

Last edited by edon1337; 05-20-2017 at 09:56.
edon1337 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 23:56.


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