25.11.2011, 14:21
When i type: /stats i get Unknown command...
and i compile and dont get any error, did you now whats a problem, or can you give me something similarly that works
pawn Код:
CMD:stats(playerid, params[])
{
Stats(playerid,playerid);
return 1;
}
public Stats(playerid,targetid)
{
new cash = GetPlayerMoney(targetid);
new admin = PlayerInfo[targetid][pAdmin];
new level = PlayerInfo[targetid][Level];
new exp = PlayerInfo[targetid][pExp];
new kills = PlayerInfo[targetid][pKills];
new death = PlayerInfo[targetid][pDeaths];
new ratio = kills/death;
new bd = PlayerInfo[targetid][bd];
new account = PlayerInfo[targetid][Banka];
new expa = level*4;
new intir = GetPlayerInterior(targetid);
new pla = PlayerInfo[targetid][Hour];
//new Float:shealth = PlayerInfo[targetid][pSHealth];
new Float:health;
new name[MAX_PLAYER_NAME];
GetPlayerName(targetid, name, sizeof(name));
GetPlayerHealth(targetid,health);
new coordsstring[256];
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "Level: [%d] Money: [$%d] Bank: [$%d]", level, cash, account);
SendClientMessage(playerid, Grey,coordsstring);
format(coordsstring, sizeof(coordsstring), "Exp: [%d/%d] Int: [%d] Kills: [%d] Deaths: [%d] Ratio: [%d]", exp, expa, intir, kills, death, ratio);
SendClientMessage(playerid, Grey,coordsstring);
format(coordsstring, sizeof(coordsstring), "Admin: [%d] BD: [%d] Heal: [%d]", admin, bd, health, pla);
SendClientMessage(playerid, Grey,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}