You could do what Darren says but I think taking the loading/delivery point would be better. A little Googling gave me this code:
pawn Код:
forward Float:GetDistanceFromPointToPoint(Float:X, Float:Y, Float:Z, Float:tX, Float:tY, Float:tZ);
public Float:GetDistanceFromPointToPoint(Float:X, Float:Y, Float:Z, Float:tX, Float:tY, Float:tZ)
{
return Float:floatsqroot((tX-X)*(tX-X)+(tY-Y)*(tY-Y)+(tZ-Z)*(tZ-Z));
}
And if you use this in a formula with giving money for example like this:
pawn Код:
GivePlayerMoney(playerid, floatround(GetDistanceFromPointToPoint(LoadPointX, LoadPointY, LoadPointZ, DeliveryPointX, DeliveryPointY, DeliveryPointZ), floatround_round)*2);
It will give more money the further the delivery point is away from the loadpoint.
Best regards,
Jesse
EDIT:
I don't know how experienced you are with scripting, but at the moment I've set it so it'll give double the amount of metres driven in money. If you want to alter this number just change the *2 to *3 or anything else ( Except floats, because then you'd have to do it in a little different way. If you want to do that and don't know how ask me and I'll explain it to you. )