Raised This Month: $ Target: $400
 0% 

Player model[Help]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-24-2011 , 16:15   Re: Player model[Help]
Reply With Quote #3

Quote:
Originally Posted by nikhilgupta345 View Post
PHP Code:
#include <amxmodx>
#include <fakemeta>

new bool:g_bCustomSkin33 ]; // Holder for whether player gets a custom model or not

new g_szViewModel[ ] = ""// View model location
new g_szWeaponModel[ ] = ""// Weapon model location


public plugin_precache()
{
    
precache_modelg_szViewModel );
    
precache_modelg_szWeaponModel );
}

public 
plugin_init()
{
    
register_event"CurWeapon""Event_CurWeapon""be""1=1" ); // Register curweapon

    
register_clcmd"say /randomknife""CmdKnife" );
}


public 
Event_CurWeaponid )
{
    if( !
is_user_aliveid ) || !g_bCustomSkinid ] ) // If they aren't alive or they don't have a custom skin return
        
return PLUGIN_CONTINUE;
    
    if( 
get_user_weaponid ) == CSW_KNIFE // If weapon is a knife
    
{
        
set_pevidpev_viewmodel2g_szViewModel ); // set models
        
set_pevidpev_weaponmodel2g_szWeaponModel ); // set models
    
}
}

public 
CmdKnifeid )
{
    if( !( 
get_user_flagsid ) & ADMIN_BAN // If they don't have BAN flag return
        
return PLUGIN_HANDLED;
    
    new 
iPlayers32 ], iNum;
    
get_playersiPlayersiNum );
    
    new 
iRand randomiNum ); // Get random player
    
    
g_bCustomSkiniPlayersiNum ] ] = true// Set the array index to true

Can I Do Case?


Like

Case CSW_Somting.
2reason2kill is offline
 



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


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