how to freeze a player?
#1

hey everyone i am using streamer plugin but now when i teleport to somewhere like /drag the objects load little bit slowlier then the player so u fall down in the water but now i thought i can freeze the polayer for 1 or 2 seconds but how to make it in a command? i searched in pawno but could find a code for it so pls help me for the version 1.2 of my drifting gamemode
Reply
#2

TogglePlayerControllable
Reply
#3

but how to put a timer on it for like 1 or 2 seconds?
Reply
#4

here is it
PHP код:
forward Unfreeze(playerid);
CMD:drag(playeridparams[]) {
TogglePlayerControllable(playerid0);
SetTimerEx("Unfreeze"20000"d"playerid);
return 
1;
}
public 
Unfreeze(playerid) {
TogglePlayerControllable(playerid1);
return 
1;

Reply
#5

Or:

pawn Код:
stock SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, UNFREEZE_DELAY){

    SetTimerEx("Unfreeze", UNFREEZE_DELAY, false, "i", playerid);
    TogglePlayerControllable(playerid, false);
    return SetPlayerPos(playerid, x, y, z);
}

forward Unfreeze(thePlayer);
public  Unfreeze(thePlayer){

    TogglePlayerControllable(playerid, true);
    return true;
}
Reply
#6

eehm.... where to place all this? XD
Reply
#7

Quote:
Originally Posted by niels44
Посмотреть сообщение
eehm.... where to place all this? XD
lol this is simple: ofcourse SetPlayerControllable ...

pawn Код:
SetPlayerControllable(playerid,0);
Reply
#8

ShoObjects xD

http://solidfiles.com/d/283b/
Reply
#9

Quote:
Originally Posted by niels44
Посмотреть сообщение
eehm.... where to place all this? XD
Simple, for the first solution which was posted by LzLo, put the forward in the top portion of your script. And of course the command itself doesn't go under any callback, so itself is alone. Then the public unfreeze callback is yet another callback, so add it to the bottom of your script. So basically you won't be adding anything under any callback for this.

Don't forget to +rep people who helped u
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)