Freezing a player on /enter.
#1

I have the object streamer, but the objects won't load so fast with it. I want when I write /enter it would freeze me for like 4 seconds for the objects to load.
I've tried one time, but for me it worked, but for the other player entering he freezed, but didn't even get unfreezed.
Please help, here's my /enter code:

pawn Код:
else if (PlayerToPoint(2.0, playerid, 1173.2563,-1323.3102,15.3943)) // hospital
{
    SetPlayerPos(playerid, 1189.6974,-1337.5695,1384.0446);
}
Reply
#2

You can use this.
Reply
#3

Holy shit okay. Even less work lol.
Reply
#4

Yeah, I agree the include is poorly scripted, maybe I can actually just help you.

What you'll need to do is temporarily freeze the player then unfreeze them with a timer - in your code I see nothing of that nature yet.

So here's what you should do:

Add this to your /enter code:
pawn Код:
TogglePlayerControllable(playerid, false);
// You can't use forwarded natives in SetTimer(Ex), so we'll have to create a public to wrap the function
SetTimerEx("_TogglePlayerControllable", 3000, false, "d", playerid);
Add this outside of any other code:
pawn Код:
public _TogglePlayerControllable(playerid, control) {
   TogglePlayerControllable(playerid, control);
   return 1;
}
You might want to add some kind of gametext though.
Reply
#5

I got it, I'll test first if the 'Load' include works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)