checkpoint
#3

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!
};
Reply


Messages In This Thread
checkpoint - by bijela - 15.06.2014, 09:07
Re: checkpoint - by bijela - 15.06.2014, 12:25
Re: checkpoint - by park4bmx - 15.06.2014, 12:33
Re: checkpoint - by bijela - 15.06.2014, 12:37
Re: checkpoint - by bijela - 15.06.2014, 13:36
Re: checkpoint - by bijela - 15.06.2014, 16:57
Re: checkpoint - by bijela - 15.06.2014, 16:59
Re: checkpoint - by bijela - 18.06.2014, 14:51
Re: checkpoint - by Rittik - 18.06.2014, 14:57
Re: checkpoint - by bijela - 18.06.2014, 16:16

Forum Jump:


Users browsing this thread: 1 Guest(s)