Checkpoint problem
#1

Hi, I got a little problem
For my server I made a driving mission, to do so I used CPS:
pawn Код:
new Mcheck[2];
ok, so in my code i added something that creates the checkpoint:
pawn Код:
Mcheck[0] = CreateDynamicCP(mStart_x, mStart_y, mStart_z, 2.0, -1, -1, playerid, 400000.0);
ok so the onplayerenterdyncp callback:
pawn Код:
forward OnPlayerEnterDynamicCP(playerid, checkpointid);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{

    new vehicle;
    vehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
   
    if(checkpointid == Mcheck[0])
    {
        new NewVehicleID = GetPlayerVehicleID(playerid);
        if(OldVehicleID[playerid] != NewVehicleID) return SendClientMessage(playerid,COLOR_RED,"This vehicle does not contain a passenger!");
        // stop previous CP
        DestroyDynamicCP(Mcheck[0]);
        Mcheck[1] = CreateDynamicCP(mInfo[playerid][Del_x], mInfo[playerid][Del_y], mInfo[playerid][Del_z], 2.0, -1, -1, playerid, 400000.0);
    }
   
    if(checkpointid == Mcheck[1])
    {
        SendClientMessage(playerid,COLOR_RED,"completed the mission");
    }
ok so this should just create a new CP when enterring the first one
but when I enter the first one I get the message from the Second one,
and wehn I enter the second one I get the message from the Second one again...
any help?
Reply


Messages In This Thread
Checkpoint problem - by knackworst - 08.10.2011, 21:31
Re: Checkpoint problem - by =WoR=G4M3Ov3r - 08.10.2011, 22:19
Re: Checkpoint problem - by Babul - 08.10.2011, 22:33
Re: Checkpoint problem - by knackworst - 08.10.2011, 22:36
Re: Checkpoint problem - by Babul - 08.10.2011, 22:56
Re: Checkpoint problem - by knackworst - 08.10.2011, 23:05
Re: Checkpoint problem - by Babul - 08.10.2011, 23:13
Re: Checkpoint problem - by knackworst - 08.10.2011, 23:17
Re: Checkpoint problem - by Babul - 09.10.2011, 20:02

Forum Jump:


Users browsing this thread: 1 Guest(s)