Animation and SetPlayerSkin
#1

Hello everybody, well i am making a clothing system sort of like in SinglePlayer and i ran into an issue. My issue is that when i use SetPlayerSkin, the players animation gets turned off, meaning that he gets back to his coordinates and i need him to stay behind the clothing door. Because as the animation ends and the player freezes he is behind the door, but instantly after i change his skin he appears in front of the door... Any idea on how to make him stay behind the door as at the end of the animation?
Reply
#2

Paste some code !
Reply
#3

If i redo the animation instantly after changing skin, than the player aprears outside the door againa and moves behind the door..
Reply
#4

put a line of code that will transport player to the back when he comes to the front.
Reply
#5

You have to use setplayerpos after end of first animation. No other way, setplayerskin will always refresh animation.
Reply
#6

Why cant you people just ****** and check a fucking documentation?
pawn Код:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);
Cant you see lockx an locky
Reply
#7

Quote:
Originally Posted by Rdx
Посмотреть сообщение
You have to use setplayerpos after end of first animation. No other way, setplayerskin will always refresh animation.
Well, interestingly enough for animation Clo_In and Clo_Out the coordinates of the player are outside the front door. So if i set his coordinates behind the door, than for Clo_Out(Animation where player comes out) He will start coming out from deeper that he should and he wont reach the needed spot in front of the door.

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Why cant you people just ****** and check a fucking documentation?
pawn Код:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);
Cant you see lockx an locky
Uhm, first of all why do you have to be like this? Second of all, I have already tried lockx and locky all it did is lock the player in front of the door and he was moving in one spot. These are Clo_In and Clo_Out animations that i am talking about, under library CLOTHES.
Reply
#8

Can you atleast post a single function just to see us you did the parameters right? I mean you are asking for help and not providing any codes..

Should be something like this:
Код:
ApplyAnimation(playerid, "CLOTHES", "CLO_In", 4.0999, 1, 1, 1, 1, 1, 1);
Reply
#9

I don't believe there is an efficient way around this. Changing the player's skin essentially resets the animation, so the player will briefly re-appear on their current position regardless of their current animation. In single player, the player's skin is never changed, objects are only attached to the player. That's why you never see CJ briefly appear in front of the door before he exits the dressing room.

There might be some workaround by fiddling with camera positions, player skins and positions and tampering with animations, but I highly doubt you'll get it to look flawless no matter what you try.
Reply
#10

Quote:
Originally Posted by Threshold
Посмотреть сообщение
I don't believe there is an efficient way around this. Changing the player's skin essentially resets the animation, so the player will briefly re-appear on their current position regardless of their current animation. In single player, the player's skin is never changed, objects are only attached to the player. That's why you never see CJ briefly appear in front of the door before he exits the dressing room.

There might be some workaround by fiddling with camera positions, player skins and positions and tampering with animations, but I highly doubt you'll get it to look flawless no matter what you try.
Sorry for a double post, but you see there's a server called SinglePlayer Features that does this flawlesly, i mean you couldn't tell the difference between SinglePlayer and their server. I know there a way to do this, i can figure out what is the way.. If it was possible to put only the camera for like 200ms, in a different virtual world.. So you would not see the player reappear for a second in front. Just a quick question, does SetPlayerPos refresh players animations? Because i am thinking, maybe i could set some different coordinates for those few seconds, and then when animation starts set normal coordinates.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)