Need help with teleporting
#1

hi there ,

i have a problem i only have an interior but i will a checkpoint ( marker ) that when you enter it its you teleport to the interior
coordinates 1754.1925048828,-1597.7174072266,1813.7757568359

and the coordinates of the checkpoint ( marker )
x 1825
y -1538.9000244141
z 13.5

( location idelwood , little italie , commerence ) the building that looks like a jail !



( Sorry for my english i am dutch )
Reply
#2

no one can help me come guys there must be 1 that me can help
Reply
#3

1: Only Bumb after waiting 48 Hours or more 2: Why did the Thread have 5 Stars
Reply
#4

1. okay srry
2. i thought than come more people
Reply
#5

Do this on OnGamemodeInit Or OnGamemode

if (IsPlayerInRangeOfPoint(2.0, playerid, YOURCORDSHEREOFOUTSIDELOCATION))
{// Quick serach
SetPlayerPos(playerid, CORDS);
SetPlayerInterior(playerid, INTERIORID)
}

If this helps you Please rep
Reply
#6

WTF THomas this is wrong (Why under OnGameModeInit)

PHP код:
public OnPlayerUpdate(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,YourRangeYour X Cord,Your Y CordYour Z Cord))
    {
    
SetPlayerPos(playeridCORDS);
    
SetPlayerInterior(playeridINTERIORID);
    
SetPlayerVirtualWorld(playerid,YourWorld); //Only if you want
    
}
    return 
1;

Reply
#7

https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/Function:SetPlayerInterior
http://weedarr.wikidot.com/interior
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1825, -1538.9000244141, 13.5, 3.0);
    return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerInterior(playerid,interiorid);
    SetPlayerPos(playerid,1754.1925048828,-1597.7174072266,1813.7757568359);
    return 1;
}
Reply
#8

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
WTF THomas this is wrong (Why under OnGameModeInit)

PHP код:
public OnPlayerUpdate(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,YourRangeYour X Cord,Your Y CordYour Z Cord))
    {
    
SetPlayerPos(playeridCORDS);
    
SetPlayerInterior(playeridINTERIORID);
    
SetPlayerVirtualWorld(playerid,YourWorld); //Only if you want
    
}
    return 
1;

If you can read English, I said You can use it under OnGamemodeinit. If you Define the Parameters and Callbacks Properly you can use it under there. I use mine under there and it works fine
Reply
#9

Quote:
Originally Posted by ThomasCarter
Посмотреть сообщение
If you can read English, I said You can use it under OnGamemodeinit. If you Define the Parameters and Callbacks Properly you can use it under there. I use mine under there and it works fine
i has tested an other but i gonna thest your script now
Reply
#10

Quote:
Originally Posted by ThomasCarter
Посмотреть сообщение
If you can read English, I said You can use it under OnGamemodeinit. If you Define the Parameters and Callbacks Properly you can use it under there. I use mine under there and it works fine
okay i get that script and i get this error

[15:45:40] Script[gamemodes/test.amx]: Run time error 17: "Invalid/unsupported P-code file format"
[15:45:40] Failed to load 'gamemodes/test.amx' script.
[15:45:40] Number of vehicle models: 0
[15:45:49] --- Server Shutting Down.

whats now wrong!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)