Freeze entering
#1

Hello,
I want ask if you have some [fs] when i enter in some Intrior its freeze me for 3-4 sec or black screen something
like that

Thanks to helper's
Reply
#2

This callback will help you.

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

Also, when the callback is called you should freeze the player with

pawn Код:
TogglePlayerControllable(playerid, 0);
and put a timer to unfreeze

pawn Код:
TogglePlayerControllable(playerid, 1);
the player.

EDIT: Help for timers:

https://sampwiki.blast.hk/wiki/SetTimer
Reply
#3

Thanks
Reply
#4

Here is the timer :
pawn Код:
public OnPlayerInteriorChange(...)
{
     TogglePlayerControllable(playerid,0);
     SetTimerEx("Unfreeze",3000,false,"i",playerid);//Change 3000 with whatever you want
     return 1;
}

public Unfreeze(playerid)
{
     TogglePlayerControllable(playerid,1);
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)