Most of my Animations don't work?
#1

pawn Код:
PreloadAnimLib(playerid,"BOMBER");
                PreloadAnimLib(playerid,"RAPPING");
                PreloadAnimLib(playerid,"SHOP");
                PreloadAnimLib(playerid,"BEACH");
                PreloadAnimLib(playerid,"SMOKING");
                PreloadAnimLib(playerid,"ON_LOOKERS");
                PreloadAnimLib(playerid,"DEALER");
                PreloadAnimLib(playerid,"CRACK");
                PreloadAnimLib(playerid,"CARRY");
                PreloadAnimLib(playerid,"COP_AMBIENT");
                PreloadAnimLib(playerid,"PARK");
                PreloadAnimLib(playerid,"INT_HOUSE");
                PreloadAnimLib(playerid,"FOOD");
                PreloadAnimLib(playerid,"GANGS");
                PreloadAnimLib(playerid,"PED");
                PreloadAnimLib(playerid,"FAT");
This is under OnPlayerConnect.

Some of the commands...
pawn Код:
CMD:reload(playerid, params[])
{
    if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOUR_GREY, "You can only use this animation while on foot.");
    ApplyAnimation(playerid, "PYTHON", "python_reload", 4.0, 0, 0, 0, 0, 1);
    SendClientMessage(playerid, COLOUR_GREY, "Use /stopanim to stop the animation.");
    Animation[playerid] = 1;
    return 1;
}
CMD:cpr(playerid, params[])
{
    if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOUR_GREY, "You can only use this animation while on foot.");
    ApplyAnimation(playerid, "MEDIC", "CPR", 4.0, 0, 0, 0, 0, 1);
    SendClientMessage(playerid, COLOUR_GREY, "Use /stopanim to stop the animation.");
    Animation[playerid] = 1;
    return 1;
}
CMD:dive(playerid, params[])
{
    if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOUR_GREY, "You can only use this animation while on foot.");
    ApplyAnimation(playerid, "DODGE", "Crush_Jump", 4.0, 0, 1, 1, 1, 1);
    SendClientMessage(playerid, COLOUR_GREY, "Use /stopanim to stop the animation.");
    Animation[playerid] = 1;
    return 1;
}
CMD:tag(playerid, params[])
{
    if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOUR_GREY, "You can only use this animation while on foot.");
    ApplyAnimation(playerid, "GRAFFITI", "graffiti_Chkout", 4.0, 0, 0, 0, 0, 1);
    SendClientMessage(playerid, COLOUR_GREY, "Use /stopanim to stop the animation.");
    Animation[playerid] = 1;
    return 1;
}
CMD:fu(playerid, params[])
{
    if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOUR_GREY, "You can only use this animation while on foot.");
    ApplyAnimation(playerid, "PED", "fucku", 4.0, 0, 0, 0, 0, 1);
    SendClientMessage(playerid, COLOUR_GREY, "Use /stopanim to stop the animation.");
    Animation[playerid] = 1;
    return 1;
}
These are some I know don't work at all.
Reply
#2

Add them under OnPlayerCommandText.
Reply
#3

I'm not sure that's the issue? I use zCMD.
Reply
#4

It's because you don't pre-load those but some others only.

pawn Код:
PreloadAnimLib(playerid, "PYTHON");
PreloadAnimLib(playerid, "MEDIC");
PreloadAnimLib(playerid, "DODGE");
PreloadAnimLib(playerid, "GRAFFITI");
PreloadAnimLib(playerid, "PED");
Quote:
Originally Posted by [vTc]Patroool
Посмотреть сообщение
Add them under OnPlayerCommandText.
He uses zcmd, why would he do that?
Reply
#5

I'm afraid that didn't do it.
Reply
#6

Try applying the animation twice.
Reply
#7

Yeah i know he is using zCMD.

He added those cmd(s) under OnPlayerConnect.
But let's give a try, Add those cmd(s) under OnPlayerCommandText.
Reply
#8

I'm not sure pre-loading the animations under OnPlayerConnect works properly does it?
(And like Kont said, all the animations that you are doing with the commands are the ones that are not preloaded )

Ever since I played it under OnPlayerSpawn, I haven't had an issue with animations.
Reply
#9

the commands are outside any callbacks. Thanks guys for the help! I'll update if its fixed.
Reply
#10

Preload in OnPlayerSpawn()
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)