SA-MP Forums Archive
checkpoint - 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: checkpoint (/showthread.php?tid=519608)



checkpoint - bijela - 15.06.2014

can someone explain how did i this cp in interior? i saw this and use for my gamemode, but can you explain how to add any other cp in interior..

new Float:checkCoords[MAX_POINTS][4] = {
{351.3314, 196.9337, 368.2675,217.0970} // robcityhall
};

new Float:checkpoints[MAX_POINTS][4] = {
{356.7246,215.6280,1008.3828,3.0}// robcityhall
};


Re: checkpoint - bijela - 15.06.2014

bump?


Re: checkpoint - park4bmx - 15.06.2014

adding values could be easier.
pawn Код:
new Float:checkpoints[MAX_POINTS][4] = {
the Float indicates that the variable will be a float type which looks like this 1.0 needs to have the dot in the number, is classified as a float.

after is the name obviously(after the : <name>)
then goes the array index 0 which is how many items there will be in the variable. your using a define MAX_POINTS. just make sure that value is always 1 more then the actual items you have(if you have 4 items then the array size should be 5 to not get buffer overflow).

The last thing is the number of parameters it will contain, which are separated by the comma (,).

example of adding more potions/locations

pawn Код:
new Float:checkpoints[MAX_POINTS][4] = {
{356.7246,215.6280,1008.3828,3.0},        //notice the comma after every line
{324.6546,56.5480,645.3828,1.0},
{553.7246,215.6280,582.3828,3.0},
{923.1453,45.6280,1008.3828,2.2}         // the last one does not require a comma!
};



Re: checkpoint - bijela - 15.06.2014

I don't understand the best.. btw, do you speak serbian?


Re: checkpoint - bijela - 15.06.2014

Bump?


Re: checkpoint - bijela - 15.06.2014

Bump once again. 2. Page


Re: checkpoint - bijela - 15.06.2014

I know this system but how to add cp in interior with this system...


Re: checkpoint - bijela - 18.06.2014

bump please !!!!!


Re: checkpoint - Rittik - 18.06.2014

Код:
new Float:checkCoords[MAX_POINTS][4] = {
{351.3314, 196.9337, 368.2675} // robcityhall
{373.825653,-117.270904,1001.499511} //well stacked pizza
};
Under you command
Код:
 SetPlayerCheckpoint(playerid, 351.3314, 196.9337, 368.2675,10.0);
 SetPlayerCheckpoint(playerid, 373.825653,-117.270904,1001.499511,10.0);



Re: checkpoint - bijela - 18.06.2014

i want to stay this cp always, and no only in cmd... For example:

How to add checkpoint in Pizza for exit out? with this system which i gave you?