Raised This Month: $ Target: $400
 0% 

Model Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Merc3y
Member
Join Date: Dec 2009
Old 12-26-2009 , 04:05   Model Problem
Reply With Quote #1

Why it doesn't work ?


PHP Code:
/*================================================================================
 
    -----------------------------------
    -*- [ZP] Zombie Class : Mystique Zombie -*-
    -----------------------------------
 
    ~~~~~~~~~~~~~~~
    - Description -
    ~~~~~~~~~~~~~~~
 
    Press "v" to disguise as a human being.
 
================================================================================*/
#include <amxmodx>
#include <cstrike>
#include <zombieplague>
 
new g_zclass_mzombieBindMaxPlayers
new HasDisguise33 ] = 0
 
new const zclass_name[] = { "Mystique Zombie" }
new const 
zclass_info[] = { "Disguise" }
new const 
zclass_model[] = { "zombie_source" }
new const 
zclass_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass_health 1700
const zclass_speed 270
const Float:zclass_gravity 0.9
const Float:zclass_knockback 1.0
 
public plugin_init( )
{
        
register_plugin"[ZP] Zombie Class : Mystique Zombie""1.0""Merc3y" )
        
register_logevent"roundStart"2"1=Round_Start" )
        
register_clcmd"+disguise""disguise_start"ADMIN_ALL"bind [key] +disguise" )
        
Bind register_cvar"zp_mzombie_bindkey""1" )
        
MaxPlayers get_maxplayers( )
}
 
public 
plugin_precache( )
{
        
g_zclass_mzombie zp_register_zombie_classzclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback )
 
        
precache_model"models/player/sas/sas.mdl" )
        
precache_model"models/player/arctic/arctic.mdl" )
        
precache_model"models/player/gign/gign.mdl" )
        
precache_model"models/player/gsg9/gsg9.mdl" )
        
precache_model"models/player/guerilla/guerilla.mdl" )
        
precache_model"models/player/leet/leet.mdl" )
        
precache_model"models/player/terror/terror.mdl" )
        
precache_model"models/player/urban/urban.mdl" )
}
 
public 
zp_user_infected_postidinfector )
{
         if ( 
zp_get_user_zombie_classid ) == g_zclass_mzombie )
         {
                   
HasDisguiseid ] = 0
                   
new mode get_pcvar_numBind )
 
                   if ( 
mode == )
                   {
                        
client_cmdid"bind v ^"+disguise^"" )
                        
chat_printid"To disguise press ^'^'V^'^'" )
                   }
 
                   if ( 
mode == 
                   {
                        
chat_printid"To disguise type bind <key> +disguise" )
                   }
         }
}
 
public 
disguise_startid 
{
        if ( 
zp_get_user_zombieid ) && zp_get_user_zombie_classid ) == g_zclass_mzombie && !zp_get_user_nemesisid ) )
        {
                if ( !
is_user_aliveid ) )
                {
                      
chat_printid"You can't disguise when you are are dead." )
                      return
                }
 
                else
                {
                      
Disguiseid )
                      
HasDisguiseid ] = 1
                
}
        }
}
 
public 
Disguiseid )
{
          if ( 
zp_get_user_zombieid ) && zp_get_user_zombie_classid ) == g_zclass_mzombie && !zp_get_user_nemesisid ) )
          {
                 switch ( 
random_num1) )
                 {
                       case 
1:
                       {
                             
cs_set_user_modelid"models/player/sas/sas.mdl" )
                       }
 
                       case 
2:
                       {
                             
cs_set_user_modelid"models/player/arctic/arctic.mdl" )
                       } 

                       case 
3:
                       {
                             
cs_set_user_modelid"models/player/gign/gign.mdl" )
                       } 

                       case 
4:
                       {
                             
cs_set_user_modelid"models/player/gsg9/gsg9.mdl" )
                       }

                       case 
5:
                       {
                             
cs_set_user_modelid"models/player/guerilla/guerilla.mdl" )
                       }
 
                       case 
6:
                       {
                             
cs_set_user_modelid"models/player/leet/leet.mdl" )
                       } 

                       case 
7:
                       {
                             
cs_set_user_modelid"models/player/terror/terror.mdl" )
                       } 

                       case 
8:
                       {
                             
cs_set_user_modelid"models/player/urban/urban.mdl" )
                       } 
                 }
          }

 
public 
roundStart( )
{
      for ( new 
1<= MaxPlayersi++ )
      {
                
HasDisguise] = 0
      
}
}
 
stock chat_printplr, const message[ ], { FloatSqlResult}:... )
{
    static 
msg192 ], saytextmaxplayers;
    
formatmsg191"^x04[ZP]^x01 " );
    
vformatmsg], 185message);
 
    if ( !
saytext )
    {
        
saytext get_user_msgid"SayText" );
    }
 
    if ( !
maxplayers )
    {
        
maxplayers get_maxplayers( );
    }
    if ( 
plr <= maxplayers && plr )
    {
        
message_beginMSG_ONE_UNRELIABLEsaytext, { 00}, plr );
        
write_byteplr );
        
write_stringmsg );
        
message_end( );
    }
    else if ( !
plr )
    {
        for( new 
1<= maxplayersi++ )
        {
            if ( !
is_user_connected) )
            {
                continue;
            }
 
            
message_beginMSG_ONE_UNRELIABLEsaytext, { 00}, );
            
write_byte);
            
write_stringmsg );
            
message_end( );
        }
    }
 
    return 
1;


Last edited by Merc3y; 12-26-2009 at 04:18.
Merc3y 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 04:14.


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