24.08.2009, 09:25
First, use the search button and read the rules, second, welcome.
Search in your GameMode something similar to this:
Change for the time do you need.
But if you want save when the player leaves the server, search in your gamemode OnPlayerDisconnect and put: SaveAccounts(); or your accounts variable.
If you want save with a command use this:
Good Luck, and USE THE SEARCH BUTTON BEFORE POST.
Search in your GameMode something similar to this:
pawn Код:
accountstimer = SetTimer("SaveAccounts", 900000, 1); //15 mins every account saved
But if you want save when the player leaves the server, search in your gamemode OnPlayerDisconnect and put: SaveAccounts(); or your accounts variable.
If you want save with a command use this:
pawn Код:
if(strcmp(cmd, "/saveaccounts", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 2) // Change for your required level admin.
{
SaveAccounts(); // Change for your account variable.
SendClientMessage(playerid, COLOR_YELLOW, "The Accounts saved correctly.");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not autorized to use that command!");
}
return 1;
}