Raised This Month: $ Target: $400
 0% 

Add model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 06-05-2010 , 08:33   Re: Add model
Reply With Quote #1

Code:
#include < amxmodx >

new g_szModelV [ ] = "models/shit.mdl"
new g_szModelP [ ] = "models/crap.mdl"

public plugin_precache ( )
{
    precache_model ( g_szModelV )
    precache_model ( g_szModelP )
}

public plugin_init ( )
{
    ... some code...
    
    register_event ( "CurWeapon", "EV_CurWeapon", "be", "1=1", "2=24" )
    
    ... some code...
}

public EV_CurWeapon ( Player )
{
    ... some checks....
    
    // Dont check if players current weapon is g3sg1.I already do that in  plugin_init
    
    entity_set_string ( Player, EV_SZ_viewmodel, g_szModelV )
    entity_set_string ( Player, EV_SZ_weaponmodel, g_szModelP )
}
__________________


Last edited by NiHiLaNTh; 06-05-2010 at 08:37. Reason: typo
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
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 05:18.


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