Help :S
#1

How can i make a teleport when someone walks into a area,Like IsPlayerInArea & SetPlayerPos but where do put the functions for it to work :S ?


I just need them to be teleported once thay walk into a area,No commands :S

Please help
Reply
#2

Timer probably.
Reply
#3

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Timer probably.
Timer?

This is wat i exactly want,When thay walk to bank door thay tele inside,When thay walk to door inside it teles out side...Where can i place the functions? Do i got to make a unique callback or something xD
Reply
#4

Quote:
Originally Posted by <Weponz>
Посмотреть сообщение
Timer?

This is wat i exactly want,When thay walk to bank door thay tele inside,When thay walk to door inside it teles out side...Where can i place the functions? Do i got to make a unique callback or something xD
pawn Код:
new TeleTimer[MAX_PLAYERS];

// OnPlayerConnect
TeleTimer[playerid] = SetTimerEx("PosUpdate", true, 2000, "i", playerid);

// OnPlayerDC
KillTimer(TeleTimer[playerid]);
Next, make an callback that checks the playerpoint. IsPlayerInRange is recommended.
Reply
#5

Can u please give me the full code i need :S im lost :S
Reply
#6

THIS should help.
Now, we all thank you for your very professional title, as "Help :S" ovbiously tells us you want to make a teleport so that when someone walks into the area it teleports them.
Maybe a more professional title would be "Teleporting by Area".
But okay. I Guess. I will give you a little boost:

pawn Код:
public Check()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerInRangeOfPoint(i, 2/*this is the range*/, x, y, z/*Coordinates here*/))
        {
            SetPlayerInterior(playerid, /*the interior you want*/);
            SetPlayerPos(playerid, /*Coordinates you want*/);
        }
    }
    return 1;
}

public OnGameModeInit()
{
    SetTimer("Check", 1000, true);
    return 1;
}
Good Day,

6d
Reply
#7

pawn Код:
public Check()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerInRangeOfPoint(i, 2/*this is the range*/, x, y, z/*Coordinates here*/))
        {
            SetPlayerInterior(playerid, /*the interior you want*/);
            SetPlayerPos(playerid, /*Coordinates you want*/);
        }
    }
    return 1;
}

public OnGameModeInit()
{
    SetTimer("Check", 1000, true);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)