Quote
War3_DealDamage called when DealDamage is not suppose to be called, please use the non PRE forward
Mon Dec 5 00:40:37 2011 war3source/compiled/War3Source_067_Clinkz-BoneFletcher.smx
Mon Dec 5 00:40:37 2011 war3source/compiled/War3Source_067_Clinkz-BoneFletcher.smx
Вот его исходник, я добавил слово "Pre" и вот что получилось:
Quote
public OnW3TakeDmgBulletPre(victim,attacker,Float:damage)//OnWar3EventPostHurt( victim, attacker, damage )
А ошибки на сервере пошли теперь другого характера,как выше написано.Вот код расы:
Quote
public OnW3TakeDmgBulletPre(victim,attacker,Float:damage)//OnWar3EventPostHurt( victim, attacker, damage )
{
if( W3GetDamageIsBullet() && ValidPlayer( victim, true ) && ValidPlayer( attacker, true ) && GetClientTeam( victim ) != GetClientTeam( attacker ) )
{
if( War3_GetRace( attacker ) == thisRaceID && !W3HasImmunity(victim,Immunity_Skills) && !Hexed( attacker, false ))
{
new skill_level_strafe=War3_GetSkillLevel(attacker,thisRaceID,SKILL_1);
if(skill_level_strafe>0)
{
if( GetRandomFloat( 0.0, 1.0 ) <= 0.30 )
{
new arrows = StrafeArrows[attacker];
for(new num=1;num<=arrows;num++)
FireArrow(attacker,victim,GetRandomFloat(0.1,5.1),skill_level_strafe,false);
}
}
new skill_dmg = War3_GetSkillLevel( attacker, thisRaceID, SKILL_2 );
if(skill_dmg > 0)
{
if( GetRandomFloat( 0.0, 1.0 ) <= GetConVarFloat(SearingArrowCh) )
{
new String:wpnstr[32];
GetClientWeapon( attacker, wpnstr, 32 );
if(!StrEqual( wpnstr, "wep_knife" ) )
{
if(FireArrow(attacker,victim,0.2,0,true))
{
new damageamount = GetRandomInt(3,5);
FireArrow(attacker,victim,1.8,0,true);
EmitSoundToAll(Sound2,victim);
EmitSoundToAll(Sound3,attacker);
CreateFire(victim,"3355","2","3","normal","16",0.0,3.0);
War3_DealDamage( victim, damageamount, attacker, DMG_BULLET, "searing_arrow" );
PrintCenterText(attacker,"Searing Arrows dealt +%i damage!",damageamount);
}
}
}
}
}
}
}
{
if( W3GetDamageIsBullet() && ValidPlayer( victim, true ) && ValidPlayer( attacker, true ) && GetClientTeam( victim ) != GetClientTeam( attacker ) )
{
if( War3_GetRace( attacker ) == thisRaceID && !W3HasImmunity(victim,Immunity_Skills) && !Hexed( attacker, false ))
{
new skill_level_strafe=War3_GetSkillLevel(attacker,thisRaceID,SKILL_1);
if(skill_level_strafe>0)
{
if( GetRandomFloat( 0.0, 1.0 ) <= 0.30 )
{
new arrows = StrafeArrows[attacker];
for(new num=1;num<=arrows;num++)
FireArrow(attacker,victim,GetRandomFloat(0.1,5.1),skill_level_strafe,false);
}
}
new skill_dmg = War3_GetSkillLevel( attacker, thisRaceID, SKILL_2 );
if(skill_dmg > 0)
{
if( GetRandomFloat( 0.0, 1.0 ) <= GetConVarFloat(SearingArrowCh) )
{
new String:wpnstr[32];
GetClientWeapon( attacker, wpnstr, 32 );
if(!StrEqual( wpnstr, "wep_knife" ) )
{
if(FireArrow(attacker,victim,0.2,0,true))
{
new damageamount = GetRandomInt(3,5);
FireArrow(attacker,victim,1.8,0,true);
EmitSoundToAll(Sound2,victim);
EmitSoundToAll(Sound3,attacker);
CreateFire(victim,"3355","2","3","normal","16",0.0,3.0);
War3_DealDamage( victim, damageamount, attacker, DMG_BULLET, "searing_arrow" );
PrintCenterText(attacker,"Searing Arrows dealt +%i damage!",damageamount);
}
}
}
}
}
}
}
Как быть? В чем опять моя ошибка?






Logged




