Animations don't work !
#1

Hey, I've a problem in animations:
pawn Код:
CMD:blowjobz(playerid, params[])
{
    new id;
    if(!sscanf(params, "i", id))
    {
        if(id == 0) {ApplyAnimation(playerid, "SEX", "SEX_1_W", 4.1, 0, 1, 1, 1, 1, 1);}
        if(id == 1) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_W",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 2) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_END_W",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 3) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_START_P",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 4) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_P",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 5) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_END_P",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 6) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_START_W",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 7) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_W",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 8) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_END_W",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 9) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_START_P",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 10) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_P",4.1,0, 1, 1, 1, 1, 1);}
        if(id == 11) {ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_END_P",4.1,0, 1, 1, 1, 1, 1);}
        else ClearAnimations(playerid);
    }
    return 1;
}
And none of these animations don't work except reseting players face to default. Solutions?
Reply
#2

Parameters:
Quote:

(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)

You've got it set to 1.
Quote:

Timer in milliseconds. For a never-ending loop it should be 0.

So the whole animation is done within 1 millisecond. Try setting it to something like 1000 or 5000.

1000ms = 1 second
Reply
#3

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
Parameters:


You've got it set to 1.


So the whole animation is done within 1 millisecond. Try setting it to something like 1000 or 5000.

1000ms = 1 second
I set it to 6000, but still the same
Reply
#4

pawn Код:
CMD:blowjobz(playerid, params[])
{
    new id;
    if(!sscanf(params, "i", id))
    {
        switch(id)
        {
            case 0: ApplyAnimation(playerid, "SEX", "SEX_1_W", 4.1, 1, 1, 1, 1, 6000, 1);
            case 1: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_W", 4.1, 0, 1, 1, 1, 6000, 1);
            case 2: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_END_W", 4.1, 0, 1, 1, 1, 6000, 1);
            case 3: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_START_P", 4.1, 0, 1, 1, 1, 6000, 1);
            case 4: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_P", 4.1, 1, 1, 1, 1, 6000, 1);
            case 5: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_COUCH_END_P", 4.1, 1, 1, 1, 1, 6000, 1);
            case 6: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_START_W", 4.1, 1, 1, 1, 1, 6000, 1);
            case 7: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_W", 4.1, 1, 1, 1, 1, 6000, 1);
            case 8: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_END_W", 4.1, 1, 1, 1, 1, 6000, 1);
            case 9: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_START_P", 4.1, 1, 1, 1, 1, 6000, 1);
            case 10: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_P", 4.1, 1, 1, 1, 1, 6000, 1);
            case 11: ApplyAnimation(playerid, "BLOWJOBZ", "BJ_STAND_END_P", 4.1, 1, 1, 1, 1, 6000, 1);
            default: ClearAnimations(playerid);
        }
    }
    return 1;
}
Make sure you have Preloaded the animations as well.

pawn Код:
public OnPlayerSpawn(playerid)
{
    PreloadAnimLib(playerid, "BOMBER");
    PreloadAnimLib(playerid, "RAPPING");
    PreloadAnimLib(playerid, "SHOP");
    PreloadAnimLib(playerid, "BEACH");
    PreloadAnimLib(playerid, "SMOKING");
    PreloadAnimLib(playerid, "FOOD");
    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, "PED");
    return 1;
}
Then at the bottom of your script:
pawn Код:
PreloadAnimLib(playerid, animlib[]) ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0);
Reply


Forum Jump:


Users browsing this thread: