Saving problems
#1

delete
Reply
#2

maybe u need to put <> in those include..
Reply
#3

still problems
Reply
#4

Please help, i fixed admin but money and score wont save
Reply
#5

pawn Код:
dini_IntSet(file, "Score", GetPlayerScore(playerid));
Reply
#6

it wont still save
Reply
#7

Oh myy... please help for money and score!
Reply
#8

can someone please help, i had this for 3days
Reply
#9

pawn Код:
if(gPlayerLogged[playerid] == 1)
        {
        dini_IntSet(file, "Adminlevel", PlayerData[playerid][AdminLevel]);
        dini_IntSet(file, "Score", PlayerData[playerid][Score]);
        dini_IntSet(file, "Money", PlayerData[playerid][Cash]);
        }
Problem should be there. Just put on OnPlayerConnect:

pawn Код:
gPlayerLogged[playerid] = 1;
Reply
#10

my connect and disconnect pwnt is this
pawn Код:
public OnPlayerConnect(playerid)
{
    TogglePlayerClock(playerid, 1);
    TextDrawShowForPlayer(playerid,url);
    new string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s has joined the server", pname);
    SendClientMessageToAll(0xFF0000FF, string);
    GetPlayerName(playerid, Name, sizeof(Name));
    //register
    new file[256];
    gPlayerLogged[playerid] = 0;
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file),"dmserver/%s.ini", name);
    if (!dini_Exists(file))
    {
    ShowPlayerDialog(playerid, 100, DIALOG_STYLE_INPUT, "Register!", "Welcome to San Andreas Gang War!!, register by entering your password here", "Register", "Leave");
    }
    if(fexist(file))
    {
    ShowPlayerDialog(playerid, 101, DIALOG_STYLE_INPUT, "Login!", "Login server by entering your password here", "Login", "Leave");
    }
    gPlayerLogged[playerid] = 1;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
        new string[39 + MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        switch(reason)
        {
        case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pname);
        case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pname);
        case 2: format(string, sizeof(string), "%s has left the server. (Kicked!)", pname);
        }
        SendClientMessageToAll(0xFF0000FF, string);

        //register
        new file[256];
        new name[MAX_PLAYERS];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file),"dmserver/%s.ini", name);
        gPlayerLogged[playerid] = 0;
        if(gPlayerLogged[playerid] == 1)
        {
        dini_IntSet(file, "Adminlevel", PlayerData[playerid][AdminLevel]);
        dini_IntSet(file, "Score", PlayerData[playerid][Score]);
        dini_IntSet(file, "Money", PlayerData[playerid][Cash]);
        }

        return 1;
}
well the cash and score only never saves
my scriptfile always show this
Код:
Money=0
Score=0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)