19.06.2011, 20:35
Quote:
Here is an example:
pawn Код:
Then the players name is read in this line: "GetPlayerName(playerid, name, sizeof(name));" which means the variable "name" will hold the player's name, and to hold the same amount of characters as "name" (sizeof(name)) which is MAX_PLAYER_NAME (24)" And in this line we format the string: "format(string, sizeof(string), "( ! ) %s has joined the server",name);" to the size of "string" which is 28+MAX_PLAYER_NAME (28+24=52), where "%s" is placeholder for the variable called "name" which is holding the name of the player and has a size of 24. At the end we add ",name" to indicate that "%s" is placeholder for thevariable called "name". Hope this didnt confuse too much. Good luck learning scripting. |