Virtual World...
#1

Hey Guys !

Sorry for bumping previuse topic..

I have been downloaded this interior ( https://sampforum.blast.hk/showthread.php?tid=93619 ) and I want do that when player enter to vehicle number 51 it will teleport me to the interior.

Tnx guys !!
Reply
#2

Код:
OnPlayerStateChange(playerid, newstate, oldstate) 
{
     new carid = GetPlayerVehicleID(playerid);
     new carmodel = GetVehicleModel(carid);
     if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
     {
          if(carmodel == 51)
          {
               SetPlayerInterior(playerid, interiorid);
               SetPlayerPos(playerid, x, y, z);
          }
          else return SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); <--brings the car also
     }
}
This should work but if it doesnt please feel freee to message me on here and i can try to help you with you're issues.

Try this, if it doesnt work then please feel free to show me what happens or you're errors.

I ican try to hel pyou out as much as posisble.
Reply
#3

Hey man tnx for the replay

It doesn't teleport me to the interior =\

If you can see in the system there is line:

pawn Код:
if(newstate == PLAYER_STATE_PASSENGER && GetPlayerVehicleID(playerid) == 57)
    {
        SetPlayerPos(playerid, 2084.479980, -1374.825928, 300.628052);
        SetPlayerFacingAngle(playerid, 0);
        SetCameraBehindPlayer(playerid);
        SetPlayerInterior(playerid, 1);
        Inenforcer[playerid] = GetPlayerVehicleID(playerid);
    }
Now when I am adding SetPlayerVirtualWorld(playerid, 1); it teleport me to the interior normaly but I am falling from the sky..

Reply
#4

did you change interiorid to the one that you are trying to go to?
Reply
#5

No man, When I download the system it was defineded like this..
Reply
#6

Help plz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)