Offline Player Stats
#1

Hello, i want Offline Player Stats, Here's my Stats CMD

Код:
function:ShowPlayerStats(playerid, playerid2)
{
	if(playerid2 == INVALID_PLAYER_ID) return 1; //Do not proceed.

	new string[1000], string2[256];

	format(string2, 256, ""YELLOW"%s(%d)\n\nGeneral:\n", GetName(playerid2), playerid2);
	strcat(string, string2);
	strcat(string, ""GREY"");
	format(string2, 556, ""WHITE"- Logged In: %d\n", PlayerInfo[playerid2][pLoggedIn]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Admin: %d\n", PlayerInfo[playerid2][pAdmin]); strcat(string, string2);
	format(string2, 556, ""WHITE"- VIP: %d "YELLOW"\n\n", PlayerInfo[playerid2][pVIP]); strcat(string, string2);
	format(string2, 556, ""YELLOW"Scores:\n"); strcat(string, string2);
	format(string2, 556, ""WHITE"- PlayTime Score: %d\n", PlayerInfo[playerid2][pPTScore]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Freeroam Score: %d\n", PlayerInfo[playerid2][pFRScore]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Deathmatch Score: %d\n", PlayerInfo[playerid2][pDMScore]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Race Score: 0\n"); strcat(string, string2);
	format(string2, 556, ""WHITE"- Football Goals: %d\n", PlayerInfo[playerid2][pFBScore]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Total Score: %d "YELLOW"\n\n", GetPlayerScore(playerid2)); strcat(string, string2);
	format(string2, 556, ""YELLOW"Misc:\n"); strcat(string, string2);
	format(string2, 556, ""WHITE"- Godmode: %d\n", PlayerInfo[playerid2][pGod]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Skin: %d\n", GetPlayerSkin(playerid2)); strcat(string, string2);
	format(string2, 556, ""WHITE"- Money: %d\n", GetPlayerMoney(playerid2)); strcat(string, string2);
	format(string2, 556, ""WHITE"- Active: %d\n", PlayerInfo[playerid2][pActive]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Ping: %d "YELLOW"\n\n", GetPlayerPing(playerid2)); strcat(string, string2);
	format(string2, 556, ""YELLOW"Weapons:\n"); strcat(string, string2);
	format(string2, 556, ""WHITE"- Assault Rifle: %d\n", PlayerInfo[playerid2][pAssault]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Submachine Gun: %d\n", PlayerInfo[playerid2][pSubmachine]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Shotgun: %d\n", PlayerInfo[playerid2][pShotgun]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Pistol: %d\n", PlayerInfo[playerid2][pPistol]); strcat(string, string2);
	format(string2, 556, ""WHITE"- Melee Weapon: %d "YELLOW"\n\n", PlayerInfo[playerid2][pMelee]); strcat(string, string2);

	ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""YELLOW"UG - Player Statistics", string, "Close", "");
	return 1;
}
Thanks for who will help me, i'll apperciate it.
Reply
#2

Which saving system are you using? dini or y_ini or dini2?
Reply
#3

Y_INI
Reply
#4

Just add a possibility to look it up by name (or however you name the player's INI file). Add a check to see if the file exists or not, if it does then display the details by reading the file.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)