Savestats command - 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: Savestats command (
/showthread.php?tid=512967)
Savestats command -
salev13 - 13.05.2014
Hello i got the gamemode Call Of Duty World at War and thats told me dont forgot /savestats
but there is no command i check in pawn and everything
someone can please make me this command for this gamemode please?
Re: Savestats command -
salev13 - 13.05.2014
Please help anyone?
Re: Savestats command -
d3ll - 13.05.2014
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.
Re: Savestats command -
salev13 - 13.05.2014
Quote:
Originally Posted by d3ll
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.
|
Where to put it
Which public?