help with stats
#1

pawn Код:
CMD:stats(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new
            string[ 128 ],
            Age = PlayerInfo[ playerid ][ pAge ],
            Stress = PlayerInfo[ playerid ][ pStressweed ],
            Money = GetPlayerCash( playerid )
           
        ;

        new Sex[20];
        if(PlayerInfo[ playerid ][ pSex ] == 1) { Sex = "Male"; }
        else if(PlayerInfo[ playerid ][ pSex ] == 2) { Sex = "Female"; }
       
        new Job[20];
        if(PlayerInfo[ playerid ][ pJob ] == 0) { Job = "None"; }
        else if(PlayerInfo[ playerid ][ pJob ] == 1) { Job = "Drugdealer"; }

        SendClientMessage(playerid, COLOR_LIGHTBLUE, "------------------------------------------------------------------------");
        format(string, sizeof(string), "Name: %s | Money: %d | Age: %d | Sex: %s | Stress: %d | Job: %d", RPName(playerid), Money, Age, Sex, Stress, Job);
        SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    return 1;
}
if my job is 0 it says "78" instead of "none" and if its 1 it says "68" instead of Drugdealer
Reply


Messages In This Thread
help with stats - by Michael_Cuellar - 27.04.2013, 10:06
Re: help with stats - by DanLore - 27.04.2013, 10:12
Re: help with stats - by Renas - 27.04.2013, 10:15
Re: help with stats - by Michael_Cuellar - 27.04.2013, 10:20

Forum Jump:


Users browsing this thread: 1 Guest(s)