teleport not working
#1

Im trying to create a teleport so when you walk up to a door it teleports you to another location that I created. But its not working, here is what I got.

Код:
public MyTeleportToInterior(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2737.0888671875, -2799.9736328125, 23.703699111938))
    {
    SetPlayerPos(playerid, 2738.8181152344, -2875.5883789063, 308.98538208008);
    return 1;
	}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2738.8181152344, -2871.5883789063, 308.98538208008))
	{
	SetPlayerPos(playerid, 2737.0888671875, -2805.9736328125, 23.703699111938);
	return 1;
	}
return 1;
}
Reply
#2

how are you calling it?
Reply
#3

Quote:
Originally Posted by doo2002
Посмотреть сообщение
Im trying to create a teleport so when you walk up to a door it teleports you to another location that I created. But its not working, here is what I got.
Cleaned your code up and put it on pastebin. Are you calling this public function on a timer?
Reply
#4

pawn Код:
public MyTeleportToInterior(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2737.0888671875, -2799.9736328125, 23.703699111938))
    {
    SetPlayerPos(playerid, 2738.8181152344, -2875.5883789063, 308.98538208008);
    SetPlayerInterior(playerid,ID); //Change ID to the interior ID
    }
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2738.8181152344, -2871.5883789063, 308.98538208008))
    {
    SetPlayerPos(playerid, 2737.0888671875, -2805.9736328125, 23.703699111938);
        SetPlayerInterior(playerid,ID); //Change ID to the interior ID
    }
return 1;
}
Reply
#5

I dont have an interior ID, all I get was take an ammuniation interior, stuck it up in the sky and put things there, all I wanted was to walk up to the door and teleport to that location in the sky.
Reply
#6

Still an interior.
Reply
#7

SA:MP InteriorIDs - Weedar.wikidot.com
Reply
#8

ok i must be doing something wrong cause its still not working.
Reply
#9

Ok like I said it isn't working, I pasted my whole script in pastebin, maybe there is something I am forgetting.

http://pastebin.com/jRsyQgqJ
Reply
#10

pawn Код:
new TeleportTimer[MAX_PLAYERS];
OnPlayerConnect
pawn Код:
TeleportTimer[playerid] = SetTimerEx("MyTeleportToInterior", 1000, true, "d", playerid);
OnPlayerDisconnect
pawn Код:
KillTimer(TeleportTimer[playerid]);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)