28.04.2011, 17:13
easiest way is to use a pickup to link it..
create a pickup at the place where to enter the building..
either use a pre-build interior and just enter it's interiorid and the positions of it..
or make one on your own and select any interiorid for it that you like and figure out the pos by your objects..
create a pickup at the place where to enter the building..
pawn Код:
new enterb;
pawn Код:
public OnGameModeInit()
{
enterb = CreatePickup(........);
return 1;
}
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == enterb)
{
SetPlayerInterior(playerid, id); //replace with the interior ID you want to use
SetPlayerPos(playerid, x, y, z); //replace with the coords
}
return 1;
}
or make one on your own and select any interiorid for it that you like and figure out the pos by your objects..