22.08.2012, 11:08
Hello guys,
Sorry, It's me again XD -- Anyway, I scripted this cmd:
But it doesn't give me the player's name and the right numbers, can you re-script it for me again? Thanks <3
Sorry, It's me again XD -- Anyway, I scripted this cmd:
pawn Код:
CMD:getplayerstats(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 2) return SendClientMessage(playerid, COLOR_RED, "Error Occured: This command is only for Admins.");
new str[256], TargetName[MAX_PLAYER_NAME], IP[16], targetid;
new Money = GetPlayerMoney(targetid);
PlayerNameGet(targetid, TargetName, 24);
GetPlayerIp(targetid,IP,sizeof IP);
if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, 0xFFFFFFF, "[ADMIN]/getplayerstats [playerid/name]");
format(str, 256, ""#COL_WHITE"=======================[%s statistics]=======================", TargetName);
SendClientMessage(playerid,COLOR_WHITE,str);
format(str,128, ">"#COL_WHITE"%s: IP[%s] - Money[$%i] - Kills[%i] - Deaths[%i] - Admin[%i] - Skin[%i]", TargetName, IP, Money, PlayerInfo[targetid][pKills], PlayerInfo[targetid][pDeaths], PlayerInfo[targetid][pAdmin], GetPlayerSkin(targetid));
SendClientMessage(playerid,COLOR_WHITE,str);
return 1;
}