Raised This Month: $51 Target: $400
 12% 

[HELP] the name of a weaponbox?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
keyblade
Member
Join Date: Nov 2010
Location: China
Old 10-04-2011 , 23:32   [HELP] the name of a weaponbox?
Reply With Quote #1

for example:
i dropped a m4,so it is on the ground now(it's a weaponbox entity)
does the weaponbox has the name about m4?(like CSW_M4A1,weapon_m4a1,models/w_m4a1.mdl...)
if so, how can i get the name?

and how can i get the clip ammo in it?

thank you for your help
keyblade is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-05-2011 , 01:14   Re: [HELP] the name of a weaponbox?
Reply With Quote #2

http://wiki.alliedmods.net/CWeaponBox_(CS)
http://forums.alliedmods.net/showthread.php?p=761924
You can always get your answers by searching
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>

Last edited by ConnorMcLeod; 10-05-2011 at 01:38. Reason: Fixed url :)
jim_yang is offline
keyblade
Member
Join Date: Nov 2010
Location: China
Old 10-05-2011 , 22:00   Re: [HELP] the name of a weaponbox?
Reply With Quote #3

Quote:
Originally Posted by jim_yang View Post
i found this in it:
PHP Code:
WeaponBox_PackAmmo(iWeaponBoxiAmmoIdiCount)
{
 new 
iMaxCarry g_iMaxAmmo[iAmmoId]
 if( 
iCount iMaxCarry )
 {
  
iCount iMaxCarry
 
}
 
set_pdata_int(iWeaponBoxm_rgiszAmmo_Slot0g_iszAmmoNames[iAmmoId], XTRA_OFS_WEAPONBOX)    //set the weaponbox ammo type?
 
set_pdata_int(iWeaponBoxm_rgAmmo_Slot0iCountXTRA_OFS_WEAPONBOX)    //set the weaponbox ammo number?

but when i tried this:
PHP Code:
register_forward(FM_Touch"Touch_Func")
 
public 
Touch_Func(entpid)
    ...
    new 
ammotype get_pdata_int(ent414//ent is a weaponbox index
    
new ammonum get_pdata_int(ent734)
    
client_print(pidprint_chat"yoooooooooo  %d %d"ammotypeammonum//pid is a player index 
and when i touched a weaponbox in the game,it often prints "yoooooooooo 0 0" to me

where is wrong?
keyblade is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-06-2011 , 01:13   Re: [HELP] the name of a weaponbox?
Reply With Quote #4

All code you need is here, you have ti understand it first and then you can try to convert it to pawn (it's already made for some parts in my plugin) :

http://svn.alliedmods.net/viewvc.cgi...dx&view=markup
( weaponbox code is at the end of the page )
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
keyblade
Member
Join Date: Nov 2010
Location: China
Old 10-06-2011 , 09:42   Re: [HELP] the name of a weaponbox?
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
All code you need is here, you have ti understand it first and then you can try to convert it to pawn (it's already made for some parts in my plugin) :

http://svn.alliedmods.net/viewvc.cgi...dx&view=markup
( weaponbox code is at the end of the page )
thank you.i will learn it...
keyblade 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 04:10.


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