TogglePlayerControllable
#1

Anyone got a code where it freezes a player, but they can still move the camera? And they cant shoot either?
Reply
#2

umm thats impossible to do that
Reply
#3

hm not really impossible... but I don't know whether something like this exists...
there would be ways to make it however I don't have time to try it out now -.-
maybe I'm trying it out tomorrow...
Reply
#4

Put him into an invisible object, he won't be able to move, but he will move his camera.
Reply
#5

Can you show code please?
Reply
#6

Have a timer that sets his position every 5 milliseconds if he try's to move
Reply
#7

I think it impossible. Why you need this?
Reply
#8

There are some animations that won't let the player move, I've never tried them, though.
Reply
#9

It's a dirty way but should work! -> Untested <-
sry for my bad english

Код:
new Float:TempPoses[MAX_PLAYERS][4]; //Tempory Save to Set Positions and get info when a player is freezed 

OnPlayerUpdate(playerid)
{
        if(TempPoses[playerid][3]==1.0)
                SetPlayerPos(playerid,TempPoses[playerid][0],TempPoses[playerid][1],TempPoses[playerid][2]);
        return 1;
}

stock FreezeNoCam(playerid,freeze=1)  //If freeze is = 1 the player get freezed, if 0 he get unfreezed
{
        GetPlayerPos(playerid,TempPoses[playerid][0],TempPoses[playerid][1],TempPoses[playerid][2]);
        TempPoses[playerid][3]=float(freeze);
	return 1;
}
Use FreezeNoCam(playerid); to freeze a player
Use FreezeNoCam(playerid,0); to unfreeze him
Reply
#10

tested now. Worked fine for me! ^^
Reply


Forum Jump:


Users browsing this thread: