CreateDynamicCP issue :/ - 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: CreateDynamicCP issue :/ (
/showthread.php?tid=374737)
CreateDynamicCP issue :/ -
TheArcher - 03.09.2012
Hello everybody, I've tried to play around with Dynamic Checkpoints but I've got a problem. When I create a new checkpoint it is not called by OnPlayerEnterDynamicCP callback. If I try to create a new checkpoint doesn't show anything but....if I go back to the checkpoint previously created it works. Same thing if I create more checkpoints....In simple words the new checkpoint is not called.
pawn Код:
#define MAX_COUNTER 10
new Iterator: CheckCounter<MAX_COUNTER>, miID, miCheckpoint;
stock CreateMyCheck(Float: X, Float: Y, Float: Z)
{
MyCheck[miID][mID] = miID;
MyCheck[miID][mX] = X;
MyCheck[miID][mY] = Y;
MyCheck[miID][mZ] = Z;
Iter_Add(CheckCounter, miID);
miCheckpoint = CreateDynamicCP(X,Y,Z, 1.5);
++ miID;
miCheckpoint ++;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
foreach(CheckCounter, x)
{
if(checkpointid == x)
{
SendClientFormatMessage(playerid, -1, "checkpoint %d", x);
break;
}
}
return 1;
}
Am I doing something wrong?
Re: CreateDynamicCP issue :/ -
TheArcher - 06.09.2012
Bump?
Re: CreateDynamicCP issue :/ -
TheArcher - 06.09.2012
Sorry if I reply so fast again but i just want to say that i solved the problem.