Jump to content
  • 0

Buton "Spawn" URGENT!


Question

Posted

Problema intalnita (descriere):Cum sa fac dupa ce te loghezi sa nu-ti mai apara butonul "Spawn".
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul:Daca e nevoie de ceva va dau dar nu cred ca e nevoie...
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Multumesc.

:D Respecta si vei fi respectat!

7 answers to this question

Recommended Posts

  • 0
Posted (edited)

public OnPlayerConnect(playerid)

{

    SetPlayerPos(playerid,1742.7975,-1863.2185,13.5753);

    SpawnPlayer(playerid);

    if(fexist(UserPath(playerid)))

    {

        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bine ai venitnIntrodu parola pentru a te loga","Login","Quit");

    }

    else

    {

ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Register","Introdu o parola mai jos  pentru a te inregistra","Register","Quit");

}

    return 1;

}

 

 

 

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

{

new vehicleid = GetPlayerVehicleID(playerid);

    switch( dialogid )

    {

        case DIALOG_REGISTER:

        {

            if (!response) return Kick(playerid);

            if(response)

            {

                if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Register","{FF6347}Parola Incorectan{FFFFFFF}Introdu  parola corecta","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_Close(File);

 

                SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);

                SpawnPlayer(playerid);

             

            }

        }

        case DIALOG_LOGIN:

        {

            if ( !response ) return Kick ( playerid );

            if( response )

            {

                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])

                {

                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);

                }

                else

                {

                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login","Parola incorecta.nIntrodu parola corecta.","Login","Quit");

                }

                return 1;

            }

        }

}

..........

}

Edited by Richardo.

:D Respecta si vei fi respectat!

  • 0
Posted

La OnPlayerRequestClass pune:

TogglePlayerSpectating(playerid,1);

La OnPlayerSpawn pune:

TogglePlayerSpectating(playerid,0);

 

 

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.