Здравствуйте!
Подскажите, пожалуйста. Хочу поменять звук у дигла, звук не меняется, выдает ошибку в логах.
Код
...
public OnPluginStart()
{
AddNormalSoundHook(NormalSHook:SoundCallBackHook);
}
...
public Action:SoundCallBackHook(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
new Owner = GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity");
if(Owner > 0 && Owner <= MaxClients && IsCustom[Owner] && g_bCustomSpawnTwo)
{
if(StrEqual(sample, "weapons/deagle/de_clipin.wav"))
{
EmitSoundToAll("weapons/deagle/1/de_clipin.wav", Owner, channel, level, flags, volume);
return Plugin_Handled;
}
}
}
Выдает:
Цитата
L 01/31/2014 - 16:53:31: [SM] Native "GetEntPropEnt" reported: Property "m_hOwnerEntity" not found (entity 336/cs_ragdoll)
L 01/31/2014 - 16:53:31: [SM] Displaying call stack trace for plugin "123.smx":
L 01/31/2014 - 16:53:31: [SM] [0] Line 115, C:\123\sourcemod\scripting\123.sp::SoundCallBackHook()
Что здесь не так?