Savestats command
#3

You can Create a local function.

I will show example below using ZCMD & DINI.

pawn Код:
stock SaveStats(playerid)
{
    new PlayerFile[150];
    format(PlayerFile, sizeof(PlayerFile), "users/%s.ini", PlayerName(playerid));
    dini_IntSet(PlayerFile, "Money", PlayerInfo[playerid][PMoney]);
}
Then to add command:
pawn Код:
COMMAND:savestats(playerid, params)
{
    if(Logged[playerid] != 1) return SendClientMessage(playerid, -1, "Not logged in");
    SaveStats(playerid);
    return 1;
}
This would be my way of making a SaveStats. Although, you haven't really give enough information - so at the minute for someone here to make it ready to use, would be impossible.
Reply


Messages In This Thread
Savestats command - by salev13 - 13.05.2014, 17:58
Re: Savestats command - by salev13 - 13.05.2014, 18:16
Re: Savestats command - by d3ll - 13.05.2014, 18:27
Re: Savestats command - by salev13 - 13.05.2014, 18:33

Forum Jump:


Users browsing this thread: 3 Guest(s)