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.