How To make a Red Marker that when you go in it it loads a tele menu? - 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)
+--- Thread: How To make a Red Marker that when you go in it it loads a tele menu? (
/showthread.php?tid=280469)
How To make a Red Marker that when you go in it it loads a tele menu? -
[EDT]AmanSingh123 - 01.09.2011
Hi,
i wanted to know how would i make a red marker that when you go inside the red marker it brings up a teleport menu.. with like three teleports...
..the reason i need help on this is because when a player spawns i want them to spawn inside a interior and then theirs a red marker and they go inside it and three spawn area's come... and yeah...
Re: How To make a Red Marker that when you go in it it loads a tele menu? -
FireCat - 01.09.2011
SetPlayerCheckpoint
Re: How To make a Red Marker that when you go in it it loads a tele menu? -
=WoR=Varth - 01.09.2011
https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse
https://sampwiki.blast.hk/wiki/SetPlayerPos
Re: How To make a Red Marker that when you go in it it loads a tele menu? -
[EDT]AmanSingh123 - 01.09.2011
but if i make a checkpoint "SetPlayerCheckpoint(playerid, x, y, z, 3.0)" do i need to set the interior? because the interior is interior id 12 "SetPlayerInterior(playerid, 12);"
Re: How To make a Red Marker that when you go in it it loads a tele menu? -
=WoR=Varth - 01.09.2011
Set it to 0 if you want to TP player to outside.
Re: How To make a Red Marker that when you go in it it loads a tele menu? -
[EDT]AmanSingh123 - 01.09.2011
1 more question... i dont want to make a dialog now... but i when a player enter the checkpoint it sets a random spawn spot and i know i add the setplayerpos's on OnPlayerEnterCheckPoint but how do i make it random?
Re: How To make a Red Marker that when you go in it it loads a tele menu? -
[EDT]AmanSingh123 - 01.09.2011
also i did this but it only sets the player at one spawn not random because i did /kill and went into the checkpoint and it kept on setting it on the same spawn...
pawn Код:
new Float:RandomSpawns[][] =
{
{1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
{1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
{1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
{718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
{722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
public OnPlayerEnterCheckpoint(playerid)
{
SetPlayerInterior(playerid, 0);
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
return 1;
}