Animation won't play
#1

There's one animation that I want to play when someone locks their house. However, when the command is executed, the animation doesn't play.

pawn Код:
CMD:lock(playerid, params[])
{
    if(GetPVarInt(playerid, "LoggedIn") == 0) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You need to be logged in to use this command.");
    new string[128], Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    for(new i = 0; i<MAX_HOUSES; i++)
    {
        if(fexist(HousePath(i)))
        {
            if(IsPlayerInRangeOfPoint(playerid, 2, House[i][ExtPosX], House[i][ExtPosY], House[i][ExtPosZ]) || IsPlayerInRangeOfPoint(playerid, 2, House[i][IntPosX], House[i][IntPosY], House[i][IntPosZ]))
            {
                if(Player[playerid][HouseID] == House[i][hID])
                {
                    if(House[i][hLocked] == 0)
                    {
                        House[i][hLocked] = 1;
                        ApplyAnimation(playerid, "BD_FIRE", "wash_up", 4.0, 0, 0, 0, 0, 1);
                        format(string, sizeof(string), " * %s locks the door to the house.", GetName(playerid));
                        SetPlayerChatBubble(playerid, string, COLOR_LIGHTPURPLE, 10, 7000);
                        SendClientMessage(playerid, COLOR_LIGHTPURPLE, string);
                    }
                    else
                    {
                        House[i][hLocked] = 0;
                        ApplyAnimation(playerid, "BD_FIRE", "wash_up", 4.0, 0, 0, 0, 0, 1);
                        format(string, sizeof(string), " * %s unlocks the door to the house.", GetName(playerid));
                        SetPlayerChatBubble(playerid, string, COLOR_LIGHTPURPLE, 10, 7000);
                        SendClientMessage(playerid, COLOR_LIGHTPURPLE, string);
                    }
                }
                else return SendClientMessage(playerid, COLOR_GREY, "You don't own this house.");
            }
        }
    }
    return 1;
}
I have the animation library pre loaded and I even have the animation used for something else and it works fine there with no changes to ApplyAnimation. Anyone know the issue?
Reply


Messages In This Thread
Animation won't play - by DTV - 16.05.2015, 00:25
Re: Animation won't play - by Youssef221 - 16.05.2015, 10:10
Re: Animation won't play - by icra - 16.05.2015, 12:30
Re: Animation won't play - by DTV - 16.05.2015, 13:07
Re: Animation won't play - by DTV - 16.05.2015, 13:27
Re: Animation won't play - by Threshold - 16.05.2015, 14:21
Re: Animation won't play - by DTV - 16.05.2015, 15:52
Re: Animation won't play - by Threshold - 16.05.2015, 16:13
Re: Animation won't play - by DTV - 16.05.2015, 16:21
Re: Animation won't play - by Threshold - 16.05.2015, 16:24
Re: Animation won't play - by DTV - 16.05.2015, 16:29

Forum Jump:


Users browsing this thread: 5 Guest(s)