Try look here: https://sampforum.blast.hk/showthread.php?tid=158858
|
Do you really expect a lot of help by making the most vague post possible? Why not post your /stats command to begin with? Don't expect people to put effort into replies when you put zero effort into the original post. Why not post some of your attempts so we can tell you what's wrong with them?
|
CMD:stats(playerid, params[])
{
new Player1;
if(isnull(params)) Player1 = playerid;
else Player1 = strval(params);
new str[258];
if(!IsPlayerConnected(Player1)) return SP 0xFF0000, "Player is not connected");
if(Player1 == playerid)
{
SendClientMessage(playerid, -1, "{6699FF} -|___________________|- YOUR STATS -|___________________|-");
}
else
{
format(str, sizeof(str), " {6699FF} -|______________________|- {FFFFFF}%s's {6699FF}STATS -|______________________|-", GetName(Player1));
SP -1, str);
}
new RankInfo[ 300 ];
switch(Rank[Player1])
{
case 0: RankInfo = "Beginner";
case 1: RankInfo = "Starter";
case 2: RankInfo = "Old school";
case 3: RankInfo = "Veteran";
case 4: RankInfo = "Heroe veteran";
}
new TeamInfo[ 300 ];
switch(gTeam[Player1])
{
case TEAM_COPS: TeamInfo = "Cop";
case TEAM_GANGS: TeamInfo = "Gangsta";
case TEAM_ARMY: TeamInfo = "Army";
case TEAM_MAFIA: TeamInfo = "Mafia";
}
new ClassInfo[ 300 ];
switch(gClass[Player1])
{
case 1: ClassInfo = "Sniper";
case 2: ClassInfo = "Pyromaniac";
case 3: ClassInfo = "Assault";
}
new scr = GetPlayerScore(Player1);
new money = GetPlayerMoney(Player1);
SendClientMessage(playerid, -1, " ");
format(str,sizeof(str), "{6699FF} Score {9A9A8C}[ %i ] {FFFFFF}| {6699FF}Money: {9A9A8C}[ %i ] {FFFFFF}| {6699FF}Rank: {9A9A8C}[ %d ] [ %s ])",scr,money,Rank[Player1],RankInfo);
SendClientMessage(playerid, -1, str);
SendClientMessage(playerid, -1, " ");
format(str,sizeof(str),"{6699FF}Kills: {9A9A8C}[ %d ] {FFFFFF}| {6699FF}Deaths: {9A9A8C}[ %d ] {FFFFFF}| {6699FF}Ratio: {9A9A8C}%0.2f",pInfo[Player1][Kills],pInfo[Player1][Deaths],Float:pInfo[Player1][Kills]/Float:pInfo[Player1][Deaths]);
SP -1, str);
SendClientMessage(playerid, -1, " ");
format(str,sizeof(str),"{6699FF}Team: {9A9A8C}[ %s ] {FFFFFF}| {6699FF}Class: {9A9A8C}[ %s ]" ,TeamInfo, ClassInfo);
SP -1, str);
SendClientMessage(playerid, -1, " ");
return 1;
}