20.10.2009, 14:49
Do you even know what %d is for?
It's an placeholder which will insert an integer (whole) number.
Example (integer):
This will display "myInteger: 5".
Example (float):
This will display "myFloat: 5.0".
Example (string):
This will display "myString: MyText".
You can learn more here.
It's an placeholder which will insert an integer (whole) number.
Example (integer):
pawn Код:
new string[16], myVariable = 5;
format(string, sizeof(string), "myInteger: %d", myVariable);
SendClientMessage(playerid, 0xFFFFFFAA, string);
Example (float):
pawn Код:
new string[16], Float:myVariable = 5.0;
format(string, sizeof(string), "myFloat: %f", myVariable);
SendClientMessage(playerid, 0xFFFFFFAA, string);
Example (string):
pawn Код:
new string[24], myVariable[8];
format(myVariable, sizeof(myVariable), "myText");
format(string, sizeof(string), "myString: %s", myVariable);
SendClientMessage(playerid, 0xFFFFFFAA, string);
You can learn more here.