SA-MP Forums Archive
How to - 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: How to (/showthread.php?tid=162826)



How to - willsuckformoney - 24.07.2010

How to make it so that if you enter a checkpoint you go to to different places but different times like


player pickups pickup for a house

one time they go to one place

a different time the go to a different place

and it repeats like that


Re: How to - selten98 - 24.07.2010

you would like a random teleport checkpoint??
pawn Код:
new Float:Checkpointtele[2][3] =
{
   //x   0          //y 1      //z 2        //a 3
{1261.4143,-785.5112,1091.9063,329.5980}, // just a tele
{1298.6150,-796.5847,1084.0078,181.6979},
};

rnd = random(sizeof (Checkpointtele));
    SetPlayerPos(playerid, Checkpointtele[rnd][0], Checkpointtele[rnd][1], Checkpointtele[rnd][2]);
    SetPlayerFacingAngle(playerid, Checkpointtele[rnd][3]);



Re: How to - Kitten - 24.07.2010

try using timers everytime it changes the setplayerpos by timer.... im guessing


Re: How to - willsuckformoney - 24.07.2010

no not that i mean like when a player enters a checkpoint to enter this house they go either

1261.4143,-785.5112,1091.9063

or

1298.6150,-796.5847,1084.0078

same interior and stuff i just need to know how to make em goto them different spots each time entered checkpoint


EDIT: @Kitten How would that work out?


Re: How to - selten98 - 24.07.2010

pawn Код:
// credits go to BMUK
new Float:Checkpointtele[2][3] =
{
   //x=0  y=1  z=2  a=3
{1261.4143,-785.5112,1091.9063,329.5980}, // just a tele
{1298.6150,-796.5847,1084.0078,181.6979},
};

rnd = random(sizeof (Checkpointtele));
    SetPlayerPos(playerid, Checkpointtele[rnd][0], Checkpointtele[rnd][1], Checkpointtele[rnd][2]);
    SetPlayerFacingAngle(playerid, Checkpointtele[rnd][3]);



Re: How to - willsuckformoney - 24.07.2010

so like this??
pawn Код:
else if(checkpointid == otto)
    {
        new rnd = 2;
        new Float:Checkpointtele[2][3] =
            {
                //x   0          //y 1      //z 2        //a 3
                {1266.4143,-785.5112,1091.9063,329.5980}, // just a tele
                {1295.6150,-796.5847,1084.0078,181.6979},
            };

            rnd = random(sizeof (Checkpointtele));
            SetPlayerPos(playerid, Checkpointtele[rnd][0], Checkpointtele[rnd][1], Checkpointtele[rnd][2]);
            SetPlayerFacingAngle(playerid, Checkpointtele[rnd][3]);
   
        //SetPlayerInterior(playerid, 5);
        //SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
    }
i did it like that and it didnt work -_-


Re: How to - selten98 - 24.07.2010

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
so like this??
pawn Код:
else if(checkpointid == otto)
    {
        new rnd = 2;
        new Float:Checkpointtele[2][3] =
            {
                //x   0          //y 1      //z 2        //a 3
                {1266.4143,-785.5112,1091.9063,329.5980}, // just a tele
                {1295.6150,-796.5847,1084.0078,181.6979},
            };
        SetPlayerInterior(playerid, 5);
                rnd = random(sizeof (Checkpointtele));
            SetPlayerPos(playerid, Checkpointtele[rnd][0], Checkpointtele[rnd][1], Checkpointtele[rnd][2]);
            SetPlayerFacingAngle(playerid, Checkpointtele[rnd][3]);
   
    } // got this from LVRCR (never tested it)
i did it like that and it didnt work -_-
i thought like this