(Still) Problems with showing player health, armour and IP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: (Still) Problems with showing player health, armour and IP (
/showthread.php?tid=130772)
(Still) Problems with showing player health, armour and IP -
Andy_McKinley - 28.02.2010
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).
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;
}
Re: (Still) Problems with showing player health, armour and IP -
dice7 - 28.02.2010
Because you need to actually get the armour, health and ip and format it in the string
https://sampwiki.blast.hk/wiki/GetPlayerHealth
https://sampwiki.blast.hk/wiki/GetPlayerIp
https://sampwiki.blast.hk/wiki/GetPlayerArmour