Ne cuva sifru


Započeo Teodor, Februar 20, 2020, 18:57:10 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Nece da mi se sacuva igraceva Sifra
Dio skripte:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);

forward SavePlayer(playerid);
public SavePlayer(playerid)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Password",PlayerInfo[playerid][pPass]);

public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
//

Slika/video ingame problema(obavezno ako je ingame problem): //
Poslednja Izmena: Februar 21, 2020, 20:10:09 POSLE PODNE od Galardo


Citat: V01D poslato Februar 20, 2020, 19:08:16 POSLE PODNE
Daj register
case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registracija",""COL_RED"Ukucajte vasu sifru kako bi registrovali vas account.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_WriteInt(File,"Name",0);
                INI_WriteInt(File,"Banned",0);
                INI_WriteInt(File,"Score",0);
    			INI_WriteInt(File,"Skin",0);
    			INI_WriteInt(File,"RconDozvola",0);
                INI_Close(File);

                SetSpawnInfo(playerid, 0, 0, 1332.3175,-984.9104,33.8966,269.8959,0,0,0,0,0,0);
                SpawnPlayer(playerid);
			}
        }


Obrisi sve ovo iz tog dijaloga i umesto toga stavi SavePlayer(playerid) jer ne mozes bez funkcije za to otvarati file handle za ini barem ne ovako.
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_WriteInt(File,"Name",0);
                INI_WriteInt(File,"Banned",0);
                INI_WriteInt(File,"Score",0);
    INI_WriteInt(File,"Skin",0);
    INI_WriteInt(File,"RconDozvola",0);
                INI_Close(File);
[Include] > Optidraw
[Include] > Model-Sizes-SQL

Citat: algorhitmically poslato Februar 20, 2020, 21:00:09 POSLE PODNE
Obrisi sve ovo iz tog dijaloga i umesto toga stavi SavePlayer(playerid) jer ne mozes bez funkcije za to otvarati file handle za ini barem ne ovako.
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_WriteInt(File,"Name",0);
                INI_WriteInt(File,"Banned",0);
                INI_WriteInt(File,"Score",0);
    INI_WriteInt(File,"Skin",0);
    INI_WriteInt(File,"RconDozvola",0);
                INI_Close(File);

Opet isto

Hmmm, po ovome bi trebalo da sacuva lepo, sta imas u scriptfiles ?? Daj nam kada se igrac registruje i nakon sto se diskonektuje..


Citat: V01D poslato Februar 20, 2020, 22:44:47 POSLE PODNE
Hmmm, po ovome bi trebalo da sacuva lepo, sta imas u scriptfiles ?? Daj nam kada se igrac registruje i nakon sto se diskonektuje..
https://vimeo.com/user108836109/review/392827024/ca2b110f55

Citat: Teodor poslato Februar 20, 2020, 23:42:58 POSLE PODNE
https://vimeo.com/user108836109/review/392827024/ca2b110f55


Sorry, we couldn't find that page
Make sure you've typed the URL correctly, or try searching Vimeo. You could also watch one of the videos below instead.

Citat: V01D poslato Februar 20, 2020, 23:49:17 POSLE PODNE
Sorry, we couldn't find that page
Make sure you've typed the URL correctly, or try searching Vimeo. You could also watch one of the videos below instead.
wtf, meni radi probaj da ga otvoris preko neke druge stranice(Chrome,Opeta,Edge.....)





Citat: V01D poslato Februar 21, 2020, 00:00:28 PRE PODNE
Daj nam udb_hash
stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 0;
    new s2 = 1;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}