How can you not get 10 percent of a number? There are plenty of ways...
One being:
Code:
// Assuming you're var is a cell and needs converting:
new Float:maxAmount = float(var) * 0.10; // 10 percent :o.
if (xpToTransfer > _:maxAmount)
{
new takeAway = xpToTransfer - _:maxAmount;
new amount = xpToTransfer - takeAway;
// ta da
}
(My math may be a little off [and code for that matter], I'm half asleep :-) )
__________________