This fixes the precache issue in the most easy way:
Code:
public plugin_precache()
{
precache_model(VIP_MODEL)
precache_sound(VIP_CONNECT)
precache_sound(MENU_POPUP)
precache_sound(MENU_OK)
gCylinderSprite = precache_model( "sprites/shockwave.spr" );
}
You have 2 DeathMsg hooks that you can combine.
First you remove this:
Code:
public Hook_Deathmessage(id)
{
new killer = read_data( 1 );
new victim = read_data( 2 );
if( killer == victim )
{
return PLUGIN_HANDLED;
}
HasSpeed[ victim ] = false;
set_user_maxspeed( victim, 0.0 );
if(RandomFunction[id] == 2)
{
set_user_godmode(id, 1)
}
return PLUGIN_CONTINUE;
}
and this
Code:
register_event( "DeathMsg", "Hook_Deathmessage", "a" );
And then you edit event_deathmsg() to this:
Code:
public event_deathmsg()
{
new victim = read_data(2)
new killer = read_data(1)
if ( ! is_user_connected(victim) )
return
if((get_user_flags(victim) & FLAG) && (get_pcvar_num(cvar_deathpoints) == 1))
{
cs_set_user_deaths(victim, -1)
}
if(is_user_connected(killer) && get_pcvar_num(cvar_freeviptry) == 1)
{
if((get_user_team(killer) == 2) && (get_user_team(victim) == 1) && !(get_user_flags(killer) & FLAG))
{
VipPoints[killer] += 1;
}
}
HasSpeed[ victim ] = false;
set_user_maxspeed( victim, 0.0 );
if(RandomFunction[killer/*?*/] == 2)
{
set_user_godmode(killer/*?*/, 1)
}
}
Come back if you have further errors
__________________