House exit interior
#9

Quote:
Originally Posted by Sunehildeep
Посмотреть сообщение
PHP код:
housesTryEnterExit(playerid) {
    for(new 
i=0;i<sizeof(Houses);i++) {
        if(
IsPlayerInRangeOfPoint(playerid1.5Houses[i][EHouseX],Houses[i][EHouseY],Houses[i][EHouseZ])) {
            if(
IsHouseLocked(i)) {
                
GameTextForPlayer(playerid"~r~Locked"20001);
                return 
1;
            }
            if(
Houses[i][EHouseLights] == 1) {
                
TextDrawShowForPlayer(playeridHouseLightsText);
            }
            if(
Houses[i][EHouseRadioIndex] != -1) {
                new 
url[128];
                
getRadioURL(Houses[i][EHouseRadioIndex], urlsizeof(url));
                
PlayAudioStreamForPlayer(playeridurl);
            }
            
SetPVarInt(playerid"Interior"GetPlayerInterior(playerid));
            
SetPVarInt(playerid"VirtualW"GetPlayerVirtualWorld(playerid));
            
SetPlayerPos(playerid,  Houses[i][EHouseExitX],Houses[i][EHouseExitY],Houses[i][EHouseExitZ]);
            
SetPlayerInterior(playeridHouses[i][EHouseInterior]);
            
SetPlayerVirtualWorld(playeridhouseGetVirtualWorld(i));
        } else if(
IsPlayerInRangeOfPoint(playerid5.0Houses[i][EHouseExitX],Houses[i][EHouseExitY],Houses[i][EHouseExitZ])) {
            if(
GetPlayerVirtualWorld(playerid) == houseGetVirtualWorld(i)) {
                if(
Houses[i][EHouseLights] == 1) {
                    
TextDrawHideForPlayer(playeridHouseLightsText);
                }
                if(
Houses[i][EHouseRadioIndex] != -1) {
                    
StopAudioStreamForPlayer(playerid);
                }
                
SetPlayerPos(playeridHouses[i][EHouseX],Houses[i][EHouseY],Houses[i][EHouseZ]);
                
SetPlayerInterior(playeridGetPVarInt(playerid"Interior"));
                
SetPlayerVirtualWorld(playeridGetPVarInt(playerid"VirtualW"));
            }
        }
    }
    return 
1;

It should work now, all that was wrong that interior was getting set to house interior before getting saved.
It will work perfectly now.
Worked Thanks +REP
Reply


Messages In This Thread
House exit interior - by Puff - 04.11.2017, 11:37
Re: House exit interior - by StrikerZ - 04.11.2017, 11:49
Re: House exit interior - by Puff - 04.11.2017, 12:32
Re: House exit interior - by StrikerZ - 04.11.2017, 14:30
Re: House exit interior - by Puff - 04.11.2017, 15:24
Re: House exit interior - by StrikerZ - 04.11.2017, 15:35
Re: House exit interior - by Puff - 04.11.2017, 19:40
Re: House exit interior - by StrikerZ - 05.11.2017, 04:58
Re: House exit interior - by Puff - 05.11.2017, 09:40

Forum Jump:


Users browsing this thread: 1 Guest(s)