I'm making an Ammo System for my game and i was wondering if I can print the amount of ammo left, with dbText. I can make it say Ammo:
and then a selected string after that. Lets say 100.
Using this to post how much ammo left.
char Ammo[4] = "100";
int AmmoAmount = 100;
Using this to draw the text to screen.
void drawAmmo()
{
dbText(700, 40, "Ammo:");
dbText(750, 40, Ammo);
}
And I end up with the ammo in the top right.
But I want the char Ammo to change to an integer called AmmoAmount.
How can I change char Ammo to have a string value of what ever number AmmoAmount is, or is this even possible.
Thanks