Always look at the wiki for parameters and formats,
You got to understand what a variable is, its a storage, and you get quite a few kinds of it
Float, integer, string, Boolean and more;
format puts variables(changing values) in a string(a sentience, word, or even a letter);
its used as this
pawn Код:
format(output[], len, const format[], {Float,_}:...)
output is where the formatted string's gonna be, len is the lenth of it, you could use "sizeof(string)" for it, and const format is the words you wanna say with variables, an example should help you
So I want to tell "Jack" how much money I have, I've got to get his name from his ID first
pawn Код:
new name[MAX_PLAYER_NAME]//this is where I'm going to store his name
GetPlayerName(id, name);//id should be Jack's id, since there's alot of ids in game
now I save my money which is 10 to the "mymoney" variable
pawn Код:
new mymoney = GetPlayerMoney(playerid);
Now I want to tell Jack how much money I have, I don't even know how much money I'm going to have right since it changes...that's where format comes in.
pawn Код:
new string[128]//a string with 128 place for letters.
format(string, sizeof(string), "Hi %s, I got %d", name, mymoney);
SendClientMessage(playerid, Color, string);
now you could add 128 instead of "sizeof(string)", also I'm not going to guess the name, cause I might want to tell somebody else my money, so i put the name I got from the id in "%s" which is a string, and pass "name" to it, then put "%d" which is an integer and pass "mymoney" to it, I think you understand a big bit of that, but I have to guess you don't and try to help, hope you understood.