Raised This Month: $ Target: $400
 0% 

[Help] Model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-25-2011 , 03:58   [Help] Model
Reply With Quote #1

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

How Can I Make So If player have ak47 and the other weapon?


Do I make Switch Case Or Else?
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:29.


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