28.02.2010, 09:35
I've tried everything, it's just not working.
Could someone help me with this command (name, ID and money works. IP, Health and Armour aren't working).
Could someone help me with this command (name, ID and money works. IP, Health and Armour aren't working).
pawn Код:
dcmd_whois(playerid, params[])
{
new index = 0;
new playermoney;
tmp2 = strtok(params, index);
if (pInfo[playerid][pAdmin] < 1)
{
SystemMessage(playerid, "You are not an Administrator with the required level.");
return 1;
}
if(!strlen(tmp2))
{
SystemMessage(playerid, "[USAGE] ''/whois [playername/id]''.");
return 1;
}
new string[MAX_STRING];
giveplayerid = ReturnUser(tmp2);
if (IsPlayerConnected(giveplayerid))
{
playermoney = GetPlayerMoney(giveplayerid);
format(string, sizeof(string), "| Name: %s | ID: %d | Money: $%d | Health: | Armour: | IP:", PlayerName(giveplayerid), giveplayerid, playermoney);
SystemMessage(playerid, string);
}
else
{
format(string, sizeof(string), "That player is not active.");
SystemMessage(playerid, string);
}
return 1;
}