08.01.2011, 23:09
I am currently learning to script. I made a /stats command but instead of showing:
-------Current stats: Player_Name------
blah blah blah...
it shows me:
-------Current stats: 32----------
32 is the ammount of money I have.
Here's the code:
PLAYER_NAME is defined as MAX_PLAYER_NAME
I just don't get it.
-------Current stats: Player_Name------
blah blah blah...
it shows me:
-------Current stats: 32----------
32 is the ammount of money I have.
Here's the code:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/stats", cmdtext, true, 10) == 0) { new statsname[128]; new statsmsg[256]; format(statsname, 128, "----------Current stats: %s----------", PLAYER_NAME); SendClientMessage(playerid, COLOR_YELLOW, statsname); PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid); format(statsmsg, 256, "Level: [%b] Admin level: [%i] Money: [$%i]", PlayerInfo[playerid][pScore], PlayerInfo[playerid][pAdminLevel], PlayerInfo[playerid][pCash]); SendClientMessage(playerid, COLOR_YELLOW, statsmsg); return 1; } return 1; }
I just don't get it.