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



CreateDynamicCP - ahmedraed - 10.12.2015

why CreateDynamicCP doesn't work fine with me?!
Quote:

CreateDynamicCP(215.4474,1822.8730,6.4141, 5, -1, -1, -1, 100);

when i join i cant find the checkpoint...


Re: CreateDynamicCP - Jstylezzz - 11.12.2015

You have to toggle the checkpoint using
Code:
native TogglePlayerDynamicCP(playerid, STREAMER_TAG_CP checkpointid, toggle);
Streamer topic with reference


Re: CreateDynamicCP - ahmedraed - 11.12.2015

i've put it at the end of the gm and i got error that it is already defineded
Quote:

symbol already defined: "TogglePlayerDynamicCP"




Re: CreateDynamicCP - Jstylezzz - 11.12.2015

You shouldn't copy paste the actual code I put there, it was to show which function you should use. If you want to show the CP when you spawn, you should use the function under OnPlayerSpawn.


Re: CreateDynamicCP - ahmedraed - 12.12.2015

Quote:

CP[Area51] = CreateDynamicCP(215.4474,1822.8730,6.4141, 5, -1, -1, -1, 100);
TogglePlayerDynamicCP(playerid, Area51, 1);

like this?!! nope,not working


Re: CreateDynamicCP - ahmedraed - 14.12.2015

bump


Re: CreateDynamicCP - IzadorO - 15.12.2015

Use OnPlayerEnterDynamicCP and SetPlayerCheckpoint, as SetPlayerCheckpoint still has to be used.


Re: CreateDynamicCP - ahmedraed - 15.12.2015

i wanna use CreateDynamicCP not setplayercheckpoint


Re: CreateDynamicCP - Sheperc - 16.12.2015

Code:
CreateDynamicCP(215.4474,1822.8730,6.4141, 5, 0, -1, playerid, 100);
place this under OnPlayerConnect


Re: CreateDynamicCP - Jstylezzz - 16.12.2015

Look at the checkpointID you gave to the toggle function. It is not the same as the one you created above it. The one you created is
Code:
CP[Area51]
And yet you use

Code:
Area51
inside the toggle function. Should be like this
Code:
CP[Area51] = CreateDynamicCP(215.4474,1822.8730,6.4141, 5, -1, -1, -1, 100);
TogglePlayerDynamicCP(playerid, CP[Area51], 1);
Always be sure to double check these things.