25.12.2010, 20:20
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:
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.
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;
}
}