09.07.2012, 10:44
Already have one:
pawn Код:
public OnPlayerSpawn(playerid)
{
SetCameraBehindPlayer(playerid);
if(PlayerInfo[playerid][pGender] == 0)
{
new sexselect[] = "1\tMale \n2\tFemale";
ShowPlayerDialog(playerid, GENDER, DIALOG_STYLE_LIST, "(In Character) - What is your Gender?", sexselect, "Select", "Leave Game");
SetPlayerPos(playerid, 1685.620117,-2331.537353,-2.679687);
gPlayerRegStep[playerid] = 1;
new randphone = 100000 + random(899999);
PlayerInfo[playerid][pNumber] = randphone;
return 1;
}
if(PlayerInfo[playerid][pX] != 0)
{
SetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pWorld]);
SendClientMessage(playerid, COLOR_YELLOW2, "You've spawn to your last position!");
SendClientMessage(playerid, COLOR_LIGHTRED, "Weclome back to your current life!");
}
else
{
SetPlayerPos(playerid, 1722.8942,-1869.8459,13.5646);
SetPlayerFacingAngle(playerid, 358.3712);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
}
return 1;
}