Raised This Month: $ Target: $400
 0% 

FM_SetModel, pev_impulse


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-26-2014 , 18:04   Re: FM_SetModel, pev_impulse
Reply With Quote #1

Weapon is given to a player, so SetModel is not called, or it is called but not viewable because it is given right to player.

If you want to set model when player gonna drop that weapon, then you have to check weapon that is hold by the created weaponbox, with get_pdata_cbase (there is a stock somewhere)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-27-2014 , 01:02   Re: FM_SetModel, pev_impulse
Reply With Quote #2

Quote:
Originally Posted by ConnorMcLeod View Post
If you want to set model when player gonna drop that weapon, then you have to check weapon that is hold by the created weaponbox, with get_pdata_cbase (there is a stock somewhere)
Made by you...

https://forums.alliedmods.net/showpo...&postcount=134

PHP Code:
GetWeaponBoxPropsent, &weapon, &weaponType, &ammoCountammoName[], len 

    for(new 
1i<= 5i++) 
    { 
        
weapon get_pdata_cbase(entm_rgpPlayerItems_CWeaponBox[i], XO_CWEAPONBOX); 
        if( 
weapon 
        { 
            break; 
        } 
    } 

    if( 
weapon 
    { 
        
weaponType get_pdata_int(weaponm_iIdXO_CBASEPLAYERWEAPON); 
    } 
    else 
    { 
        
weaponType 0
    } 

    
ammoCount get_pdata_int(entm_rgAmmo_CWeaponBox[1], XO_CWEAPONBOX); 
    if( 
ammoCount 
    { 
        
global_get(glb_pStringBaseget_pdata_int(entm_rgiszAmmo[1], XO_CWEAPONBOX), ammoNamelen); 
    } 

__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 10:12.


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