Spawn at Home interior Problem
#1

PHP код:
        else if(GetPVarInt(playerid"Hospital") == && PlayerInfo[playerid][pInsurance] == 7)
        {
            
SetPlayerArmour(playeridPlayerInfo[playerid][pSarmor]);
            
SetPlayerHealth(playerid50.0);
            
DeletePVar(playerid"MedicBill");
            
GivePlayerCash(playerid, -250);
            
SendClientMessageEx(playeridTEAM_CYAN_COLOR"DOC: Your Medical Bill comes to $250, Have a nice day.");
            
SendClientMessageEx(playeridCOLOR_YELLOW"Gold Donator: You have spawned at your home.");
            for(new 
0sizeof(HouseInfo); i++)
            {
                if(
PlayerInfo[playerid][pPhousekey] == || PlayerInfo[playerid][pPhousekey2] == i)
                {
                    
Streamer_UpdateEx(playeridHouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
                    
SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
                    if(
HouseInfo[i][hCustomInterior] == 1)
                    {
                        
TogglePlayerControllable(playerid0);
                        
GameTextForPlayer(playerid"Objects loading..."40005);
                        
SetPVarInt(playerid"LoadingObjects"1);
                        
SetTimerEx("SafeLoadObjects"40000"d"playerid);
                    }
                    
SetPlayerPos(playerid,HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
                    
GameTextForPlayer(playerid"~w~Welcome Home"50001);
                    
PlayerInfo[playerid][pInt] = HouseInfo[i][hHInteriorWorld];
                    
PlayerInfo[playerid][pLocal] = i+6000;
                    
PlayerInfo[playerid][pVW] = i+60000;
                    
SetPlayerVirtualWorld(playeridi+60000);
                }
            }
            
DeletePVar(playerid"Hospital");
            
SetCameraBehindPlayer(playerid);
            
TogglePlayerControllable(playerid1);
        } 
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)