19.08.2010, 14:33
Formatting and getting the player name with one parameter less to write(format is for use of one parameter, shift it, if you want):
pawn Code:
#define cformat(%0,%1,%2); format(%0,sizeof %0,%1,%2); //used for formats with one parameter
#define cGetPlayerName(%0,%1); GetPlayerName(%0,%1,MAX_PLAYER_NAME);
Example of standart use:
new Name[MAX_PLAYER_NAME], string[121];
GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
format(string,sizeof (string),"%s was comited suicide",Name);
printf("%s",string);
Example of use without standart parameters :
new Name[MAX_PLAYER_NAME], string[121];
cGetPlayerName(playerid,Name);
cformat(string,"%s was comited suicide",Name);
printf("%s",string);
//You can make this for any functions, it is only a example.

