SA-MP Forums Archive
Help with a camera system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with a camera system (/showthread.php?tid=591445)



Help with a camera system - JimGorecky - 12.10.2015

Hello, I wonder how it would freeze
a player, I mean freezing the keys, you can not walk or move
and if you can move the camera, move the mouse, it was decided to create an object and the object spec, but I wonder if there would be another way without the need to use the object.


Re: Help with a camera system - Kayla_Swade - 12.10.2015

Use TogglePlayerControlable(playerid, false);


Re: Help with a camera system - Kayla_Swade - 12.10.2015

and TogglePlayerSpectating(playerid, true);


Код:
Please REP+



Re: Help with a camera system - Threshold - 12.10.2015

You can use ApplyAnimation. It has a 'loop' parameter, so you can alternatively freeze the player in an 'idle' animation. (They appear to be standing still, but they cannot move around and can still rotate the camera)
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
Something like this:
pawn Код:
ApplyAnimation(playerid, "ped", "IDLE_stance", 4.1, 1, 1, 1, 0, 0, 1);
Note, any form of ClearAnimations or any other animations may override this animation and allow the player to break the animation. Thus being able to move around again.