25.08.2013, 09:18
Hi,
It's possible to check is object in water?
It's possible to check is object in water?
CMD:check(playerid, params[])
{
new Float:x, Float:y, Float:z, maxobjects, string[256], count = 0;
maxobjects = CreateObject(1234, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0);
DestroyObject(maxobjects);
for(new i = 0; i < maxobjects-1; i++)
{
GetObjectPos(i, x, y, z);
if(z < 0.0) count++;
}
format(string, sizeof(string), "Underwater Objects: %d.", count);
SendClientMessage(playerid, -1, string);
return 1;
}
Where i can find zones where is water? because i have that system player can throw object, and i want to do when object reach the point, then check is object in water, but not using Z, because Z coordinate will be always the same. I want to do, object can be very high don't care, but if water exist when you look down.
|