PHP Code:
L 06/13/2010 - 23:54:56: [CSTRIKE] Player out of range (0)
L 06/13/2010 - 23:54:56: [AMXX] Displaying debug trace (plugin "idday.amxx")
L 06/13/2010 - 23:54:56: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/13/2010 - 23:54:56: [AMXX] [0] idday.sma::Hook_Deathmessage (line 143)
This is log from server, what he show me!
Line 143
PHP Code:
if( cs_get_user_team(killer) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
Full code from that line:
PHP Code:
public Hook_Deathmessage()
{
{
/* --| Get the killer and attacker */
new killer = read_data( 1 );
new victim = read_data( 2 );
new headshot = read_data( 3 );
/* --| If player has died with world / trigger_hurt */
if( killer == victim )
{
return PLUGIN_HANDLED;
}
/* --| Setting killer points when killed a enemy */
if( cs_get_user_team(killer) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
{
playerpoints[killer] += get_pcvar_num(cvar_killpoints)
if(headshot)
playerpoints[killer] += get_pcvar_num(cvar_headshotpoints);
}
if( cs_get_user_team(killer) == CS_TEAM_CT && cs_get_user_team(victim) == CS_TEAM_T)
{
playerpoints[killer] += get_pcvar_num(cvar_killpointsct)
if(headshot)
playerpoints[killer] += get_pcvar_num(cvar_headshotpointsct);
}
SaveData(killer)
set_user_gravity( victim, 1.0 );
set_user_maxspeed( victim, 0.0 );
}
return PLUGIN_CONTINUE;
}
Help me, to fix this sh*t x)