Why is my Checkpoint not appearing in-game?
#1

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."
Reply
#2

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

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

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)