/stats dialog
#1

does someone know how to make cmd /stats with dialog?


Код:
#if defined USE_STATS
CMD:stats(playerid,params[]) {
	new string[100], pDeaths, player1,playername[MAX_PLAYER_NAME];
	if(isnull(params)) player1 = playerid;
	else player1 = strval(params);

	if(IsPlayerConnected(player1)) {
	    GetPlayerName(player1, playername, sizeof(playername));
 		if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
 		new str[120], str1[100];
 		format(str, sizeof(str),"%s's Stats", PlayerName2(player1));
		format(string,sizeof(string),"Scores: %d | Money: $%d | Kills: %d | Deaths: %d | K/D Ratio: %0.2f", GetPlayerScore(player1), GetPlayerMoney(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths);
		format(str1, sizeof(str1),"Rank: %s | Team: %s | Class: %s | Session Kills %d",GetRankName(player1), GetTeamName(player1), GetClass(player1), Skills[player1]);

		SendClientMessage(playerid, green,str);
		SendClientMessage(playerid, green,string);
		SendClientMessage(playerid, green,str1);
	} else return SendClientMessage(playerid, red, "Player Not Connected!");
	return 1;
}
#endif
Reply


Messages In This Thread
/stats dialog - by PowerF - 18.12.2014, 03:51
Re: /stats dialog - by Quickie - 18.12.2014, 04:29
Re: /stats dialog - by Ciandlah - 18.12.2014, 04:39
Re: /stats dialog - by PowerF - 18.12.2014, 05:09
Re: /stats dialog - by JeaSon - 18.12.2014, 06:11
Re: /stats dialog - by Stinged - 18.12.2014, 06:17

Forum Jump:


Users browsing this thread: 1 Guest(s)