Spawn at Home interior Problem
#1

PHP код:
        else if(GetPVarInt(playerid, "Hospital") == 8 && PlayerInfo[playerid][pInsurance] == 7)
        {
            
SetPlayerArmour(playerid, PlayerInfo[playerid][pSarmor]);
            
SetPlayerHealth(playerid, 50.0);
            
DeletePVar(playerid, "MedicBill");
            
GivePlayerCash(playerid, -250);
            
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: Your Medical Bill comes to $250, Have a nice day.");
            
SendClientMessageEx(playerid, COLOR_YELLOW, "Gold Donator: You have spawned at your home.");
            for(new 
i = 0; i < sizeof(HouseInfo); i++)
            {
                if(
PlayerInfo[playerid][pPhousekey] == i || PlayerInfo[playerid][pPhousekey2] == i)
                {
                    
Streamer_UpdateEx(playerid, HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
                    
SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
                    if(
HouseInfo[i][hCustomInterior] == 1)
                    {
                        
TogglePlayerControllable(playerid, 0);
                        
GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
                        
SetPVarInt(playerid, "LoadingObjects", 1);
                        
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
                    }
                    
SetPlayerPos(playerid,HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
                    
GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
                    
PlayerInfo[playerid][pInt] = HouseInfo[i][hHInteriorWorld];
                    
PlayerInfo[playerid][pLocal] = i+6000;
                    
PlayerInfo[playerid][pVW] = i+60000;
                    
SetPlayerVirtualWorld(playerid, i+60000);
                }
            }
            
DeletePVar(playerid, "Hospital");
            
SetCameraBehindPlayer(playerid);
            
TogglePlayerControllable(playerid, 1);
        } 
Reply
#2

Try to freeze the player for some more time, or eventually spawn him a Y level above so he does not spawn underground(?).
Reply
#3

Quote:
Originally Posted by Twizted
Посмотреть сообщение
Try to freeze the player for some more time, or eventually spawn him a Y level above so he does not spawn underground(?).
he did the freezing part?

and use SetPlayerInterior (https://sampwiki.blast.hk/wiki/Function:SetPlayerInterior)
Reply
#4

He is using it already

Quote:

SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);

Quote:

PlayerInfo[playerid][pInt] = HouseInfo[i][hHInteriorWorld];

Make sure the interior id you used is correct also the world, else you'll start falling nowhere. even you freeze the player.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)