Jump to content
  • 0

Problema parola


Mister

Question

Problema intalnita (descriere): Am probleme cu parola, se salveaza merge bine nu este nimic dar de exemplu am parola "parolamea123" si merge mereu problema este ca in "numelemeu.ini" parola nu o afiseaza asa ci sub forma de cifre, de ce? pentru ca nu pot sa o schimb nu stiu cum este codata, ce pot sa ii fac?
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul: Nu stiu ce sa postez, spuneti- mi ce sa postez
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Salut. Din ce imi dau eu seama parolele tale sunt criptate si cel mai bine ar fi sa iti faci o comanda decat sa umblii prin fisiere dar pentru asta trebuie sa aflii cum sunt criptate... sha1, hash, Whirlpool sau altele. Criptarea e ok sa o lasi mai mult pentru siguranta userilor, poate aceleasi parole care le au la conturile de pe server le au si in alte parti si na, informatiile lor devin vulnerabile. Sper ca ti-am dat un raspuns care sa te multumeasca.

Link to comment
Share on other sites

  • 0

Am inteles.idea e ca uneori se mai buguie contu sau vreau sa schimb parola de acolo, cum o schimb fara sa stiu acest cod?

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Pai si ce sa postez?.Am comanda de schimbare a parolei, dar doar pentru playerid, nu pentru giveplayerid

 

 


if (strcmp(cmd, "/changename", true) == 0) // By CuervO_NegrO
    {
        if(IsPlayerConnected(playerid))
        {
            if(CanChangeName[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "* Confirma comanda in los Santos");
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /changename [NewName]");
                return 1;
            }
            if (!IsPlayerInRangeOfPoint(playerid, 20.0,  821.7485, -0.3381, 1004.1155)) return SendClientMessage(playerid, COLOR_GREY, "*Nu esti in los Santos!");
            format(string, sizeof(string), "LARP/Users/%s.ini", tmp);
            if(!dini_Exists(string))
            {
                SetPlayerName(playerid, tmp);
                CanChangeName[playerid] = 0;
                format(string, sizeof(string),"** Ti-ai schimbat numele in %s pentru suma de 5 Yen", tmp);
                SendClientMessage(playerid, COLOR_SEA, string);
                SendClientMessage(playerid, COLOR_RED, "Vei primi kick in 5 secunde pentru a se actualiza numele");
                new housekey = PlayerInfo[playerid][pPhousekey];
                new bizzkey = PlayerInfo[playerid][pPbiskey];
                SetTimerEx("kicked", 6000, false, "i", playerid);
                new carkey1 = PlayerInfo[playerid][pPcarkey];
                new carkey2 = PlayerInfo[playerid][pPcarkey2];

                format(string, sizeof(string),"%s",tmp);
                if(PlayerInfo[playerid][pPhousekey] != 9999)
                {
                    strmid(HouseInfo[housekey][hOwner],string,0,strlen(string),255);
                    OnPropUpdate(1,housekey);
                    OnPropTextdrawUpdate(1, housekey);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR,"* House ownership changed successfuly!");
                }
                if(PlayerInfo[playerid][pPbiskey] != 9999)
                {
                    strmid(BizzInfo[bizzkey][bOwner],string,0,strlen(string),255);
                    OnPropUpdate(2,bizzkey);
                    OnPropTextdrawUpdate(2, bizzkey);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR,"* Business ownership changed successfuly!");
                }
                if(PlayerInfo[playerid][pPcarkey] != 9999)
                {
                    strmid(CarInfo[carkey1][cOwner],string,0,strlen(string),255);
                    OnPropUpdate(4,carkey1);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR,"* First Vehicle ownership changed successfuly!");
                }
                if(PlayerInfo[playerid][pPcarkey2] != 9999)
                {
                    strmid(CarInfo[carkey2][cOwner],string,0,strlen(string),255);
                    OnPropUpdate(4,carkey2);
                    OnPropTextdrawUpdate(1, housekey);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR,"* Second Vehicle ownership changed successfuly!");
                }
                format(string, sizeof(string), "LARP/Users/%s.ini", sendername);
                fremove(string);
                format(string, sizeof(string), "LARP/Users/%s.ini", tmp);
                dini_Create(string);
                OnPlayerUpdateEx(playerid);
                SetTimerEx("ChangeYourName", 1500, true, "i", playerid);
            }
            else return SendClientMessage(playerid, COLOR_GREY,"* That name is taken already!");
            new y, m, d;
            new h,mi,s;
            getdate(y,m,d);
            gettime(h,mi,s);
            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has changed his name to %s",d,m,y,h,mi,s,sendername,tmp);
            AdminLog(string);
            LoginLog(string);
        }
        return 1;
    }
Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Comanda postata de tine schimba numele jucatorului. Sa presupun ca GM-ul tau e LARP sau o modificare de-a lui.

 

