Grey83
не пишу плагины с весны 2022
- Сообщения
- 8,521
- Реакции
- 4,982
вот здесь используютПридется менять Sm ?
PHP:
stock TakeDamage(Victim, Damage, Attacker = 0, DamageType = DMG_GENERIC, String:WeaponName[] = "")
{
if(Victim > 0 && IsValidEdict(Victim) && IsClientInGame(Victim) && IsPlayerAlive(Victim) && Damage > 0)
{
new String:sDamage[16];
IntToString(Damage, sDamage, 16);
new String:sDamageType[32];
IntToString(DamageType, sDamageType, 32);
new pointHurt = CreateEntityByName("point_hurt");
if(pointHurt)
{
DispatchKeyValue(Victim, "targetname", "war3_hurtme");
DispatchKeyValue(pointHurt, "DamageTarget", "war3_hurtme");
DispatchKeyValue(pointHurt, "Damage", sDamage);
DispatchKeyValue(pointHurt, "DamageType", sDamageType);
if(!StrEqual(WeaponName, ""))
{
DispatchKeyValue(pointHurt, "classname", WeaponName);
}
DispatchSpawn(pointHurt);
AcceptEntityInput(pointHurt, "Hurt", Attacker > 0 ? Attacker : -1);
DispatchKeyValue(pointHurt, "classname", "point_hurt");
DispatchKeyValue(Victim, "targetname", "war3_donthurtme");
RemoveEdict(pointHurt);
}
}
}
PHP:
native void SDKHooks_TakeDamage(int entity, int inflictor, int attacker,
float damage, int damageType=DMG_GENERIC, int weapon=-1,
const float damageForce[3]=NULL_VECTOR, const float damagePosition[3]=NULL_VECTOR);
PHP:
//SDKHooks_TakeDamage(target, client, client, 0.0, DMG_ACID);
TakeDamage(target, 0, client, DMG_ACID);