AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   New weapon model (https://forums.alliedmods.net/showthread.php?t=221510)

CodeStepper 07-23-2013 03:38

New weapon model
 
Hi!

I want to replace mp5navy model. So.. i used this code:
PHP Code:

ovoid public ham_spawn_playeraint userid )
{
    if( 
is_user_connecteduserid ) )
    {
        
char itemname[32] = null;
        
int  startammo 104,
             
itemgameid    19;
        
        
formatexitemname31"weapon_mp5navy" );
        
int entid give_itemuseriditemname );

        
entity_set_stringuseridEV_SZ_weaponmodel"models/special/v_mt9g2.mdl" );
        
entity_set_stringuseridEV_SZ_viewmodel"models/special/p_mt9g2.mdl" );
        
        
cs_set_weapon_ammoentid34 );
        
set_user_maxspeeduserid247.0 255.0 );
        
cs_set_user_bpammouseriditemgameidstartammo );
    }


And in plugin_ini RegisterHam - Ham_Spawn of course. And I have a problem... It doesn't display anything... but I can shoot...

What's wrong...
Thanks in advance for answers...

President 07-23-2013 04:39

Re: New weapon model
 
http://forums.alliedmods.net/showthread.php?t=40822

CodeStepper 07-23-2013 06:05

Re: New weapon model
 
Thank you :)


All times are GMT -4. The time now is 21:32.

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