(Information) XP-> 0 .. Location -> Blueberry Server: Unknown Command.
Stats(playerid, params[]) { new pid = ReturnPlayer(params); if (pid == INVALID_PLAYER_ID) pid = playerid; new string[MAX_STRING]; new location[28]; GetPlayer2DZone(pid, location, 28); if(GetPlayerInterior(pid) > 0){ format(string, sizeof(location),"Interior"); } new PlayerState[10]; if(GetPlayerState(pid) == 1) { PlayerState = "On foot"; } if(GetPlayerState(pid) == 2) { PlayerState = "Driver"; } if(GetPlayerState(pid) == 3) { PlayerState = "Passenger"; } if(GetPlayerState(pid) == 7) { PlayerState = "Dead"; } if(GetPlayerState(pid) == 0 || GetPlayerState(pid) == 4 || GetPlayerState(pid) == 5 || GetPlayerState(pid) == 6 || GetPlayerState(pid) == 8) { PlayerState = "/"; } format(string, sizeof(string), "{068F06} %s's(id:%i) Player Statistics", g_playerdata[pid][NAME], pid); SendClientMessage(playerid, COLOUR_DEFAULT, string); format(string, sizeof(string), "{EBD113}(Information) {FFFFFF}XP -> %i .. Location -> %s",g_playerdata[pid][XP],location); SendPlayerInfo(playerid, string); new Float:kr; kr = (g_playerdata[pid][KILLS]/g_playerdata[pid][DEATHS]); format(string, sizeof(string), "{EBD113}(Kills/Deaths) {FFFFFF}Kills -> %i .. Drive-by kills - > %i .. Deaths -> %i .. Suicides -> %i .. Ratio -> %.2fm", g_playerdata[pid][KILLS], g_playerdata[pid][DBKILLS], g_playerdata[pid][DEATHS], g_playerdata[pid][SUICIDES],kr); SendPlayerInfo(playerid, string); new Float:health, Float:armour; GetPlayerHealth(pid,health);GetPlayerArmour(pid, armour); format(string, sizeof(string), "{EBD113}(Personal) {FFFFFF}Health -> %.f .. Armor -> %.f .. Bank(Approx.) -> $%i",health,armour,g_playerdata[pid][BANK]); SendPlayerInfo(playerid, string); format(string, sizeof(string), "{EBD113}(Account) {FFFFFF}Online -> %i days, %i hours and %i minutes .. Registered -> %s", max(g_playerdata[pid][TIMEONLINE] / 1440, 0), max((g_playerdata[pid][TIMEONLINE] / 60) % 24, 0), g_playerdata[pid][TIMEONLINE] % 60, INI_Exist(ReturnPlayerFilename(g_playerdata[playerid][NAME])) ? ("Yes") : ("No")); SendPlayerInfo(playerid, string); format(string, sizeof(string), "{EBD113}(Account) {FFFFFF}Paused -> %i days, %i hours and %i minutes .. Playerstate -> %s", max(g_playerdata[pid][PAUSETIME] / 1440, 0), max((g_playerdata[pid][PAUSETIME] / 60) % 24, 0), g_playerdata[pid][PAUSETIME] % 60, PlayerState); SendPlayerInfo(playerid, string); return 1; }
CMD:stats(playerid, params[])
{
new pid = ReturnPlayer(params);
if (pid == INVALID_PLAYER_ID) pid = playerid;
new string[MAX_STRING];
new location[28];
GetPlayer2DZone(pid, location, 28);
if(GetPlayerInterior(pid) > 0){
format(string, sizeof(location),"Interior");
}
new PlayerState[10];
if(GetPlayerState(pid) == 1) { PlayerState = "On foot"; }
if(GetPlayerState(pid) == 2) { PlayerState = "Driver"; }
if(GetPlayerState(pid) == 3) { PlayerState = "Passenger"; }
if(GetPlayerState(pid) == 7) { PlayerState = "Dead"; }
if(GetPlayerState(pid) == 0 || GetPlayerState(pid) == 4 || GetPlayerState(pid) == 5 || GetPlayerState(pid) == 6 || GetPlayerState(pid) == 8) { PlayerState = "/"; }
format(string, sizeof(string), "{068F06} %s's(id:%i) Player Statistics", g_playerdata[pid][NAME], pid);
SendClientMessage(playerid, COLOUR_DEFAULT, string);
format(string, sizeof(string), "{EBD113}(Information) {FFFFFF}XP -> %i .. Location -> %s",g_playerdata[pid][XP],location);
SendPlayerInfo(playerid, string);
new Float:kr;
kr = (g_playerdata[pid][KILLS]/g_playerdata[pid][DEATHS]);
format(string, sizeof(string), "{EBD113}(Kills/Deaths) {FFFFFF}Kills -> %i .. Drive-by kills - > %i .. Deaths -> %i .. Suicides -> %i .. Ratio -> %.2fm", g_playerdata[pid][KILLS], g_playerdata[pid][DBKILLS], g_playerdata[pid][DEATHS], g_playerdata[pid][SUICIDES],kr);
SendPlayerInfo(playerid, string);
new Float:health, Float:armour;
GetPlayerHealth(pid,health);GetPlayerArmour(pid, armour);
format(string, sizeof(string), "{EBD113}(Personal) {FFFFFF}Health -> %.f .. Armor -> %.f .. Bank(Approx.) -> $%i",health,armour,g_playerdata[pid][BANK]);
SendPlayerInfo(playerid, string);
format(string, sizeof(string), "{EBD113}(Account) {FFFFFF}Online -> %i days, %i hours and %i minutes .. Registered -> %s", max(g_playerdata[pid][TIMEONLINE] / 1440, 0), max((g_playerdata[pid][TIMEONLINE] / 60) % 24, 0), g_playerdata[pid][TIMEONLINE] % 60, INI_Exist(ReturnPlayerFilename(g_playerdata[playerid][NAME])) ? ("Yes") : ("No"));
SendPlayerInfo(playerid, string);
format(string, sizeof(string), "{EBD113}(Account) {FFFFFF}Paused -> %i days, %i hours and %i minutes .. Playerstate -> %s", max(g_playerdata[pid][PAUSETIME] / 1440, 0), max((g_playerdata[pid][PAUSETIME] / 60) % 24, 0), g_playerdata[pid][PAUSETIME] % 60, PlayerState);
SendPlayerInfo(playerid, string);
return 1;
}
cmd(Stats, 5, cmdtext);
CMD:stats(playerid,params[])
//or
Command:stats(playerid,params[])
wtf? Nope
it should be like this pawn Код:
|
cmd(stats, playerid,params[]), command(stats, blabla, COMMAND:stats, CMD:stats