Stats help
#1

'Style' is the player's fight style and I want it to show up in the stats like, "Fight style: Boxing"
The number saved for the boxing fight style is '5'.

pawn Код:
enum PlayerInfo
{
    Style,
    Cigar,
    Cash
}
pawn Код:
CMD:stats(playerid, params[])
{
    new str[128];
    format(str,sizeof(str),"Cash: %i - Cigars: %i",pInfo[playerid][Cash],pInfo[playerid][Cigar]);
    ShowPlayerDialog(playerid,13,0,"Stats",str,"Close","");
    return 1;
}
Reply
#2

pawn Код:
CMD:stats(playerid, params[])
{
    new str[128],fightstyle[40];
    switch(pInfo[playerid][Style])
    {
        case 4: format(fightstyle, sizeof(fightstyle), "Normal");
        case 5: format(fightstyle, sizeof(fightstyle), "Boxing");
        case 6: format(fightstyle, sizeof(fightstyle), "Kungfu");
        case 7: format(fightstyle, sizeof(fightstyle), "Kneehead");
        case 15: format(fightstyle, sizeof(fightstyle), "Grabkick");
        case 16: format(fightstyle, sizeof(fightstyle), "Elbow");
    }
    format(str,sizeof(str),"Cash: %i - Cigars: %i - Fightstyle: %s",pInfo[playerid][Cash],pInfo[playerid][Cigar],fightstyle);
    ShowPlayerDialog(playerid,13,0,"Stats",str,"Close","");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)