pawn Код:
if(strcmp(cmdtext, "/stats", true) == 0)
{
new Float:health, Float:armour;
GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armour);
format(s, sizeof(s),"Health: %f | Armour: %f\nScore: %d | Money: %d", health, armour, GetPlayerScore(playerid), GetPlayerMoney(playerid));
ShowPlayerDialog(playerid, STATS_DIALOG, DIALOG_STYLE_MSGBOX,"Your Stats",s,"Done","Cancel");
return 1;
}
Everything works great but the health value is 100.00000 how can i make it to be only 100?
Instead of %f use %0.0f if you want 2 decimal places use %0.2f if you want 1 decimal place %0.1f etc etc.