CreateDynamicRaceCP help.
#1

----
Reply
#2

Can you paste your 'onplayerenterdynamiccp' code?
Reply
#3

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.
Reply
#4

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.
Reply
#5

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);
Reply
#6

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

return 0;
Reply
#7

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...
Reply
#8

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)
Reply
#9

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.
Reply
#10

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?
Reply
#11

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
Reply
#12

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)