ApplyAnimation & PlayerPlaySound problems
#1

Hello.
I'm doing a reload command but I have some troubles.
First is with Applying an animation. If the player doesn't move during the animation he will be freeze. The function is working anyway.
PHP код:
forward noAnim(playerid);
public 
noAnim(playerid)
{
    if(
crounch(playerid)) ApplyAnimation(playerid"PED""GUNCROUCHFWD"4.1000011), SCM(playerid, -1"crounch");
    else 
ApplyAnimation(playerid"PED""IDLE_STANCE"4.1000011), SCM(playerid, -1"not crounch");
    
SCM(playerid, -1"noAnim - Done");
    
    
/*
    ApplyAnimation(playerid, "PED", "IDLE_STANCE", 4.1, 0, 0, 0, 0, 1, 1) // Debout
    ApplyAnimation(playerid, "PED", "WEAPON_CROUCH", 4.1, 0, 0, 0, 0, 1, 1) // Crounch
    ApplyAnimation(playerid, "PED", "GUNCROUCHFWD", 4.1, 0, 0, 0, 0, 1, 1) // Crounch
    */
    
return 1;

The second is with PlayerPlaySound. Just, there is no sound..
PHP код:
PlayerPlaySound(playerid36401000); 
Have you other sound ID for reloading weapons?
Thanks for your help.
Reply
#2

else ClearPlayerAnimation(playerid)
Reply
#3

This is not what I want.
Reply
#4

SetTimerEx("StopAnim", 3000, false, "i", playerid);

public StopAnim(playerid)
{
ClearAnimations(playerid);
return 1;
}
Reply
#5

Like I said, I dont' want to use ClearAnimations(..).
Код:
Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ).
It's why I don't want to use it.
Reply
#6

i use this:
PHP код:
COMMAND:clear(playerid)
{
    
ApplyAnimation(playerid"CARRY""crry_prtial"1.000000);
    return 
1;

this animation cancels every other animations
Reply
#7

Quote:
Originally Posted by justjamie
Посмотреть сообщение
i use this:
PHP код:
COMMAND:clear(playerid)
{
    
ApplyAnimation(playerid"CARRY""crry_prtial"1.000000);
    return 
1;

this animation cancels every other animations
Perfect. +repped.

Sound problem solved.
PHP код:
PlayerPlaySound(playerid36401000); 
I put this everywhere instead of
PHP код:
PlayerPlaySound(playerid364010.00.00.0); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)