26.05.2013, 18:36
pawn Код:
CMD:stats(playerid, params[])
{
new Target, iString[300]; // definimos al otro jugador y el string que vamos a usar.
if(!sscanf(params, "u", Target)) { // el parбmetro del otro jugador
if(Target == INVALID_PLAYER_ID) return SCM(playerid, COLOR_RED, "Jugador desconectado."); // si el jugador estб desconectado..
format(iString, sizeof(iString), "Kills: %d", pInfo[Target][pKills]); // Target porque es del otro jugador.
//ShowPlayerDialog(playerid, 5551, DIALOG_STYLE_MSGBOX, " ", iString, "OK", "");
SendClientMessage(playerid, -1, iString); // aquн muestra las estadнsticas del ID que pongas
} else {
format(iString, sizeof(iString), "Kills: %d",pInfo[playerid][pKills]); // aquн playerid porque son las del propio jugador.
//ShowPlayerDialog(playerid, 5551, DIALOG_STYLE_MSGBOX, " ", iString, "OK", "");
SendClientMessage(playerid, -1, iString); // aquн muestra las tuyas. Si pones /stats tambiйn salen, no es necesario poner /stats (tu id)..
}
return 1;
}