[SOLVED]Dialog /stats Bugged
#1

Does anyone know what is wrong with this code?

Код:
dcmd_stats(playerid,params[]) {
	new player1;
	new name[MAX_PLAYERS];
	new string[128];
	if(!strlen(params)) player1 = playerid;
	else player1 = strval(params);

	if(IsPlayerConnected(player1)) {
		format(string, sizeof(string),"%s's Stats\n\nKills: %d\nDeaths: %d\nRatio: %0.2f\nMoney: %d", name[player1], PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], PlayerInfo[player1][Kills]/Float:Deaths,GetPlayerMoney(player1));
		return ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Stats", string, "Ok", "Exit");
	} else return SendClientMessage(playerid, COLOR_RED, "Player Not Connected!");
}
If you do "/stats ID" it shows your own stats. How can I make it so it shows the stats of the ID I chose?
Thanks for the help.
Reply


Messages In This Thread
[SOLVED]Dialog /stats Bugged - by PotH3Ad - 08.01.2010, 20:58
Re: Dialog /stats Bugged - by Joe Staff - 08.01.2010, 21:09
Re: Dialog /stats Bugged - by PotH3Ad - 09.01.2010, 01:29

Forum Jump:


Users browsing this thread: 1 Guest(s)