• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How do I get a percentage?
#1
Hello, I would like to know how to get the percentage of a figure, so far I have tried this:



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


Messages In This Thread
How do I get a percentage? - by Ryder Sixz - 2020-11-25, 06:46 PM
RE: How do I get a percentage? - by Pinch - 2020-11-25, 07:40 PM
RE: How do I get a percentage? - by Ryder Sixz - 2020-11-25, 08:42 PM
RE: How do I get a percentage? - by Awide - 2020-11-25, 08:48 PM