[HELP]How to fix checkpoints
#1

I have a custom interior, but adding checkpoints is like impossible.


If you teleport to a spot into the interior, you fall through it. How can i fix this?


I know theres a way because on a server i play, there use to be a problem telporting into a custom interior because you'd fall through the ground, but he fixed it by doing something that made you teleport back to the spot if you fell through the ground
Reply
#2

the custom interior-teleport problem could be caused by the streamer: if the timer (500 ms maybe) is too low to spawn the objects (floor), then you will fall through it. so a position check is done, thats the only way to ensure you wont fall through 2 or 3 times.
btw: a simple timer of few seconds will solve that: TogglePlayerControllable(playerid,0) to freeze player for 2 seconds at teleport target, and the player wont fall anymore while the interior is being built, start a non-looping SetTimerEx() to let the timer call the TogglePlayerControllable(playerid,1) to unfreeze...
Reply
#3

I see where your going at, But im not the greatest scripter in the world. Can you give me an example? I'm using the plugin streamer.
Reply
#4

Anyone...
Reply
#5

alright heres a little example of the timer, you have to tweak it abit to make it perfectly fit in your GM.

Код:
at the OnPlayerEnterCheckPoint
{
	SetPlayerPos(playerid, X, Y, Z);
	SetPlayerFacingAngle(playerid, A);
	TogglePlayerControllable(playerid, 1);
	SetTimerEx("UnfreezeTimer", 3000, 0, "i", playerid);
	return 1;
}
then somewhere in your GM:
Код:
forward UnfreezeTimer(playerid);
Код:
public UnfreezeTimer(playerid)
{
	TogglePlayerControllable(playerid, 0);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)