Don't spawn at home
#1

Hey, I use intelexe's RP and I bought a house, but when I relog I don't spawn at it, I spawn always at the ls airport.
How do I fix it?
pawn Код:
public SetPlayerSpawn(playerid)
{
    new rand;
    new house = PlayerInfo[playerid][pPhousekey];
    SetOriginalColor(playerid);
    SetCameraBehindPlayer(playerid);
    KillTimer(incam);
    KillTimer(incam2);
    SetPlayerSkin(playerid,PlayerInfo[playerid][pCharacter]);
    ResetPlayerWeapons(playerid);
    SetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
    SetPlayerArmour(playerid,PlayerInfo[playerid][pArmor]);
    SetPlayerWeapons(playerid);
    SetPlayerMoney(playerid, PlayerInfo[playerid][pCash]);
    TextDrawShowForPlayer(playerid,Textdraw40[playerid]);
   
    if(Died[playerid] == 1)
    {
        SetPlayerInterior(playerid,dint[playerid]);
        SetPlayerVirtualWorld(playerid,dworld[playerid]);
        SetPlayerPos(playerid,dx[playerid],dy[playerid],dz[playerid]);
        TogglePlayerControllable(playerid,0);
        SetPlayerHealth(playerid, 1);
        SetTimerEx("ApplyThatAnim",3000,false,"i",playerid);
        GameTextForPlayer(playerid,"You've been killed",5000,5);
        SendClientMessage(playerid,COLOR_WHITE,"To accept your death type /accept death");
        dx[playerid] = 0;
        dy[playerid] = 0;
        dz[playerid] = 0;
        dint[playerid] = 0;
        dworld[playerid] = 0;
        return 1;
    }
   
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pJailed] == 1)
        {
            if(PlayerInfo[playerid][pPrisonNr] == 1)
            {
                SetPlayerInterior(playerid, 6);
                SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
                SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
                TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
            }
            else if(PlayerInfo[playerid][pPrisonNr] == 2)
            {
                SetPlayerInterior(playerid, 5);
                SetPlayerPos(playerid,319.2314,311.6756,999.1484);
                SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
                TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
            }
            return 1;
        }
        if(PlayerInfo[playerid][pWatch] == 1)
        {
            TextDrawShowForPlayer(playerid, Textdraw56);
            TextDrawShowForPlayer(playerid, Textdraw57);
            TextDrawShowForPlayer(playerid, Textdraw58);
        }
        if(house != 9999)
        {
            if(PlayerInfo[playerid][pSpawn] == 1)
            {
                SetOriginalColor(playerid);
                SetPlayerInterior(playerid,HouseInfo[house][hInt]);
                SetPlayerVirtualWorld(playerid,HouseInfo[house][hWorld]);
                SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]);
                PlayerInfo[playerid][pLocal] = house;
                HouseEntered[playerid] = house;
                return 1;
            }
            else if(PlayerInfo[playerid][pSpawn] == 0)
            {
                SetOriginalColor(playerid);
                SetPlayerPos(playerid,1685.620117,-2331.537353,-2.679687);
                SetPlayerVirtualWorld(playerid, JoinWorld[playerid]);
                SetPlayerInterior(playerid, SpawnInterior[playerid]);
                TogglePlayerControllable(playerid, 1);
                return 1;
Thanks.
Reply


Messages In This Thread
Don't spawn at home - by MTCool - 22.02.2012, 20:04
Re: Don't spawn at home - by MTCool - 22.02.2012, 23:03
Re: Don't spawn at home - by Madd Kat - 22.02.2012, 23:08
Re: Don't spawn at home - by ReneG - 22.02.2012, 23:11
Re: Don't spawn at home - by MTCool - 22.02.2012, 23:15

Forum Jump:


Users browsing this thread: 2 Guest(s)