Возможно сработает.
Код
bool:IsSurfaceSliding(client)
{
decl Float:start[3], Float:normal[3], Float:end[3];
GetClientAbsOrigin(client, start);
TR_TraceRayFilter(start, Float:{-90.0, 0.0, 0.0}, MASK_SOLID, RayType_Infinite, TraceEntityFilterPlayer, client);
if (TR_DidHit(INVALID_HANDLE))
{
TR_GetEndPosition(end, INVALID_HANDLE);
TR_GetPlaneNormal(INVALID_HANDLE, normal);
GetVectorAngles(normal, normal);
if (normal[2] >= 30.0)
return true;
}
return false;
}
public bool:TraceEntityFilterPlayer(entity, mask, any:client)
{
return client != entity && (GetEntPropEnt(client, Prop_Data, "m_hOwnerEntity") == mask);
}