08.01.2010, 21:09
hmm, try this instead.
Replace DIALOGID with a dialog id that won't interfere with other scripts.
pawn Код:
dcmd_stats(playerid,params[])
{
new gplayer;
if(!params[0])gplayer = playerid;
else gplayer=strval(params);
if(!IsPlayerConnected(gplayer))return SendClientMessage(playerid,COLOR_RED,"Player not connected.");
new tempstring[250];
GivePlayerName(gplayer,tempstring,sizeof(tempstring));
format(tempstring,sizeof(tempstring),"%s's Stats\n\nKills: %d\nDeaths: %d\nRatio: %0.1f\nMoney: %d",tempstring,PlayerInfo[gplayer][Kills], PlayerInfo[gplayer][Deaths], floatdiv(PlayerInfo[gplayer][Kills], PlayerInfo[gplayer][Deaths]),GetPlayerMoney(gplayer));
ShowPlayerDialog(playerid,DIALOGID,DIALOG_STYLE_MSGBOX,"Stats",tempstring,"","Close");
return 1;
}