Author
|
Message
|
New Member
|
11-28-2015
, 15:29
Zombie class problem, Help
|
#1
|
Hi, I have a problem with this zombie class, the gun doesnt show up, how many bullets.. this show but the gun doesnt... I don't see it and if I click nothing happens... its like a classic zombie without knife/gun, no hands, no nothing.. What can I do to fix this?
Here's the code of .sma:
Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <cstrike>
#include <fun>
new g_zclassid1, cvar_ammo, cvar_fov
new const model_weapon_mac10[] = "models/v_mac10.mdl"
new const model_weapon_mac10_p[] = "models/p_mac10.mdl"
new g_IsSniperClasses[33]
new g_zombies_fov
public plugin_init()
{
register_plugin( "[ZP] Class: Sniper Zombie", "0.3", "Zombie-rus" )
register_event ( "WeapPickup", "ZombieGun", "b", "1=19" )
cvar_ammo = register_cvar( "zp_ammo_bullets", "0" )
cvar_fov = register_cvar( "zp_class_fov", "135" )
}
public plugin_precache()
{
g_zclassid1 = zp_register_zombie_class( "Sniper Zombie", "has mac10+", "zombie_source", "v_knife_zombie.mdl", 590, 220, 1.0, 1.0 )
precache_model ( model_weapon_mac10_p )
precache_model ( model_weapon_mac10 )
}
public plugin_cfg()
{
g_zombies_fov = get_cvar_pointer( "zp_zombie_fov" )
}
public zp_user_infected_post( id, infector )
{
if ( zp_get_user_zombie_class ( id ) == g_zclassid1 )
{
g_IsSniperClasses[ id ] = 1;
strip_user_weapons( id )
give_item( id, "weapon_mac10" )
cs_set_user_bpammo( id, CSW_MAC10, get_pcvar_num ( cvar_ammo ) )
msg_one_unreliable ( id )
}
}
public ZombieGun ( id )
{
if ( !zp_get_user_zombie ( id ) )
return PLUGIN_HANDLED;
new WepID = read_data ( 2 )
if ( WepID == CSW_MAC10 && g_IsSniperClasses[ id ] == 1 )
{
set_pev ( id, pev_viewmodel2, model_weapon_mac10 )
set_pev ( id, pev_viewmodel2, model_weapon_mac10_p )
}
return PLUGIN_HANDLED;
}
public msg_one_unreliable( id )
{
if ( zp_get_user_zombie_class ( id ) == g_zclassid1 )
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SetFOV"), {0,0,0}, id )
write_byte( get_pcvar_num ( cvar_fov ) )
message_end( )
}
else
{
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SetFOV" ), {0,0,0}, id )
write_byte( g_zombies_fov ) // fov angle
message_end( )
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Thank you, any help will be appreciated
Last edited by minusemp; 11-28-2015 at 16:55.
|
|
|
|