[Scripting Problem] Player Spawn Problem!
#1

Hello! It's me again, and I have a problem with player spawning after register!

Here's me OnDialogResponse:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\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,"SkinID",29);
                INI_Close(File);
                TogglePlayerSpectating(playerid, false);
                SetSpawnInfo(playerid, 0, 299, 1740.6188, -1949.9669, 14.1172, 176.0951, 0, 0, 0, 0, 0, 0);
                SetTimerEx("LevelTimer", 1800000, true, "i", playerid);

                SpawnPlayer(playerid);
                ShowModelSelectionMenu(playerid, skinlist, "Izvelies Skinu");
                TogglePlayerSpectating(playerid, false);
            }
        }

        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]);
                    TogglePlayerSpectating(playerid, false);
                    SetSpawnInfo(playerid, 0, 299, 1740.6188, -1949.9669, 14.1172, 176.0951, 0, 0, 0, 0, 0, 0);
                    SetTimerEx("LevelTimer", 1800000, true, "i", playerid);

                    SpawnPlayer(playerid);
                }
                else
                {
                    TogglePlayerSpectating(playerid, true);
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
    }
    return 1;
}
The problem is with registration! When I Choose Skin, the player is like specating, camera is at one point, but player can't move! When I Re-Log everythin is fine! Please Help me! I did attach ScreenShot of how it looks like when I spawn after selecting skin!
Reply
#2

Sorry for +Post!

So No one will help me?
Reply
#3

show
Quote:

SetSpawnInfo(playerid, 0, 299, 1740.6188, -1949.9669, 14.1172, 176.0951, 0, 0, 0, 0, 0, 0);

function....
Reply
#4

Quote:
Originally Posted by danish007
Посмотреть сообщение
show


function....
How do you mean show that function?
Reply
#5

So public SetSpawnInfo
Reply
#6

It doesn't have "public SetSpawnInfo"!
Reply
#7

Код:
ShowModelSelectionMenu(playerid, skinlist, "Izvelies Skinu");
Can we get respond on this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)