Automatic save!!
#1

I dont know how to make a script that automaticly saves your : score, money, skin and color??
Please Help!!
Reply
#2

First, use the search button and read the rules, second, welcome.

Search in your GameMode something similar to this:
pawn Код:
accountstimer = SetTimer("SaveAccounts", 900000, 1); //15 mins every account saved
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:
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;
    }
Good Luck, and USE THE SEARCH BUTTON BEFORE POST.
Reply
#3

Can u just tell me one...
I made this

Код:
public OnPlayerConnect(playerid)
{new string[128];
 format(string, sizeof(string), "STATS : Score : %d , Money : %d , Color : %d , Skin : %d , AdminLevel : %d", GetPlayerScore(playerid), GetPlayerMoney(playerid) , GetPlayerColor(playerid) , GetPlayerSkin(playerid) , IsPlayerAdmin(playerid));
I done this and it works fine. But how can i make that this shows after i log in
Reply
#4

pawn Код:
public OnPlayerConnect(playerid)
{
new string[128];
 format(string, sizeof(string), "STATS : Score : %d , Money : %d , Color : %d , Skin : %d , AdminLevel : %d", GetPlayerScore(playerid), GetPlayerMoney(playerid) , GetPlayerColor(playerid) , GetPlayerSkin(playerid) , IsPlayerAdmin(playerid));
SendClientMessage(playerid, COLOR_WHITE,string);
Easy.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)