09.02.2014, 20:00
(
Последний раз редактировалось Ananisiki; 28.02.2014 в 13:00.
)
~~~~~~
CMD:stats(playerid,params[])
{
new pID;
if(sscanf(params, "u", pID))
{
new string[32];
format(string, sizeof (string), "~p~%s (%d)", PlayerName(playerid), playerid);
PlayerTextDrawSetString(playerid, StatsTextDraw[4][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[playerid][Kills]);
PlayerTextDrawSetString(playerid, StatsTextDraw[6][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[playerid][Deaths]);
PlayerTextDrawSetString(playerid, StatsTextDraw[7][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[playerid][Rapes]);
PlayerTextDrawSetString(playerid, StatsTextDraw[10][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[playerid][DrugsTaken]);
PlayerTextDrawSetString(playerid, StatsTextDraw[11][playerid], string);
format(string, sizeof (string), " ~g~%d ~b~Game Days", pStats[playerid][DaysPlayed]);
PlayerTextDrawSetString(playerid, StatsTextDraw[13][playerid], string);
format(string, sizeof (string), " ~g~%d", GetPlayerScore(playerid));
PlayerTextDrawSetString(playerid, StatsTextDraw[15][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[playerid][BonusKills]);
PlayerTextDrawSetString(playerid, StatsTextDraw[17][playerid], string);
PlayerTextDrawShow(playerid, StatsTextDraw[0][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[1][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[2][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[3][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[4][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[5][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[6][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[7][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[8][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[9][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[10][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[11][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[12][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[13][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[14][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[15][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[16][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[17][playerid]);
}
else
{
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This Player Is Not Connected.");
// pStats[pID][Score] = GetPlayerScore(pID);
// pStats[pID][Money] = GetPlayerMoney(pID);
new string[32];
format(string, sizeof (string), "~p~%s (%d)", PlayerName(pID), pID);
PlayerTextDrawSetString(playerid, StatsTextDraw[4][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[pID][Kills]);
PlayerTextDrawSetString(playerid, StatsTextDraw[6][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[pID][Deaths]);
PlayerTextDrawSetString(playerid, StatsTextDraw[7][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[pID][Rapes]);
PlayerTextDrawSetString(playerid, StatsTextDraw[10][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[pID][DrugsTaken]);
PlayerTextDrawSetString(playerid, StatsTextDraw[11][playerid], string);
format(string, sizeof (string), "%d Game Days", pStats[pID][DaysPlayed]);
PlayerTextDrawSetString(playerid, StatsTextDraw[13][playerid], string);
format(string, sizeof (string), "~g~%d", GetPlayerScore(playerid));
PlayerTextDrawSetString(playerid, StatsTextDraw[15][playerid], string);
format(string, sizeof (string), "~g~%d", pStats[pID][BonusKills]);
PlayerTextDrawSetString(playerid, StatsTextDraw[17][playerid], string);
PlayerTextDrawShow(playerid, StatsTextDraw[0][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[1][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[2][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[3][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[4][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[5][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[6][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[7][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[8][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[9][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[10][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[11][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[12][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[13][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[14][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[15][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[16][playerid]);
PlayerTextDrawShow(playerid, StatsTextDraw[17][playerid]);
}
return 1;
}
if(sscanf(params, "u", pID)) //becouse this means if he didn't used correct format
if(!sscanf(params, "u", pID)) //code continues
else return SendClientMessage(playerid, -1, "Usage /spec ID");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This Player Is Not Connected.");