SA-MP Forums Archive
Help Checkpoints - 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 Checkpoints (/showthread.php?tid=555745)



Help Checkpoints - TheSnicky - 08.01.2015

I want to make a Checkpoint but I want it for Checkpoint to appear when player is in range of point that i put. When I enter a Checkpoint I don't want it to dissapear, I want the checkpoint to dissapear when I move away from it, can someone please help me? :P


Re: Help Checkpoints - CoaPsyFactor - 08.01.2015

well it's easy just look basic streamer example for checkpoints and you'll get it.

Using function CreateDynamicCP(Float, Float:y, Float:z, Floatize, worldid = -1, interiorid = -1, playerid = -1, Floattreamdistance = 100.0);

you can set small streamdistance like 20, and player will see it only when in radius of 20.0 units, and in callback just put what to happen without Disabling or removing created checkpoint


Re: Help Checkpoints - TheSnicky - 08.01.2015

for(new k = 0; k < sizeof(KucaInfo); k++)
{
new kFile[80];
format(kFile, sizeof(kFile), KUCE_FILE, k);
if(fexist(kFile))
if(IsPlayerInRangeOfPoint(playerid, 2.0, KucaInfo[k][kUlazX], KucaInfo[k][kUlazY], KucaInfo[k][kUlazZ]) && CP[playerid] == 0)
{
CreateDynamicCP(KucaInfo[k][kUlazX], KucaInfo[k][kUlazY], KucaInfo[k][kUlazZ], 1.5, -1, -1, -1, 20.0);
}
}
I did this but It doesn't dissapear when I move away, can you send me what to do please


Re: Help Checkpoints - TheSnicky - 08.01.2015

Help please!