[HELP]How to fix checkpoints - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]How to fix checkpoints (
/showthread.php?tid=130463)
[HELP]How to fix checkpoints -
ruckfules99 - 27.02.2010
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
Re: How to fix checkpoints -
Babul - 27.02.2010
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...
Re: How to fix checkpoints -
ruckfules99 - 27.02.2010
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.
Re: How to fix checkpoints -
ruckfules99 - 27.02.2010
Anyone...
Re: [HELP]How to fix checkpoints -
notime - 27.02.2010
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;
}