23.01.2012, 10:55
Hello there, I made a simple /stats but for some reason it shows health as like "1937365763"... any idea why? it doesnt do that with armour
pawn Код:
CMD:stats(playerid, params[])
{
new string[256], string2[128], string3[128], string4[128], string5[128], string6[128];
new name[MAX_PLAYER_NAME];
new Float:armour;
new Float:phealth;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerHealth(playerid, phealth);
GetPlayerArmour(playerid, armour);
format(string, sizeof(string), "||==================================|| %s ||==================================|| ", name);
format(string2, sizeof(string2), "Money %d || Level %d || Phone %s || Admin Rank %d ",GetPlayerMoney(playerid), GetPlayerScore(playerid), PlayerInfo[playerid][PhoneNumber], PlayerInfo[playerid][AdminLevel] );
format(string3, sizeof(string3), "Faction %d || Faction Rank %d || Job %d ", PlayerInfo[playerid][Fmember], PlayerInfo[playerid][Frank], PlayerInfo[playerid][pJob]);
format(string4, sizeof(string4), "Warnings %d || Health %d || Armour %d ", PlayerInfo[playerid][Warns], phealth, armour );
format(string5, sizeof(string5), "Interior %d || Virtual World %d || Skin %d ",GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), GetPlayerSkin(playerid));
format(string6, sizeof(string6), "Materials %d || Business %d", PlayerInfo[playerid][Materials], PlayerInfo[playerid][Biz]);
SendClientMessage(playerid, COLOR_GREY, string);
SendClientMessage(playerid, COLOR_GREEN, string2);
SendClientMessage(playerid, COLOR_GREY, string3);
SendClientMessage(playerid, COLOR_GREEN, string4);
SendClientMessage(playerid, COLOR_GREY, string5);
SendClientMessage(playerid, COLOR_GREEN, string6);
return 1;
}