How To make a Red Marker that when you go in it it loads a tele menu?
#1

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...
Reply
#2

SetPlayerCheckpoint
Reply
#3

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
Reply
#4

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);"
Reply
#5

Set it to 0 if you want to TP player to outside.
Reply
#6

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?
Reply
#7

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)