Teleport From A Place
#1

Just wondering if anyone knows how to teleport from one place, Like a co-ordiniate to another co-ordinate. I've found a lot on teleporting with commands but i need it to be from co-ordinates.

Also, When i /save which part of that do i use. Theres a lot of numbers, And i know not all of it would be used. So if anyone knows which part i use from that, And how to teleport from one place to another could you please help with this.

Thanks.
Reply
#2

AddPlayerClass(0,2104.7131,2190.0469,14.4965,180.4 208,0,0,0,0,0,0); // This is the line you get when doing /save (other numbers)

These coords are the coordinates you need (X, Y & Z), these after the first number after the first number.

AddPlayerClass(0,2104.7131,2190.0469,14.4965,180.4208,0,0,0,0,0,0); // This is the line you get when doing /save (other numbers)

I'll explain a few stuff.
The '0' is the playerclass, let's say you have a cl0wn skin then you'd have classid 264. The 3 coords after that are the X, Y and Z coords. Those are very important (and the ones you need). The 180.4208 is basically the rotation coordinate. You don't really need that, but it can be usefull .

So a teleport command would be:

Code:
    
if(strcmp(cmd, "/teleport", true) == 0) 
{
    SendClientMessage(playerid, COLOR_WHITE, "* You have been teleported *");
    SetPlayerPos(playerid, 2104.7131,2190.0469,14.4965);
    return 1;
}
Reply
#3

Thanks for explain that part.

But what i need is to be able to teleport from one place to another, By being in like a marker or something. I know how to do the marker, I just need it so when they go into a marker it takes them to the place i need it to go.
Reply
#4

i think you mean a pickup. The wiki should get you started. Very simple to do:

https://sampwiki.blast.hk/wiki/CreatePickup
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup

and here are the pickup models:
https://sampwiki.blast.hk/wiki/Model_ID

Good luck.
Reply
#5

Quote:
Originally Posted by Dmac_91
Thanks for explain that part.

But what i need is to be able to teleport from one place to another, By being in like a marker or something. I know how to do the marker, I just need it so when they go into a marker it takes them to the place i need it to go.
You could do this with 2 things .

1) PlayerToPoint ( check if the person is near to the point , only allow him to use the command when he is near that point ) > You can search for this function.

2) Use Checkpoints . I would advise you to use a streamer ( search ). When a player enters a checkpoint , he gets teleported to the place you want him to. ( OnPlayerEnterCheckpoint)

Those are the 2 options , for more info , simple search on the wiki or on the forum it has been asked many times before.
Reply
#6

do you mean a command like:

Code:
/GotoPos 457 -2253 23
where you type the X,Y,Z position yourself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)