Jump to content
  • 0

Problema Grava ( Urgent )


manutzzu

Question

Am o problema cu gamemode-ul meu de SA:MP ... iti creezi un account iti pui o parola anume gen :

xxx

si dupa daca iesi si vrei sa intri iara pe server si scri orice alt parola te lasa sa te loghezi.. daca ma puteti ajuta sa fac sa te poti loga doar cu parola care o scri la inceput la register.

Stima.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Pai mai intai pune asta la define:

[pawn]#define DIALOG_LOGIN 2

#define COLOR_RED 0xFF0000FF[/pawn]

                                     

Pune acest dialog la OnPlayerConnect dar sunt sigur ca il ai deja:

[pawn]ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Va rugam sa introduceti parola:", "Login", "Cancel");[/pawn]

Si acum adauga asta la OnDialogResponse:

[pawn]

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

{

    if(dialogid == DIALOG_LOGIN)

    {

        if(!response)

        {

            SendClientMessage(playerid, COLOR_RED, "You MUST login to play here. Please change your name.");

            Kick(playerid);

        }

        else

        {

            if(CheckPassword(playerid, inputtext))

            {

                SendClientMessage(playerid, COLOR_RED, "You are now logged in!");

            }

            else

            {

                SendClientMessage(playerid, COLOR_RED, "LOGIN FAILED.");

             

                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Va rugam sa introduceti parola:", "Login", "Cancel");

            }

        }

        return 1;

    }

    return 0;

}][/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.