SA-MP Forums Archive
Timer on Freezing - 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: Timer on Freezing (/showthread.php?tid=147570)



Timer on Freezing - MarcusX - 13.05.2010

Alright well here's the problem. We have a custom interior when you enter you fall through the floor.

If I did createobject would it make it load automatically? Just the flooring on the interior.

Or is there a way when you do is /enter it'll freeze you inside where it puts you for like 3 seconds?


Re: Timer on Freezing - MWF2 - 13.05.2010

Use https://sampwiki.blast.hk/wiki/Function:...erControllable


and

https://sampwiki.blast.hk/wiki/SetTimerEx


Re: Timer on Freezing - MarcusX - 13.05.2010

Can you show me a basic example?


Re: Timer on Freezing - MisterTickle - 13.05.2010

Example:

Код:
dcmd_enter(playerid, params[])
{

if (PlayerInfo[playerid][pLogged] == 0) return SendClientMessage(playerid,COLOR_SYSTEM ,"Not Logged In");
for(new i = 0; i < MAX_MARCUSISCUTE; i++) {
if(IsPlayerInRangeOfPoint(playerid, 2.0, Marcus[i][EnterX], Marcus[i][EnterY]+2, Marcus[i][EnterZ])) {
TogglePlayerControllable(playerid, 0);
SetTimerEx("Reset", 3000, 0, "i", playerid);
SetPlayerPos(playerid,Marcus[i][ExitX],Marcus[i][ExitY],Marcus[i][ExitZ]);
}
}
return 1;
}
Код:
public Reset(playerid)
{
TogglePlayerControllable(playerid, 1);
}



Re: Timer on Freezing - MarcusX - 13.05.2010

Love you tickle