Auto enter
#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


Messages In This Thread
Auto enter - by iBots - 03.12.2013, 20:46
Re: Auto enter - by Blademaster680 - 03.12.2013, 21:33
Respuesta: Auto enter - by [CG]Milito - 04.12.2013, 02:46

Forum Jump:


Users browsing this thread: 1 Guest(s)