Saving player's account per x secs.
#7

Quote:
Originally Posted by stabker
View Post
You can save stats just after inputting command /stats, and then show it for player. But i dont think that showing stats from the file its good idea. Why you should use data from files to show it for player? Work with variables. (Sorry for my bad English, i'm Ukrainian)
Yeah but i dont have damn idea how to do it. My stats command:
pawn Code:
CMD:stats(playerid, params[])
{
    new Float:gihp, Float:giar;
    GetPlayerHealth(playerid, gihp);
    GetPlayerArmour(playerid, giar);
    GetPlayerWantedLevel(playerid);
    new temp[1000];
    new info[1000];

    format(temp, sizeof(temp), "Cash: %i$\n",PlayerInfo[playerid][pCash]);
    strcat(info, temp);

    format(temp, sizeof(temp), "Skin ID: %d\n",PlayerInfo[playerid][pSkin]);
    strcat(info, temp);

    format(temp, sizeof(temp), "Admin Level: %d\n",PlayerInfo[playerid][pAdmin]);
    strcat(info, temp);

    format(temp, sizeof(temp), "Kills: %i\n",PlayerInfo[playerid][pKills]);
    strcat(info, temp);

    format(temp, sizeof(temp), "Deaths: %i\n",PlayerInfo[playerid][pDeaths]);
    strcat(info, temp);

    format(temp, sizeof(temp), "Health: %0.1f\n",PlayerInfo[playerid][pHealth]);
    strcat(info, temp);

    format(temp, sizeof(temp), "Armour: %0.1f\n",PlayerInfo[playerid][pArmour]);
    strcat(info, temp);

    format(temp, sizeof(temp), "Level: %d)\n",PlayerInfo[playerid][pLevel]);
    strcat(info, temp);

    format(temp, sizeof(temp), "Score: %i\n",GetPlayerScore(playerid));
    strcat(info, temp);

    ShowPlayerDialog(playerid, 14, DIALOG_STYLE_MSGBOX,"{53C506}Your Stats",info,"Close","");
    return true;
}
Reply


Messages In This Thread
Saving player's account per x secs. - by lQs - 27.04.2013, 20:52
Re: Saving player's account per x secs. - by Tom1412 - 27.04.2013, 20:54
Re: Saving player's account per x secs. - by RVRP - 27.04.2013, 20:55
Re: Saving player's account per x secs. - by Vince - 27.04.2013, 21:07
Re: Saving player's account per x secs. - by lQs - 27.04.2013, 21:10
Re: Saving player's account per x secs. - by stabker - 27.04.2013, 21:19
Re: Saving player's account per x secs. - by lQs - 27.04.2013, 21:23
Re: Saving player's account per x secs. - by stabker - 27.04.2013, 21:30
Re: Saving player's account per x secs. - by lQs - 27.04.2013, 21:33
Re: Saving player's account per x secs. - by Scenario - 28.04.2013, 05:41

Forum Jump:


Users browsing this thread: 2 Guest(s)