Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Teodor poslato Februar 20, 2020, 18:57:10 POSLE PODNE

Naslov: Ne cuva sifru
Poruka od: Teodor poslato Februar 20, 2020, 18:57:10 POSLE PODNE
Problem(error/warning): Nece da mi se sacuva igraceva Sifra
Dio skripte:
[pawn]
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
[/pawn]
[pawn]
forward SavePlayer(playerid);
public SavePlayer(playerid)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Password",PlayerInfo[playerid][pPass]);
[/pawn]
[pawn]
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):

//

Slika/video ingame problema(obavezno ako je ingame problem): //
Naslov: Odg: Ne cuva sifru
Poruka od: V01D poslato Februar 20, 2020, 19:08:16 POSLE PODNE
Daj register
Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 20, 2020, 20:41:34 POSLE PODNE
Citat: V01D poslato Februar 20, 2020, 19:08:16 POSLE PODNE
Daj register
[pawn]
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);
         }
        }

[/pawn]
Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 20, 2020, 20:58:40 POSLE PODNE
??
Naslov: Odg: Ne cuva sifru
Poruka od: 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.
[pawn]
                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);
[/pawn]
Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 20, 2020, 21:12:29 POSLE PODNE
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.
[pawn]
                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);
[/pawn]
Opet isto
Naslov: Odg: Ne cuva sifru
Poruka od: 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..

Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 20, 2020, 23:42:58 POSLE PODNE
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
Naslov: Odg: Ne cuva sifru
Poruka od: V01D poslato Februar 20, 2020, 23:49:17 POSLE PODNE
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.
Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 20, 2020, 23:51:39 POSLE PODNE
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.....)
Naslov: Odg: Ne cuva sifru
Poruka od: V01D poslato Februar 20, 2020, 23:53:25 POSLE PODNE
Samo ga upload negde drugde..
Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 20, 2020, 23:56:26 POSLE PODNE
Citat: V01D poslato Februar 20, 2020, 23:53:25 POSLE PODNE
Samo ga upload negde drugde..
Reci neki sajt
Probaj sad
https://vimeo.com/user108836109/review/392829690/566038bf02
Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 20, 2020, 23:58:08 POSLE PODNE
https://vimeo.com/392829690
Naslov: Odg: Ne cuva sifru
Poruka od: V01D poslato Februar 21, 2020, 00:00:28 PRE PODNE
Daj nam udb_hash
Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 21, 2020, 00:01:39 PRE PODNE
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;
}
Naslov: Odg: Ne cuva sifru
Poruka od: Ƭ H Σ Ʋ 1 ∏ ∏ Ψ _ poslato Februar 21, 2020, 18:58:13 POSLE PODNE
Druze , reci mi molim te koju drogu koristis da se i ja pucam malo :D
@Galardo
Naslov: Odg: Ne cuva sifru
Poruka od: YumikoJR poslato Februar 21, 2020, 19:16:14 POSLE PODNE
u SavePlayer funkciji ti ne treba INI_WriteInt(File, "Password", ...); obrisi to
Naslov: Odg: Ne cuva sifru
Poruka od: Teodor poslato Februar 21, 2020, 19:21:46 POSLE PODNE
Fixano sredio mi
@V01D
Naslov: Odg: Ne cuva sifru
Poruka od: Galardo poslato Februar 21, 2020, 20:09:43 POSLE PODNE
@Teodor prestani da spamujes,procitaj pravila malo,nece skodit.
Sljedeci put kad budes se tako ponasao samo cu lock temu.