11.03.2011, 09:15
try this
pawn Код:
if(strcmp(cmd, "/stats", true) == 0) {
new player1, tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
ShowScore(playerid);
return 1; }
player1 = strval(tmp);
if(IsPlayerConnected(player1)) {
GetPlayerName(player1, playername, sizeof(playername));
format(string, sizeof(string), "<> %s's Stats: Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d ",playername, PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Deaths]/Float:PlayerInfo[player1][Deaths],GetPlayerMoney(player1));
SendClientMessage(playerid, green, string);
return 1;
} else {
SendClientMessage(playerid, COLOR_WHITE, "Player Not Connected!");
return 1; }
}