Player can't spawn -,-
#1

I can't spawn when I type my passowrd in dialog...

Codes:
pawn Код:
case DIALOG_LOGIN1:
{
      if(!response)
      {
            Kick(playerid);
      }
      else
      {
            new pwlength = strlen(inputtext);
            if(pwlength > 0)
            {
                new pw[200];
                format(pw, sizeof(pw), "%s", dini_Get(path, "password"));
                if(strcmp(inputtext, pw) == 0)
                {
                    pInfo[playerid][sex] = dini_Int(path, "sex");
                    pInfo[playerid][age] = dini_Int(path, "age");
                    pInfo[playerid][logged] = 1;
                    SpawnPlayer(playerid);
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_WRONGPW, DIALOG_STYLE_MSGBOX, "Login", "Wrong passoword!", "Return", "");
                }
            }
            else
            {
                ShowPlayerDialog(playerid, DIALOG_NOPW2, DIALOG_STYLE_MSGBOX,  "Login", "You must type in your passoword!", "Return", "");
            }
      }
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, 2092.7478,1454.8173,35.4844);
    return 1;
}
Reply
#2

Where do you show this dialog? If in OnPlayerConnect, I believe you have to use SetSpawnInfo first (fixed in 0.3e or not?)
Reply
#3

What you mean "i cant spawn"..?You get kicked or what?If so:

pawn Код:
SpawnPlayer(playerid);
I heard this function is bugged.It kicks the player when using it.
Reply
#4

Logitech, SpawnPlayer is fixed in 0.3e
Reply
#5

Quote:
Originally Posted by Romel
Посмотреть сообщение
Logitech, SpawnPlayer is fixed in 0.3e
Ah,sorry then.
Reply
#6

It still isn't common practice to damn straight spawn the player in OnPlayerConnect, set a delaying timer of at least 100 MS.
Reply
#7

I didn't put in script code to spawn player on connect, he needs to login first. But when I login nothing happens
Reply
#8

you have to set a timer after login using SetTimerEx like VincentDunn said.

ex.

pawn Код:
SetTimerEx("OnPlayerSpawnEx", 2000, false, "d", playerid); //will create a timer in 2000 milesec (2 secs) with params playerid (integer - d/i)

forward OnPlayerSpawnEx(playerid);
public OnPlayerSpawnEx(playerid)
{
    SpawnPlayer(playerid);
    return 1;
}
didn't test yet but maybe it work
Reply
#9

not working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)