Teleport when I go into a "Redpoint"? - 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: Teleport when I go into a "Redpoint"? (
/showthread.php?tid=77260)
Teleport when I go into a "Redpoint"? -
icezoor - 09.05.2009
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 ?
Re: Teleport when I go into a "Redpoint"? -
OmeRinG - 09.05.2009
CreateCheckpoint
OnPlayerEnterCheckPoint
SetPlayerPos
Re: Teleport when I go into a "Redpoint"? -
icezoor - 09.05.2009
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 ?
Re: Teleport when I go into a "Redpoint"? -
Gamer007 - 09.05.2009
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;
}
Re: Teleport when I go into a "Redpoint"? -
OmeRinG - 09.05.2009
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;
}
Re: Teleport when I go into a "Redpoint"? -
icezoor - 09.05.2009
Thank You