21.01.2010, 21:34
Coloca assim:
pawn Code:
if(!strcmp(cmd, "/stats", true))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))return SendClientMessage(playerid, COR_CINZA, "USE: /stats [id]");
new plid = strval(tmp);
if(IsPlayerConnected(plid))
{
new string[256], pName[MAX_PLAYER_NAME], Float:health, Float:armour;
GetPlayerName(plid, pName, sizeof pName);
format(string, sizeof string, "Stats de %s:", pName);
SendClientMessage(playerid, COR_AMARELO, string);
format(string, sizeof string, "Matou/Kill: [%d] Morreu/Died: [%d] Suicidou/Suicide: [%d] Dinheiro/Money: [%d] Score: [%d]",
pstats[plid][pkills], pstats[plid][pmortes], pstats[plid][pkillhim], GetPlayerMoney(plid), GetPlayerScore(plid));
SendClientMessage(playerid, COR_BRANCO, string);
GetPlayerHealth(plid, health);
GetPlayerArmour(plid, armour);
format(string, sizeof string, "Vida/Life: [%.1f] Colete/Armour: [%.1f]", health, armour);
SendClientMessage(playerid, COR_BRANCO, string);
} else {
SendClientMessage(playerid, 0xFF0000AA, "Jogador nгo conectado!");
}
return 1;
}