[+rep] Funtion Not Working
#4

I've never used floatround, but I researched it and I think you're using it wrong.

Try this:
pawn Код:
case CHECKPOINT_RETURNTRUCK:
{
    if(TruckDeliveringTo[vehicleid] != INVALID_BUSINESS_ID)
    {
        new iBusiness = TruckDeliveringTo[vehicleid], iDistex, paymentEx;
        new Float: iDist = GetPlayerDistanceFromPoint(playerid, Businesses[iBusiness][bSupplyPos][0], Businesses[iBusiness][bSupplyPos][1], Businesses[iBusiness][bSupplyPos][2]);

        iDistex = floatround(iDist, floatround_round);
        paymentEx = iDistex / 3000 * payment;
        if (paymentEx > 25000) paymentEx = 25000;

        GivePlayerCash(playerid, paymentEx);
        format(string, sizeof(string), "* You were paid $%d for delivering the goods and returning the vehicle.", paymentEx);

        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
        SetVehicleToRespawn(vehicleid);
    }
}
Reply


Messages In This Thread
[+rep] Funtion Not Working - by ScorpiusMalfoy - 16.07.2014, 05:28
Re: [+rep] Funtion Not Working - by nmader - 16.07.2014, 05:38
Re: [+rep] Funtion Not Working - by ScorpiusMalfoy - 16.07.2014, 05:40
Re: [+rep] Funtion Not Working - by Jack_Leslie - 16.07.2014, 05:49
Re: [+rep] Funtion Not Working - by ScorpiusMalfoy - 16.07.2014, 05:52
Re: [+rep] Funtion Not Working - by ScorpiusMalfoy - 16.07.2014, 10:51
Re: [+rep] Funtion Not Working - by Jack_Leslie - 16.07.2014, 10:52
Re: [+rep] Funtion Not Working - by ScorpiusMalfoy - 16.07.2014, 11:20
Re: [+rep] Funtion Not Working - by Stanford - 16.07.2014, 11:21
Re: [+rep] Funtion Not Working - by ScorpiusMalfoy - 16.07.2014, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)