Jump to content
  • 0

Problema script login/register


Fabyx15

Question

Nick:Fabbyx15

Problema:am copiat un script de pe net cu login/register si dupa ce l-am terminat imi deschid sv si intru in el imi apare caseta sa ma inregistrez si apoi dai register si pe urma serverul se inchide !!! de ce ?? nu stiu deloc ce are !nu pot sa mai dau spawn la un player..

Erori / warnings:-

Lini/script:ASTA E TOT CE AM ADAUGAT

[pawn]#include <a_samp>

#define Blue 0x06CDFFFF

public OnFilterScriptInit()

{

    print("\n--------------------------------------");

    print("Login And Register Script Basic v1.0 by §ñ†¶e®ÐµÐe");

    print("--------------------------------------\n");

    return 1;

}

new pname[20], filename[24];

new File:user;

public OnPlayerConnect(playerid)

{

    GetPlayerName(playerid, pname, 20);

    format(filename, 24, "users/%s.txt", pname);

    if(!fexist(filename))

    {

        ShowPlayerDialog(playerid, 1, 1, "Register", "Please type in a password:", "Register", "Cancel");

    }

    return 1;

}

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

{

   

    if(dialogid == 1)

    {

        if(response == 0)

        {

            SendClientMessage(playerid, Blue, "You have been disconnected!");

            Kick(playerid);

            return 1;

        }

        user = fopen(filename, io_write);

        fwrite(user, inputtext);

        fclose(user);

        SendClientMessage(playerid, Blue, "Your Message");

       

    }

    return 1;

}[/pawn]

Ai incercat sa rezolvi singur ?:daaa

Cea mai mare realizare:

public OnPlayerConnect(playerid)
{
	Kick(playerid);
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

mi se inchide serverul de acolo..din cmd acolo samp-server...cand intru..apaare sa ma loghez si dupa cand sa spawnez un player nu merge..si cand il pun pe bara..serverul nu mai e deschis.

Cea mai mare realizare:

public OnPlayerConnect(playerid)
{
	Kick(playerid);
}

 

Link to comment
Share on other sites

      if(response == 0)

        {

            SendClientMessage(playerid, Blue, "You have been disconnected!");

            Kick(playerid);

            return 1;

        }

Asta iti da kick. "if(response == 0)" = Register in cazul tau.

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.