[Help]Pickup Teleport
#3

it's not teleport when i enter it i do it like that
This is script this is building near the bank
the arrow shows but nothing happens

Код:
#include <a_samp>
#include <streamer>

main(){}

enum
{
    LSB_ENTER=1,    //we have to start at 1 (unlike default 0)
    LSB_EXIT        //since pickup's don't start at 0 but 1
}

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;

}
Reply


Messages In This Thread
[Help]Pickup Teleport - by Ihabou - 05.01.2017, 11:08
Re: [Help]Pickup Teleport - by CutX - 05.01.2017, 11:46
Re: [Help]Pickup Teleport - by Ihabou - 05.01.2017, 12:13
Re: [Help]Pickup Teleport - by Ihabou - 05.01.2017, 14:14
Re: [Help]Pickup Teleport - by CutX - 05.01.2017, 14:19
Re: [Help]Pickup Teleport - by Ihabou - 05.01.2017, 15:25
Re: [Help]Pickup Teleport - by RyderX - 05.01.2017, 15:28
Re: [Help]Pickup Teleport - by Ihabou - 05.01.2017, 15:34
Re: [Help]Pickup Teleport - by Ihabou - 05.01.2017, 16:08
Re: [Help]Pickup Teleport - by CutX - 05.01.2017, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)