13.05.2014, 18:27
You can Create a local function.
I will show example below using ZCMD & DINI.
Then to add command:
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.
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]);
}
pawn Код:
COMMAND:savestats(playerid, params)
{
if(Logged[playerid] != 1) return SendClientMessage(playerid, -1, "Not logged in");
SaveStats(playerid);
return 1;
}