TogglePlayerControllable
#1

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.
Reply
#2

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
Reply
#3

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...
Reply
#4

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
Reply
#5

GetPlayerVelocity
Never heard of that function
well, a short visit on the wiki board should help me
thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)