Interiors and VW's - best alternative?
#1

Hello. If you have custom enex system and few interiors with the same ID, you have too create virtual worlds, so the inside pickup will teleport you correctly. But, what do you do if you want to add NPC's there? Creating one for every world and interior doesn't seem like a good idea to me. And so I'm wondering what would be the best alternative for VW's? What do you think of this:
Код:
        new Float:xx, Float:yy, Float:zz;
        if(pickupid == ammoEnter)
        {
            GetPlayerPos(playerid,xx,yy,zz);       
            SetPlayerPos(playerid,285.6575,-39.8354,1001.5156);
            SetPlayerFacingAngle(playerid,359.0469);
            SetPlayerInterior(playerid,1);
            SetCameraBehindPlayer(playerid);
        }
        if(pickupid == ammoExit)
        {
            SetPlayerPos(playerid,xx+5,yy+5,zz);
            SetPlayerFacingAngle(playerid,88.3477);
            SetPlayerInterior(playerid,0);
            SetCameraBehindPlayer(playerid);
        }
or this?

Код:
        if(pickupid == ammoEnter)
        {
            enteredAmmo[playerid] = 1; 
            SetPlayerPos(playerid,285.6575,-39.8354,1001.5156);
            SetPlayerFacingAngle(playerid,359.0469);
            SetPlayerInterior(playerid,1);
            SetCameraBehindPlayer(playerid);
        }
        if(pickupid == ammoExit && enteredAmmo[playerid] == 1)
        {
            SetPlayerPos(playerid,ammoPos[1][x],ammoPos[1][y],ammoPos[1][z]);
            SetPlayerFacingAngle(playerid,88.3477);
            SetPlayerInterior(playerid,0);
            SetCameraBehindPlayer(playerid);
        }
Both use just one interior pickup and no VW's. Should it work?
Reply
#2

For each interior you use twice, you need to set the dimension up 1+ to make sure you don't spawn in the wrong interior. So, if your planning to use NPC's make sure you set the dimension up 1+ when you use the same interior twice.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)