Help With Checkpoint [+rep]
#1

Im trying to create a checkpoint with a command but i dont have any idea how to give it a checkpoint id.. :S

Using streamer!

Like:

pawn Код:
new Pack;
pawn Код:
CMD:pack(playerid,params[])
{
pack = CreateDynamicCP(X, Y, Z, 1.0,-1,-1,-1,10.0);
return 1;
}
Then

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid = pack)
    {
         // Code in here
    }
    return 1;
}
But keep getting these errors fully sure not because of code because of checkpoints.

pawn Код:
(217) : warning 211: possibly unintended assignment
(217) : error 017: undefined symbol "MedicC"
(234) : error 017: undefined symbol "MedicC"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
Note: I know MedicC and pack is not same but its just an example!
Reply
#2

Код:
new Pack;
Код:
pack = CreateDynamicCP(X, Y, Z, 1.0,-1,-1,-1,10.0);
I'm not sure if pack is the same as Pack, I don't think it is.

Not sure how your checkpoint streamer works either, but I'm guessing this might work:
Код:
new Pack[MAX_PLAYERS];
Код:
Pack[playerid] = CreateDynamicCP(X, Y, Z, 1.0,-1,-1,-1,10.0);
Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == Pack[playerid]) // == for arguments, = for setting  if(i == 1)i = 2;
    {
         // Code in here
    }
    return 1;
}
Reply
#3

Not working
Reply
#4

I was wrong it worked i forgot ==

I will test the code if it works +rep
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)