after 5 seconds, and several hours after i found a solution, it returns these contents when you look at water on the ground: 256, but 1 if there is something in the way.
PHP Code:
public Action:GetEnd(client, args)
{
new Float:vAngles[3], Float:vOrigin[3], Float:pos[3];
GetClientEyePosition(client, vOrigin);
GetClientEyeAngles(client, vAngles);
new Handle:trace = TR_TraceRayFilterEx(vOrigin, vAngles, MASK_WATER, RayType_Infinite, TraceASDF);
if(TR_DidHit(trace))
{
TR_GetEndPosition(pos, trace);
if(TR_GetPointContents(pos) != 1)
{
PrintToChat(client, "Hit water! :D");
}
}
CloseHandle(trace);
return Plugin_Handled;
}