Problems with spawning
#1

Hey guys, im having some difficulties with my spawning. Ofcourse, im trying to bypass << >> spawn, and i think i pretty much did that, im just running into problems where i spawn and stuff.

My code:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerCameraPos(playerid, -2658.7156,633.3684,14.4531);
    SetPlayerCameraLookAt(playerid, -2658.7156,633.3684,14.4531);
    SetPlayerPos(playerid, -2658.7156,633.3684,14.4531);
    SetSpawnInfo(playerid, PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][X1], PlayerInfo[playerid][Y1], PlayerInfo[playerid][Z1], 1.0, -1, -1, -1, -1, -1, -1);
    SpawnPlayer(playerid);
    return 1;
}
pawn Код:
if(response)
          {
                PlayerInfo[playerid][pFaction] = 0;
                PlayerInfo[playerid][pGender] = 1;
                SendClientMessage(playerid, COLOR_RED, "Ok. So your character is MALE");
                SpawnPlayer(playerid);
                SetPlayerPos(playerid, -2658.7156,633.3684,14.4531);
                SetPlayerSkin(playerid, 29);
                PlayerInfo[playerid][Logged] = 1;

          }
          else
          {
                PlayerInfo[playerid][pFaction] = 0;
                SetPlayerSkin(playerid, 29);
                PlayerInfo[playerid][pGender] = 2;
                SendClientMessage(playerid, COLOR_RED, "Ok. So your character is FEMALE");
                SpawnPlayer(playerid);
                SetPlayerPos(playerid, -2658.7156,633.3684,14.4531);
                SetPlayerSkin(playerid, 12);
                PlayerInfo[playerid][Logged] = 1;
          }
    }
Thats what sending the spawn or whatever. The problem is, it doesnt set my pos, and im like falling from the sky, when i register, heading into the dialog for gender. When the dialog shows up i start falling from the sky, how could i fix this? Thanks in advance.
Reply


Messages In This Thread
Problems with spawning - by Anthonyx3' - 25.12.2010, 20:20
Re: Problems with spawning - by Mean - 25.12.2010, 20:59
Re: Problems with spawning - by Anthonyx3' - 25.12.2010, 21:25
Re: Problems with spawning - by Mean - 25.12.2010, 22:03
Re: Problems with spawning - by Anthonyx3' - 25.12.2010, 22:38
Re: Problems with spawning - by Mean - 26.12.2010, 17:23
Re: Problems with spawning - by Anthonyx3' - 26.12.2010, 21:29
Re: Problems with spawning - by Mean - 27.12.2010, 09:32

Forum Jump:


Users browsing this thread: 3 Guest(s)