CreateDynamicRaceCP help. -
tuuler - 07.07.2014
----
Respuesta: CreateDynamicRaceCP help. -
Siralos - 07.07.2014
Can you paste your 'onplayerenterdynamiccp' code?
Re: Respuesta: CreateDynamicRaceCP help. -
tuuler - 07.07.2014
Quote:
Originally Posted by Siralos
Can you paste your 'onplayerenterdynamiccp' code?
|
Why would you need that if I am using CreateDynamicRaceCP? Everything what you need is here.
Respuesta: CreateDynamicRaceCP help. -
Siralos - 07.07.2014
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.
Re: Respuesta: CreateDynamicRaceCP help. -
tuuler - 07.07.2014
Quote:
Originally Posted by Siralos
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:
pawn Код:
SandkingCP[playerid][1] = CreateDynamicRaceCP(0, 333.7576,1152.8257,8.7779, 383.1623,1177.8622,8.3247, 5.0, -1, -1, playerid, 2000.0);
Respuesta: CreateDynamicRaceCP help. -
Siralos - 07.07.2014
Just to make sure, can you put a 'return' after every line of checkpoint creation?
SandkingCP[playerid][2] = CreateDynamicRaceCP(0, 383.1623,...
return 0;
Re: Respuesta: CreateDynamicRaceCP help. -
tuuler - 07.07.2014
Quote:
Originally Posted by Siralos
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...
Respuesta: CreateDynamicRaceCP help. -
Siralos - 07.07.2014
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)
Re: Respuesta: CreateDynamicRaceCP help. -
tuuler - 07.07.2014
Quote:
Originally Posted by Siralos
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.
Respuesta: Re: Respuesta: CreateDynamicRaceCP help. -
Siralos - 07.07.2014
Quote:
Originally Posted by tuuler
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?
Re: Respuesta: Re: Respuesta: CreateDynamicRaceCP help. -
tuuler - 07.07.2014
Quote:
Originally Posted by Siralos
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
Respuesta: Re: Respuesta: Re: Respuesta: CreateDynamicRaceCP help. -
Siralos - 07.07.2014
Quote:
Originally Posted by tuuler
I changed order, I dont understand what u mean by clearing data, my english is bad
|
SandkingCP[playerid][1] = -1
SandkingCP[playerid][2] = -1
(After destroying every CP)