SA-MP Forums Archive
Why is my Checkpoint not appearing in-game? - 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: Why is my Checkpoint not appearing in-game? (/showthread.php?tid=606097)



Why is my Checkpoint not appearing in-game? - UnholyBeast - 29.04.2016

Alright. I'm trying to set up a checkpoint right in front of the spawn point I have set so I can start scripting a robbery system, but of course. I am having issues with the checkpoint. I'll show every bit that I used to use the checkpoint.

Код:
//New Defines//
new TestRobberyCP;

public OnPlayerSpawn(playerid)
{
	TestRobberyCP = CreateDynamicCP(2025.4181, 1343.2915, 10.8203, 3, -1, -1, -1, 100.0);
	return 1;
}

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
	if(checkpointid == TestRobberyCP)
	{
		SendMessage(playerid, COLOR_ORANGE, "Use /robshop to being the robbery.");
	}
	return 1;
}
That is all I have for the checkpoint right now. I just wanted to in-game and see if that message would appear when I stepped into the checkpoint, and that is when I found out my checkpoint was not appearing in-game.

In the console. It says "CreateDynamicCP: Expecting 8 Parameters, but found 9."


Re: Why is my Checkpoint not appearing in-game? - Lordzy - 29.04.2016

I don't see anything wrong with your code currently, such a message in your console sounds strange. Try updating and recompile your gamemode with latest streamer version.


Re: Why is my Checkpoint not appearing in-game? - slipnkit - 29.04.2016

Did you tried to update streamer? Also use IsValidDynamicCP to check CP. And add some debugs there.


Re: Why is my Checkpoint not appearing in-game? - UnholyBeast - 29.04.2016

When I use the latest version of streamer. The plugin won't load. I have to use a different version.


Re: Why is my Checkpoint not appearing in-game? - Vince - 29.04.2016

If you create a dynamic entity in front of the player you must explicitly call Streamer_Update otherwise the entity won't show until the player leaves and then re-enters the area, due to the way the streamer works.

Also be aware that you are creating a new checkpoint every time a player spawns. Create the checkpoint in OnGameModeInit or OnFilterScriptInit. That also solves aforementioned problem.


Re: Why is my Checkpoint not appearing in-game? - UnholyBeast - 29.04.2016

Thanks for the tip, and the issue is solved. I was talking with Crayder on Skype about another issue I was having and he was so kind to help me with one. :P