Health Stats freaking out.
#1

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;
}
Reply


Messages In This Thread
Health Stats freaking out. - by milanosie - 23.01.2012, 10:55
Re: Health Stats freaking out. - by Vince - 23.01.2012, 11:02
Re: Health Stats freaking out. - by T0pAz - 23.01.2012, 11:04
Re: Health Stats freaking out. - by [ABK]Antonio - 23.01.2012, 11:17
Re: Health Stats freaking out. - by milanosie - 23.01.2012, 11:45

Forum Jump:


Users browsing this thread: 2 Guest(s)