Auto enter
#1

I am making a system which is if u are near a business or entrance it will automaticly put u inside the interior where to find the details and where to put it?
Reply
#2

You can make a system so when the player gets in range of a 3dtextdraw or something that it will send them to the chosen interior. Just let me know if you need help making it
Reply
#3

You will need these functions:

pawn Код:
CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld);
SetPlayerInterior(playerid,interiorid);
SetPlayerPos(playerid,Float:X, Float:Y, Float:Z);
SetPlayerVirtualWorld(playerid,virtualworld);
SetPlayerFacingAngle(playerid,Float:angle);

CallBacks
pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid)
Example script:

pawn Код:
new bank;
 
public OnGameModeInit()
{
    bank = CreatePickup(1318,23,2355.2417,1544.3804,10.8203,-1);
    return 1;
}
 
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == bank)
    {
         SetPlayerPos(playerid,2315.952880,-1.618174,26.742187);
         SetPlayerFacingAngle(playerid, 275.4359);
     SetPlayerInterior(playerid, 0);
         SetPlayerVirtualWorld(playerid, 354);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)