Help With Checkpoint [+rep] - 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)
+--- Thread: Help With Checkpoint [+rep] (
/showthread.php?tid=324602)
Help With Checkpoint [+rep] -
lordturhan - 10.03.2012
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 Код:
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!
Re: Help With Checkpoint [+rep] -
Rac3r - 10.03.2012
Код:
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;
}
Re: Help With Checkpoint [+rep] -
lordturhan - 10.03.2012
Not working
Re: Help With Checkpoint [+rep] -
lordturhan - 10.03.2012
I was wrong it worked i forgot ==
I will test the code if it works +rep