16-06-15, 21:51
Quote:#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new model[] = "models/apo.mdl";
new lastman;
new modelza[ 32 ];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Spawn, "player", "Ham_spawn" );
register_logevent( "logevent_round_end", 2, "1=Round_End" );
register_event( "CurWeapon", "Event_CurWeapon", "be", "1=1" );
}
public plugin_precache( )
{
precache_model( model );
}
public Ham_spawn( id )
{
if( lastman != id )
{
pev( id, pev_viewmodel2, modelza, charsmax( modelza ) );
}
else if( id == lastman )
{
lastman = -1;
client_cmd( id, "slot3" );
set_pev( id, pev_viewmodel2, modelza );
}
}
public Event_CurWeapon( id )
{
if( is_user_alive( id ) )
{
if( lastman == id )
{
if( lastman != -1 )
{
client_cmd( lastman, "slot3" );
set_pev( lastman, pev_viewmodel2, model );
}
}
}
}
public logevent_round_end()
{
new players[ 32 ], pnum;
get_players( players, pnum, "ae", "TERRORIST" );
if( pnum == 1 )
{
lastman = players[ 0 ];
client_cmd( lastman, "slot3" );
set_pev( lastman, pev_viewmodel2, model );
}
}
bunu bi dene ama ses olayı yok çalışırsa sesi ekleyecek birisi lazım bize kod : alıntı.

