2020-11-25, 06:46 PM
Hello, I would like to know how to get the percentage of a figure, so far I have tried this:
but it does not work (it gives me the figure of 10). Does anyone know how to do it correctly? thanks!
Code:
new percentage1 = 10;
new percentage2 = 8000;
CMD:cent(playerid, params[])
{
? ? new string[256];
? ? format(string, sizeof(string), "The result was %d", percentage1%percentage2);
? ? SendClientMessage(playerid,-1,string);
? ? return 1;
}
but it does not work (it gives me the figure of 10). Does anyone know how to do it correctly? thanks!