Quote:
Originally Posted by Ihabou
I already Do that But It Teleport Me over and Over You know what i mean
|
ok... i just noticed this, you teleport the player at the exact same position where your exit pickup is!
public OnGameModeInit()
{
CreateDynamicPickup(19132, 1,
1402.6344, -1697.8345, 13.5533);//this will get pickupid 1, e.g CLK_BELL_ENTER
CreateDynamicPickup(19132, 1,
1299.14, -794.77, 1084.00);//this 2 and so on...
return 1;
}
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
switch(pickupid) //'switching' through all the id's, better than if-if else
{
case LSB_ENTER://our enter pickup
{
//actually moving the player inside...
SetPlayerInterior(playerid, 9);
SetPlayerVirtualWorld(playerid,6);
SetPlayerPos(playerid,
1299.14, -794.77, 1084.00);
SetPlayerFacingAngle(playerid,357.55);
}
case LSB_EXIT://and the exit one
{
//aaaand outside
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerFacingAngle(playerid,90.0);
SetPlayerPos(playerid,
1402.6344, -1697.8345, 13.5533);
}
}
return 1;
}
and what happens then is that the code for the exit pickup gets executed and you teleport the player
at the exact position of the enter pickup..... you created a "teleport-loop" :P
to fix this, simply teleport to another location, do not use the coords of your exit/enter pickup
but rather like maybe 5ft in front of it