[SOLVED] Using Pickups to enter a building -
Awall86 - 21.05.2010
Alright I have this
Код:
new tostudio;
new fromstudio;
public OnGameModeInit()
tostudio = CreatePickup(1239, 1, X, Y, Z);
fromstudio = CreatePickup(1239 , 1, X, Y, Z);
public OnPlayerPickupPickup()
if(pickupid == tostudio)
SetPlayerPos(playerid, X, Y, Z);
SetPlayerInterior(playerid, 5);
if(pickupid == from studio)
SetPlayerPos(playerid, X, Y, Z);
And when I go to test it,,, I can get into the building just fine... But when i go to exit the building,,, I run into the pickup,, and everything just goes gray 0_o like im running in some blank space..
Could someone tell me what im doing wrong
Re: [HELP] Using Pickups to enter a building -
[HiC]TheKiller - 21.05.2010
You need to
pawn Код:
SetPlayerInterior(playerid, 0);
When you exit.
Re: [HELP] Using Pickups to enter a building -
Awall86 - 21.05.2010
That didnt work either... It just took me to some random place on the map really high in the air and droped me =/
Re: [HELP] Using Pickups to enter a building -
[HiC]TheKiller - 21.05.2010
What have you put as the X, Y and Z variables because they are most probably wrong.
Re: [HELP] Using Pickups to enter a building -
Awall86 - 21.05.2010
here is what i have exactly
Код:
new towlvi;
new fromwlvi;
public OnGameModeInit()
{
towlvi = CreatePickup(1239, 1, 2462.7932,2244.4746,10.8203);//ICON OUTSIDE BUILDING
fromwlvi = CreatePickup(1239, 1, 1298.8892,-796.4041,1084.0078);//ICON INSIDE BUILDING
return 1;
}
public OnPlayerPickupPickup(playerid, pickupid)
{
if(pickupid == towlvi)
SetPlayerPos(playerid, 1299.1359,-794.6379,1084.0078);
SetPlayerInterior(playerid, 5);
if(pickupid == fromwlvi)
SetPlayerPos(playerid, 2462.8064,2240.8918,10.8203);
return 1;
}
Re: [HELP] Using Pickups to enter a building -
[HiC]TheKiller - 21.05.2010
pawn Код:
new towlvi;
new fromwlvi;
public OnGameModeInit()
{
towlvi = CreatePickup(1239, 1, 2462.7932,2244.4746,10.8203);//ICON OUTSIDE BUILDING
fromwlvi = CreatePickup(1239, 1, 1298.8892,-796.4041,1084.0078);//ICON INSIDE BUILDING
return 1;
}
public OnPlayerPickupPickup(playerid, pickupid)
{
if(pickupid == towlvi)
{
SetPlayerPos(playerid, 1299.1359,-794.6379,1084.0078);
SetPlayerInterior(playerid, 5);
}
if(pickupid == fromwlvi)
{
SetPlayerPos(playerid, 2462.8064,2240.8918,10.8203);
SetPlayerInterior(playerid, 0);
}
return 1;
}
Re: [SOLVED] Using Pickups to enter a building -
Awall86 - 21.05.2010
Sweet thanks guys... Works just fine now