23.09.2010, 17:38
Код:
CMD:fine(playerid, params[]) { new finedid, amount, reason; if (PlayerInfo[playerid][pAdmin] >= 1) { if (!sscanf(params, "ii", finedid, amount, reason)) { if (finedid != INVALID_PLAYER_ID) { new message[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); new finedname[MAX_PLAYER_NAME]; GetPlayerName(finedid, finedname, sizeof(name)); new tempcash; GetPlayerMoney(finedid); GivePlayerMoney(finedid, tempcash-amount); format(message, sizeof(message), "%s was fined $%d. Reason: %s ", finedname, amount, reason); SendClientMessageToAll(COLOR_ANNOUNCE, message); } else SendClientMessage(playerid, COLOR_SYSTEM, "[SYSTEM] That player is not connected"); } else SendClientMessage(playerid, COLOR_SYSTEM, "[SYSTEM] /fine [id] [amount] [reason]"); } else SendClientMessage(playerid, COLOR_SYSTEM, "[SYSTEM] Your not authorized to use this command! "); return 1; }
PlayerName(example) was fined $1,000(example). Reason: (blank,nothing)
Can anyone tell me why the first 2 display correctly but my reason doesn't?