24.10.2018, 19:11
Hello!
I'm using MapAndreas for a drop-object system.
If you are in an interior, MapAndreas will find the Z coord for the ground under the interior, so I made a function.
But when the interior is superior to 1, the objects creates at the X, Y, Z coord without making the 1.011 subtraction for touching the ground.
What is wrong in here?
Thanks in advance
I'm using MapAndreas for a drop-object system.
If you are in an interior, MapAndreas will find the Z coord for the ground under the interior, so I made a function.
pawn Код:
forward Float:MapAndreas_FindZ_For2DCoordEx(playerid, Float:X, Float:Y, Float:Z);
public Float:MapAndreas_FindZ_For2DCoordEx(playerid, Float:X, Float:Y, Float:Z)
{
new Float:zi;
if(GetPlayerInterior(playerid) > 0)
{
zi = Z-1.011;
}
else if(GetPlayerInterior(playerid) == 0)
{
zi = MapAndreas_FindZ_For2DCoord(X, Y, Z);
}
return zi;
}
//Tried with return Float:zi; same
What is wrong in here?
Thanks in advance