how to make player freeze when he..[Read]
#1

Look , i did that :

Quote:

else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1797.5505,-1578.8964,14.0856,100.3781)) //V.I.P Lounge
{
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 2365.81640625,-1706.4645996094,1195.725708007;
GameTextForPlayer(playerid, "~b~V.I.P Lounge", 3000, 1);
}

And it's working fine with /enter CMD and everything , but i want that when the player enter this place he freeze for 2 - 3 seconds until the objects load then he get unfrozen
Reply
#2

You need to add a timer, and
FreezePlayer(playerid)
And if the time in the timer ends the player gets unfreezed
UnfreezePlayer(playerid)
I dont know how to explain, sorry.
Reply
#3

lol can you do it in the above Codes please ?
Reply
#4

FreePlayer(playerid) what the heck is that?

It is TogglePlayerControllable(playerid,1) Freeze
and unfreeze 0.
Reply
#5

pawn Код:
stock Freeze(playerid, time)
{
    TogglePlayerControllable(playerid, false);
    SetTimerEx("Unfreeze", time * 1000, false, "i", playerid);
    return 1;
}

forward Unfreeze(playerid);
public Unfreeze(playerid)
{
    return TogglePlayerControllable(playerid, true);
}
pawn Код:
Freeze(playerid, 3); // Would freeze a player for 3 seconds, then would auto unfreeze after it
Reply
#6

k thanks
Reply
#7

http://forum.sa-mp.com/showthread.ph...ighlight=Pause this should help instead having to make a timer.
Reply
#8

Quote:
Originally Posted by Lilcuete
Посмотреть сообщение
http://forum.sa-mp.com/showthread.ph...ighlight=Pause this should help instead having to make a timer.
Oh really? This comes straight from that topic:
pawn Код:
stock Pause(playerid)
{
    TogglePlayerControllable(playerid,false);
    GameTextForPlayer(playerid, "~g~objects loading, please wait...", 5000,1);
    Loaded[playerid] = 1;
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(playerid,x,y,z+1);
    SetTimer("LoadPlayer",3100,false);

}
Notice some fishy about that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)