TogglePlayerControllable - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: TogglePlayerControllable (
/showthread.php?tid=199494)
TogglePlayerControllable -
BlackWolf120 - 15.12.2010
hi,
after a round has been ended i want that all players are freezed and that they apply an animation.
Well thats not very hard to script but theres one problem.
I want that the players are freezed but only like they cant walk or run anymore.
But they still shall be able to lock around (if u know what i mean).
How to do that?
regards.
Re: TogglePlayerControllable -
BlackWolf120 - 15.12.2010
thx for ur answers but i think there are better solutions without the need of a timer.
I try to use minimize my amount of timers in my script.
Maybe it is possible to create a new function with stock?
Like e.g:
pawn Код:
stock TogglePlayerNotFullyControllable
{
TogglePlayerControllable(playerid,the players x coordinates movements)
TogglePlayerControllable(playerid,the players y coordinates movements)
TogglePlayerControllable(playerid,the players z coordinates movements)
//but not his facing possibility?
return 1;
}
I know this code isnt possible
but just an example, maybe u know what i wanna say
Re: TogglePlayerControllable -
Ash. - 15.12.2010
Quote:
Originally Posted by Hoborific
maybe fetch their XYZ on the animation command and then use a timer to repeatedly set it back to that xyz? maybe onplayerupdate, so it would appear they can't move. (not tested, probably better ways) but i'm putting it out there.
|
The only problem with this, is that OnPlayerUpdate is called like 100 times a second - If you did all this in OnPlayerUpdate:
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z);
}
this would get their position, then set it - This would, in affect, mean that they can still move...
They would move slower than normal though, but they will move...
Re: TogglePlayerControllable -
BlackWolf120 - 15.12.2010
well, thx for ur answer but thats not the solution im searching for.
I know that this is possible, cause i saw it on few servers
Re: TogglePlayerControllable -
BlackWolf120 - 15.12.2010
GetPlayerVelocity
Never heard of that function
well, a short visit on the wiki board should help me
thx