[Help] /stats CMD fix
#1

I made a command that shows your stats but HP and Armor doesnt show right like;

Health is 90 but shows 1, health is 100 but shows 1
Armor is 0 but shows 1, armor is 80 but shows 1

Code
pawn Код:
if(strcmp(cmdtext, "/stats", true) == 0)
    {
      new StatMSG[128];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        new Float:pHealth;
        new Float:pArmour;
      format(StatMSG,sizeof(StatMSG),"[Stats] Name: %s, Health: %d, Armor: %d, Money: %d", pName, GetPlayerHealth(playerid, pHealth), GetPlayerArmour(playerid, pArmour), GetPlayerMoney(playerid));
        if (Job[playerid] == 0) {
        SendClientMessage(playerid, COLOR_FLBLUE, StatMSG);
        SendClientMessage(playerid, COLOR_FLBLUE, "[Stats] Job: Cop");
        }else if (Job[playerid] == 1) {
        SendClientMessage(playerid, COLOR_FLBLUE, StatMSG);
        SendClientMessage(playerid, COLOR_FLBLUE, "[Stats] Job: Criminal");
        }else if (Job[playerid] == 255) {
        SendClientMessage(playerid, COLOR_FLBLUE, StatMSG);
        SendClientMessage(playerid, COLOR_FLBLUE, "[Stats] Job: None");
        }
        return 1;
    }
Reply


Messages In This Thread
[Help] /stats CMD fix - by Thrarod - 13.06.2010, 09:48
Re: [Help] /stats CMD fix - by Dark_Kostas - 13.06.2010, 09:52
Re: [Help] /stats CMD fix - by Thrarod - 13.06.2010, 09:54
Re: [Help] /stats CMD fix - by DJDhan - 13.06.2010, 09:55
Re: [Help] /stats CMD fix - by Dark_Kostas - 13.06.2010, 09:57
Re: [Help] /stats CMD fix - by TheInnocentOne - 13.06.2010, 09:57
Re: [Help] /stats CMD fix - by DJDhan - 13.06.2010, 10:30
Re: [Help] /stats CMD fix - by TheInnocentOne - 13.06.2010, 10:35
Re: [Help] /stats CMD fix - by Thrarod - 13.06.2010, 11:45
Re: [Help] /stats CMD fix - by Dark_Kostas - 13.06.2010, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)