Minor problem with stats commands.
#1

Hi,

After typing /stats on a un-registered player, It shows the XP and Location. (Fine)
But then, the next like says 'Unknown Command'. Not sure why, Can anyone spot the problem for the command ?

Код:
(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;
}
Thanks
Reply


Messages In This Thread
Minor problem with stats commands. - by [SF]OutLawZ - 20.07.2012, 11:41
Re: Minor problem with stats commands. - by Captain_Mani - 20.07.2012, 12:12
Re: Minor problem with stats commands. - by Rudy_ - 20.07.2012, 12:13
Re: Minor problem with stats commands. - by [SF]OutLawZ - 20.07.2012, 12:56
Re: Minor problem with stats commands. - by Rudy_ - 20.07.2012, 13:00
Re: Minor problem with stats commands. - by [SF]OutLawZ - 20.07.2012, 13:04
Re: Minor problem with stats commands. - by Djole1337 - 20.07.2012, 13:13
Re: Minor problem with stats commands. - by Rudy_ - 20.07.2012, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)