24.04.2013, 01:23
Hey guys
This is my Stats cmd, i want to ask you guys how i can make a thing that would say -> Example: 10 kills = Rank: Noobie, 20 kills = Rank: Trainee, or sth like that, please help . .
thanks
pawn Код:
CMD:stats(playerid, params[])
{
new id;
new Cash = PlayerInfo[id][pCash];
new Deaths = PlayerInfo[id][pDeaths];
new Kills = PlayerInfo[id][pKills];
new Score = PlayerInfo[id][pScore];
new pName[24];
new string[128];
if(sscanf(params, "u", id))
return SendClientMessage(playerid, DEEPPINK, "USAGE: /stats <id>");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, DEEPPINK, "ERROR: Player is not connected.");
{
GetPlayerName(playerid, pName, sizeof pName);
format(string, sizeof(string), "{00FF22}===============[Stats of {FFFFFF}%s{00FF22}]==============", pName);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "{FFFFFF}Cash: {00FF22}%d $", Cash);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "{FFFFFF}Deaths: {00FF22}%d {FFFFFF}| Kills: {00FF22}%d", Deaths, Kills);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "{FFFFFF}Score: {00FF22}%d", Score);
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid, -1, "{00FF22}================================================");
}
return 1;
}
