25.11.2012, 16:22
The limit is 1024. Don't use so much high string size because it's waste of memory. 512 would be fine.
However, you used format at the first post and it will send only the last formatted message.
I'm assuming that SPD is a define of ShowPlayerDialog, so nothing about it.
In case the line is too large, use "\".
Last, these are numeric. It should be "%d" or "%i", not "%s".
However, you used format at the first post and it will send only the last formatted message.
I'm assuming that SPD is a define of ShowPlayerDialog, so nothing about it.
In case the line is too large, use "\".
pawn Код:
CMD:stats( playerid, params[] )
{
new stts[ 512 ], pName[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, pName, sizeof( pName ));
format( stts, sizeof( stts ), "\t{FFFFFF}[ {FFAE00}%s {FFFFFF}Statistics: ]\n\n \
{FFFFFF}Admin Level: {FFAE00}%d\n \
{FFFFFF}V.I.P Level: {FFAE00}%d\n \
{FFFFFF}Score: {FFAE00}%d\n \
{FFFFFF}Cash: {FFAE00}%d\n \
{FFFFFF}Coins: {FFAE00}%d\n \
{FFFFFF}Reputation: {FFAE00}%d\n \
{FFFFFF}Kills: {FFAE00}%d\n \
{FFFFFF}Deaths: {FFAE00}%d",
pName,
P_DATA[ playerid ][ Admin ],
P_DATA[ playerid ][ Vip ],
P_DATA[ playerid ][ Score ],
P_DATA[ playerid ][ Cash ],
P_DATA[ playerid ][ Coins ],
P_DATA[ playerid ][ Reputation ],
P_DATA[ playerid ][ Kills ],
P_DATA[ playerid ][ Deaths ] );
SPD( playerid, statistics, MSGBOX, "{FFAE00}P{FFFFFF}layer {FFAE00}S{FFFFFF}tats", stts, "Ok", "" );
return 1;
}