Teleport when I go into a "Redpoint"?
#1

Hey, again!

I have search but canґt find how I can make a teleport when I go into a "Redpoint" ?

Whatґs the code for that:P ?

Reply
#2

CreateCheckpoint
OnPlayerEnterCheckPoint
SetPlayerPos
Reply
#3

Quote:
Originally Posted by OmeRinG
CreateCheckpoint
OnPlayerEnterCheckPoint
SetPlayerPos
Thank You

But how can I add it on my gamemode?

This is the coords: 3317.8159,2188.7927,11.3846


Something like this?


Код:
public CreateCheckpoint(playerid)
{
  CreateCheckpoint(319.0541,-164.5864,999.5938);
  SetPlayerPos(playerid);3317.8159,2188.7927,11.3846);
  return 1;
}



public OnPlayerEnterCheckpoint(playerid)
{

  SetPlayerPos(playerid);3317.8159,2188.7927,11.3846);

  return 1;
}
I know.... I suck on this but can you fix it for me ?

So I can just add it to my GM ?
Reply
#4

Oh my god...

Код:
OnTop:
new cp1;

Under GameModeInit
cp1 = CreateCheckpoint(319.0541,-164.5864,999.5938);

Anywhere:

public OnPlayerEnterCheckpoint(playerid)
{
  SetPlayerPos(playerid,3317.8159,2188.7927,11.3846);

  return 1;
}
Reply
#5

in the public OnPlayerSpawn:
pawn Код:
CreatePlayerCheckpoint(playerid,319.0541,-164.5864,999.5938);
in the public OnPlayerEnterCheckPoint:

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  SetPlayerPos(playerid,3317.8159,2188.7927,11.3846);
  SendClientMessage(playerid,0xffffff,"You have been teleported because of standing on the red checkpoint.");
  return 1;
}

Reply
#6

Thank You
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)