Raised This Month: $ Target: $400
 0% 

Weaponbox Data


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 11-15-2013 , 10:23   Weaponbox Data
Reply With Quote #1

Hello. I used the search, but can not find exactly what I want.

I can hook weaponbox spawn:
PHP Code:
RegisterHam(Ham_Spawn"weaponbox""weaponbox_spawn"1
And now I have three questions:
  1. How I can check if weaponbox == M4A1 (or any another weapon)?
  2. How I can replace (change) model of weaponbox?
  3. How I can check if weaponbox with M4A1 (or USP) weapon have enabled silencer?
I try do first:
PHP Code:
public weaponbox_spawn(weaponBox)
{
    new 
iWeapon get_pdata_cbase(weaponBox354)
    
client_print(0print_chat"weaponbox: %i"iWeapon)    

I got "-1" value for all weaponbox'es .

I try do second:
PHP Code:
public weaponbox_spawn(weaponBox)
{
    
engfunc(EngFunc_SetModelweaponBox"models/w_ak47.mdl")

I guess this code should replace all weaponboxes models with AK47 model. But this does not work .

Thanks!

Last edited by Phant; 11-15-2013 at 10:25.
Phant is offline
Send a message via ICQ to Phant
 



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:17.


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