PDA

View Full Version : CreateDynamicRaceCP help.


tuuler
07/07/2014, 01:27 PM
----

Siralos
07/07/2014, 01:30 PM
Can you paste your 'onplayerenterdynamiccp' code?

tuuler
07/07/2014, 01:33 PM
Can you paste your 'onplayerenterdynamiccp' code?

Why would you need that if I am using CreateDynamicRaceCP? Everything what you need is here.

Siralos
07/07/2014, 01:41 PM
I only see the code where the checkpoint changes from "1" to "2", but not the rest until "19".
And also paste the creation of the first CP.

tuuler
07/07/2014, 01:45 PM
I only see the code where the checkpoint changes from "1" to "2", but not the rest until "19".
And also paste the creation of the first CP.

Everything goes exactly the same until the ending...

Creation of the first cp:

SandkingCP[playerid][1] = CreateDynamicRaceCP(0, 333.7576,1152.8257,8.7779, 383.1623,1177.8622,8.3247, 5.0, -1, -1, playerid, 2000.0);

Siralos
07/07/2014, 02:07 PM
Just to make sure, can you put a 'return' after every line of checkpoint creation?
SandkingCP[playerid][2] = CreateDynamicRaceCP(0, 383.1623,...

return 0;

tuuler
07/07/2014, 02:15 PM
Just to make sure, can you put a 'return' after every line of checkpoint creation?
SandkingCP[playerid][2] = CreateDynamicRaceCP(0, 383.1623,...

return 0;

Nope doesnt work, when I enter first cp, it sets second CP correctly, but when I enter second cp, then it sets second cp again and again...

Siralos
07/07/2014, 02:46 PM
Maybe when creating "2", it's generating it with the same id that you had in "1", as you are destroying it.
So two options:
1) Create the next checkpoint before destroying the previous one
2) Clear the SandkingCP[playerid][X] variable after destroying the checkpoint

(Or to make sure, use both)

tuuler
07/07/2014, 03:07 PM
Maybe when creating "2", it's generating it with the same id that you had in "1", as you are destroying it.
So two options:
1) Create the next checkpoint before destroying the previous one
2) Clear the SandkingCP[playerid][X] variable after destroying the checkpoint

(Or to make sure, use both)

Now when I enter the third CP, it sets the checkpoint back to second CP, and when I enter second CP then it sets it back to third cp and continues to do that.

Siralos
07/07/2014, 03:08 PM
Now when I enter the third CP, it sets the checkpoint back to second CP, and when I enter second CP then it sets it back to third cp and continues to do that.

Did you clear the data? Or just changed order?

tuuler
07/07/2014, 03:10 PM
Did you clear the data? Or just changed order?

I changed order, I dont understand what u mean by clearing data, my english is bad :D

Siralos
07/07/2014, 03:15 PM
I changed order, I dont understand what u mean by clearing data, my english is bad :D

SandkingCP[playerid][1] = -1
SandkingCP[playerid][2] = -1

(After destroying every CP)

tuuler
07/07/2014, 03:26 PM
SandkingCP[playerid][1] = -1
SandkingCP[playerid][2] = -1

(After destroying every CP)

Nah I will just create a new mission with new style, then I know it will work fine, but thanks anyways.

Siralos
07/07/2014, 03:34 PM
Nah I will just create a new mission with new style, then I know it will work fine, but thanks anyways.

You are quite rude; I give you a solution and you reject it without even testing.