18.08.2009, 13:51
pawn Код:
if(strcmp(cmdtext, "/score", true) == 0)
{
new string[50];
new pscore = GetPlayerScore(playerid);
format(string, sizeof(string), "You're current score is: %d", pscore);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
GetPlayerScore returns an integer, and you need to save it, hence "pscore = GetPlayerScore(playerid);" (although as JaToch showed you don't HAVE to save it)
As pscore is an integer, you use either %d or %i to represent it in the format().
I also shortened your string as the players score + the text you have will never be longer than 50 characters. However, if you make the string longer you might have to increase the size.