SA-MP Forums Archive
Saving stats? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Saving stats? (/showthread.php?tid=299983)



Saving stats? - Mr_Scripter - 28.11.2011

Hello, I know how to make /stats command but don't know how to save them using Zcmd+sscanf
Here's my /Stats command
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    CMD:stats(playerid,params[])
    {
        if(IsPlayerConnected(playerid))
        {
            new statstring[128];
            SendClientMessage(playerid, COLOR_GREEN, "*** Your Stats ***");
            format(statstring, sizeof(statstring), "Kills: %d",PlayerInfo[playerid][pKills]);
            SendClientMessage(playerid, COLOR_GREEN, statstring);
            format(statstring, sizeof(statstring), "Deaths: %d",PlayerInfo[playerid][pDeaths]);
            SendClientMessage(playerid, COLOR_GREEN, statstring);
            format(statstring, sizeof(statstring), "Money: $%d",GetPlayerMoney(playerid));
            SendClientMessage(playerid, COLOR_GREEN, statstring);
        }
        return 1;
    }
    return 0;
}
just example


Re: Saving stats? - System64 - 28.11.2011

you want to save stats with command?
WTF? Man


Re: Saving stats? - Mr_Scripter - 28.11.2011

Edit: Nvm