Checkpoints
#7

You could give my include a try for this (it's made for this kind of problem)

https://sampforum.blast.hk/showthread.php?tid=423622

To make things simple follow the instructions but use this stock function to set positions....
SetPlayerPosEx() no need for any range checking, your enter code is now neatly done in it's own function which will reduce clutter and make it easier to update action specific checkpoints/areas.

pawn Код:
public OnGameModeInit()
{
       AddDynamicSphereArea(1000.0, 1000.0, 1000.0, 4.0, "TestArea");
}

OnArea:TestArea(playerid, areaid, areaindex)
{
      SetPlayerPosEx(playerid, 0.0, 0.0, 0.0, 0.0, 0, 0);
      return 1;
}
pawn Код:
stock SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, Float:fa, vw = 0, interior = 0)
{
    SetPlayerPlayer(playerid, x, y, z);
    SetPlayerFacingAngle(playerid, fa);
    SetPlayerVirtualWorld(playerid, vw);
    SetPlayerInterior(playerid, interior);
    SetCameraBehindPlayer(playerid);
    return 1;
}
.................
And could you please make a CP at this pos, just so I understand how you make it:

2127.5300,2380.1204,10.8203

and when you enter it,

Interior ID: 3 Interior X, Y, Z: 964.106994,-53.205497,1001.124572
.................

Sure....

Under Gamemode init
pawn Код:
AddDynamicCP(964.106994,-53.205497,1001.124572, 2.0, "MyEnterPoint")
Somewhere else in the script as it's own function
pawn Код:
OnCheckPoint:MyEnterPoint(playerid, cpid, cpindex)
{
      SetPlayerPosEx(playerid,964.106994,-53.205497,1001.124572, 0.0, 0, 3);
      return 1;
}
Reply


Messages In This Thread
Checkpoints - by Ananisiki - 20.06.2013, 22:04
Re: Checkpoints - by SwisherSweet - 20.06.2013, 22:07
Re: Checkpoints - by Ananisiki - 21.06.2013, 01:30
Re: Checkpoints - by jakejohnsonusa - 21.06.2013, 02:06
Re: Checkpoints - by Sasino97 - 21.06.2013, 06:15
Re: Checkpoints - by Ananisiki - 22.06.2013, 00:06
Re: Checkpoints - by Pottus - 22.06.2013, 00:17
Re: Checkpoints - by Toxik - 19.03.2014, 22:30

Forum Jump:


Users browsing this thread: 2 Guest(s)