teleport
#1

how to make teleport through the checkpoint
Reply
#2

-OnPlayerEnterCheckpoint (Or DynamicCP if you're using a streamer)
-(If you're using a streamer) if (cp == yourcp)
- SetPlayerPos
Reply
#3

at the top of your script:
pawn Код:
new checkpoint;
at ongamemodeinit:
pawn Код:
checkpoint = CreateDynamicCP(x,y,z,float:size,-1,-1,-1,Float:range);
example:
pawn Код:
checkpoint = CreateDynamicCP(0,0,0,2.0,-1,-1,-1,100.0);
Now we gonna add this function:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == checkpoint)
{
//Put your code here
}
return 1;
}
You can set his position or something..
make sure that you have streamer include
and make sure that you typed #include <streamer> at the top of your script.
you can download streamer from here:
https://sampforum.blast.hk/showthread.php?tid=102865
Reply
#4

Quote:
Originally Posted by Eth
Посмотреть сообщение
at the top of your script:
pawn Код:
new checkpoint;
at ongamemodeinit:
pawn Код:
checkpoint = CreateDynamicCP(x,y,z,float:size,-1,-1,-1,Float:range);
example:
pawn Код:
checkpoint = CreateDynamicCP(0,0,0,2.0,-1,-1,-1,100.0);
Now we gonna add this function:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == checkpoint)
{
//Put your code here
}
return 1;
}
You can set his position or something..
make sure that you have streamer include
and make sure that you typed #include <streamer> at the top of your script.
you can download streamer from here:
https://sampforum.blast.hk/showthread.php?tid=102865
Код HTML:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == checkpoint)
{
//Put your code here  (and can code to write here how to write)
}
return 1;
}
Reply
#5

Senks
Reply
#6

just do like
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == checkpoint)
{
REPLACE THIS CODE WITH YOUR CODE
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)