Subtraction does not work?
#1

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.
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
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
Reply


Messages In This Thread
Subtraction does not work? - by alanhutch - 24.10.2018, 19:11
Re: Subtraction does not work? - by Infin1ty - 24.10.2018, 20:13
Re: Subtraction does not work? - by alanhutch - 24.10.2018, 23:11
Re: Subtraction does not work? - by ReD_HunTeR - 25.10.2018, 00:31
Re: Subtraction does not work? - by alanhutch - 25.10.2018, 08:00
Re: Subtraction does not work? - by Infin1ty - 25.10.2018, 09:29
Re: Subtraction does not work? - by alanhutch - 25.10.2018, 09:53
Re: Subtraction does not work? - by alanhutch - 25.10.2018, 13:37
Re: Subtraction does not work? - by NaS - 25.10.2018, 16:54
Re: Subtraction does not work? - by alanhutch - 26.10.2018, 11:51

Forum Jump:


Users browsing this thread: 2 Guest(s)