04.01.2014, 17:33
https://sampwiki.blast.hk/wiki/Scripting_Basics#Strings
It's the size of the string. It can get 83 characters and a NULL termination character. Those two messages will never go over 84 characters so there's not reason to make it bigger.
I'll show you an example:
String: "AdmCmd: %s has made %s admin level %d"
Characters in that string so far: "AdmCmd: has made admin level " -> 31 characters + NULL = 32 (size).
We have 2 names to be displayed (MAX_PLAYER_NAME = 24) so 32 (the above) + 48 = 80 (size).
The level left, so assuming the max lenght of it is 4 (max 1337 level) - the final size is 84! It's a good habbit to count the characters and optimize the code by not wasting pointless bytes.
It's the size of the string. It can get 83 characters and a NULL termination character. Those two messages will never go over 84 characters so there's not reason to make it bigger.
I'll show you an example:
String: "AdmCmd: %s has made %s admin level %d"
Characters in that string so far: "AdmCmd: has made admin level " -> 31 characters + NULL = 32 (size).
We have 2 names to be displayed (MAX_PLAYER_NAME = 24) so 32 (the above) + 48 = 80 (size).
The level left, so assuming the max lenght of it is 4 (max 1337 level) - the final size is 84! It's a good habbit to count the characters and optimize the code by not wasting pointless bytes.