Daca vrei sa schimbi parola pentru altcineva incearca ceva gen

if(strcmp(cmd, "/schimbaparola", true) == 0)
    {
        new tmpp[256];
        tmpp = strtok(cmdtext, idx);
        if(!strlen(tmpp)) return SendClientMessage(playerid, COLOR_DBLUE, "Correct SYNTAX: /schimbaparola [playerid] [new password]");
        giveplayerid = strval(tmpp);
        tmp = strtok(cmdtext, idx);
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    strmid(PlayerInfo[giveplayerid][pKey], tmp, 0, strlen(cmdtext), 255);
                    OnPlayerUpdate(giveplayerid);
                    SendClientMessage(giveplayerid, COLOR_YELLOW, "Un admin ti-a schimbat parola");
                    SendClientMessage(playerid, COLOR_YELLOW, "Ai schimbat parola jucatorului");
                }
                else
                {
                    format(string, sizeof(string), "%d nu e conectat.", giveplayerid);
                    SendClientMessage(playerid, COLOR_RED, string);
                }
            }
            else return SendClientMessage(playerid, COLOR_RED, "Nu ai permisiunea de a folosi aceasta comanda!");
        }
        else return  SendClientMessage(playerid, COLOR_RED, "Trebuie sa fi logat sa folosesti comanda asta");
          return 1;
    }

 

Nu e testata comanda ca nu folosesc GM-ul LARP dar te poti folosi de ea ca si model. Trebuie sa fie si userul conectat ca sa mearga comanda, daca vrei sa faci chestia asta cu userul offline se cam schimba situatia.

Link to comment
Share on other sites

  • 0

Pai asta e problema, ca userul trebuie sa fie conectat.

Daca unui player i sa stricat contul nu merge parola adica, eu ce fac? cum ii schimb parola daca e criptata acolo in user.ini?

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Ceva de genul, nu e testata, daca ai conturi de teste incearca pe ele...nu sunt sigur ca iti va merge din prima cum trebuie dar e un inceput dupa care te poti ghida. Ar fi fost mult mai usor daca era pe mysql

 

if(strcmp(cmd, "/schimbaparola", true) == 0)
{
    if (PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
    {
        new string[64], string3[64], tmpp[256], var[64];
        tmpp = strtok(cmdtext, idx);
        if(!strlen(tmpp)) return SendClientMessage(playerid, COLOR_DBLUE, "USAGE: /schimbaparola [playername] [new password]");
        giveplayerid = strval(tmpp);
        tmp = strtok(cmdtext, idx);
        format(string3, sizeof(string3),"LARP/Users/%s.ini", giveplayerid);
        new File: hFile = fopen(string3, io_write);
        if (hFile)
        {
            strmid(string, tmp, 0, strlen(cmdtext), 255);
            format(var, 64, "%s", string);
            dini_Set(hFile, Key, var);
            SendClientMessage(playerid, COLOR_GRAD2, "Parola a fost schimbata");
        }
        else return SendClientMessage(playerid, COLOR_GRAD2, "Nu exista nici un jucator cu acel nume!");
    }
    else return SendClientMessage(playerid, COLOR_GRAD2, "Nu poti folosi aceasta comanda");
    return 1;
}
Link to comment
Share on other sites

  • 0

Aici

 format(var, 64, "%s", string);

Este o eroare

 

C:UsersMyPcDesktopserverreSampservergamemodeslarp.pwn(70609) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Error.
 

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Ai incercat sa maresti valoarea variabilei var si na poti sa rescrii asa linia aia:

 

format(var, sizeof(var), "%s", string);

 

Eventual schimba-i numele in altceva inafara de var. Nu vad ce alte probleme ar putea fi pentru ca mie nu imi da eroare daca copiez doar acea linie la mine in gamemode.

Link to comment
Share on other sites

  • 0

acum da la linia asta

dini_Set(hFile, Key, var);

aceasi eroare

 

 error 035: argument type mismatch (argument 1)

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Ma ajuta cineva?

 

la aceasta linie

dini_Set(hFile, "Key", var);

error 035: argument type mismatch (argument 1)

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

pai nu stiu ce inseamna hfile in comanda asta, eu doar am intrebat cum sa schimb parola...

ce se vede in comanda asa este si la mine

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.