SA-MP Forums Archive
How to make teleport checkpoint - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make teleport checkpoint (/showthread.php?tid=225427)



How to make teleport checkpoint - Darien - 13.02.2011

Mayb possible to make checkpoint like when im reach the checkpoint in LS ill b teleported to LV, it is possible? If it possible i need the script example.


Re: How to make teleport checkpoint - JaTochNietDan - 13.02.2011

Well, simple, use SetPlayerCheckpoint and OnPlayerEnterCheckpoint. For example:

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid,0.0,0.0,0.0);
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerPos(playerid,0.0,0.0,0.0);
    return 1;
}
You will of course have to substitute your own x,y,z positions for it to work the way you want it to work. Additionally you need to keep in mind this is only an example, you should use it to integrate it into the script the way you want it to work by reading and understanding the code.


Re: How to make teleport checkpoint - Darien - 13.02.2011

warning 202: number of arguments does not match definition


Re: How to make teleport checkpoint - JaTochNietDan - 13.02.2011

Sorry the SetPlayerCheckpoint function requires a size parameter also, I left that out accidentally.

pawn Код:
SetPlayerCheckpoint(playerid,0.0,0.0,0.0,5);
You can change the size to your needs. You should view these functions on the SA-MP Wiki for more information and general examples.


- Darien - 13.02.2011

thank you

hell, but i no need the marker on the radar
and i want tht player can b teleported with car


Re: How to make teleport checkpoint - Mean - 13.02.2011

You can't hide the marker on the minimap / map as much as I know.
EDIT: It is always better to use pickups instead of checkpoints, because server can hold only 1 checkpoint ( without streamer ).


Re: How to make teleport checkpoint - Darien - 13.02.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
You can't hide the marker on the minimap / map as much as I know.
EDIT: It is always better to use pickups instead of checkpoints, because server can hold only 1 checkpoint ( without streamer ).
but how to make this? Possible to make tht i could teleport with car by checkpoint?


Re: How to make teleport checkpoint - Mean - 13.02.2011

Quote:
Originally Posted by Darien
Посмотреть сообщение
but how to make this? Possible to make tht i could teleport with car by checkpoint?
Well, I use incognito's streamer ( CreateDynamicCP ) and when I enter it with a car, it will still teleport me.


Re: How to make teleport checkpoint - Darien - 14.02.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
Well, I use incognito's streamer ( CreateDynamicCP ) and when I enter it with a car, it will still teleport me.
But how to make tht? Can u put the script example?


Re: How to make teleport checkpoint - Mean - 14.02.2011

Download incognito's streamer.