ApplyActorAnimation
#1

In what problm?
PHP код:
new MyActor
PHP код:
public OnGameModeInit(){
    
MyActor CreateActor(27637.7460830.8143, -42.96090.0);
    
PreloadActorAnimations(MyActor);
    
ApplyActorAnimation(MyActor"DEALER""Dealer_idle"4.110000);
    return 
1;

PHP код:
static s_AnimationLibraries[][] = {
    !
"AIRPORT",    !"ATTRACTORS",   !"BAR",            !"BASEBALL",
    !
"BD_FIRE",    !"BEACH",        !"BENCHPRESS",        !"BF_INJECTION",
    !
"BIKED",      !"BIKEH",        !"BIKELEAP",        !"BIKES",
    !
"BIKEV",      !"BIKE_DBZ",     !"BMX",            !"BOMBER",
    !
"BOX",        !"BSKTBALL",     !"BUDDY",            !"BUS",
    !
"CAMERA",     !"CAR",          !"CARRY",            !"CAR_CHAT",
    !
"CASINO",     !"CHAINSAW",     !"CHOPPA",            !"CLOTHES",
    !
"COACH",      !"COLT45",       !"COP_AMBIENT",        !"COP_DVBYZ",
    !
"CRACK",      !"CRIB",         !"DAM_JUMP",        !"DANCING",
    !
"DEALER",     !"DILDO",        !"DODGE",            !"DOZER",
    !
"DRIVEBYS",   !"FAT",          !"FIGHT_B",            !"FIGHT_C",
    !
"FIGHT_D",    !"FIGHT_E",      !"FINALE",          !"FINALE2",
    !
"FLAME",      !"FLOWERS",      !"FOOD",            !"FREEWEIGHTS",
    !
"GANGS",      !"GHANDS",       !"GHETTO_DB",        !"GOGGLES",
    !
"GRAFFITI",   !"GRAVEYARD",    !"GRENADE",          !"GYMNASIUM",
    !
"HAIRCUTS",   !"HEIST9",       !"INT_HOUSE",        !"INT_OFFICE",
    !
"INT_SHOP",   !"JST_BUISNESS", !"KART",            !"KISSING",
    !
"KNIFE",      !"LAPDAN1",      !"LAPDAN2",          !"LAPDAN3",
    !
"LOWRIDER",   !"MD_CHASE",     !"MD_END",          !"MEDIC",
    !
"MISC",       !"MTB",          !"MUSCULAR",        !"NEVADA",
    !
"ON_LOOKERS", !"OTB",          !"PARACHUTE",        !"PARK",
    !
"PAULNMAC",   !"PED",          !"PLAYER_DVBYS",    !"PLAYIDLES",
    !
"POLICE",     !"POOL",         !"POOR",            !"PYTHON",
    !
"QUAD",       !"QUAD_DBZ",     !"RAPPING",          !"RIFLE",
    !
"RIOT",       !"ROB_BANK",     !"ROCKET",          !"RUSTLER",
    !
"RYDER",      !"SCRATCHING",   !"SHAMAL",          !"SHOP",
    !
"SHOTGUN",    !"SILENCED",     !"SKATE",           !"SMOKING",
    !
"SNIPER",     !"SPRAYCAN",     !"STRIP",           !"SUNBATHE",
    !
"SWAT",       !"SWEET",        !"SWIM",            !"SWORD",
    !
"TANK",       !"TATTOOS",      !"TEC",             !"TRAIN",
    !
"TRUCK",      !"UZI",          !"VAN",             !"VENDING",
    !
"VORTEX",     !"WAYFARER",     !"WEAPONS",            !"WUZI",
    !
"WOP",        !"GFUNK",        !"RUNNINGMAN"
}; 
PHP код:
stock static PreloadActorAnimations(actorid){
    for(new 
0sizeof(s_AnimationLibraries); ++){
        
ApplyActorAnimation(actorids_AnimationLibraries[i], "null"0.000000);
    }

Reply
#2

what seems to be your problem?
Reply
#3

Does ApplyAnimation accept packed strings? Don't they need to be unpacked, first?
Reply
#4

Quote:
Originally Posted by xTURBOx
Посмотреть сообщение
what seems to be your problem?
ApplyAnimation absent.
Quote:
Originally Posted by Vince
Посмотреть сообщение
Does ApplyAnimation accept packed strings? Don't they need to be unpacked, first?
Didn't understand.
Reply
#5

Quote:
Originally Posted by BossArturKA
Посмотреть сообщение
Didn't understand.
Putting ! behind a string makes them packed.
Either remove the ! or unpack (strunpack) the string before using it.
Reply
#6

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Putting ! behind a string makes them packed.
Either remove the ! or unpack (strunpack) the string before using it.
Problem in synchronization of the "actor" <=> "player".
If to cause "ApplyActorAnimation" near "Actor" - everything works.
PHP код:
cmd:test(playeridparams[]){
    
ApplyActorAnimation(MyActor"DEALER""Dealer_idle"4.110000);
    return 
1;

Reply
#7

Quote:
Originally Posted by BossArturKA
Посмотреть сообщение
Problem in synchronization of the "actor" <=> "player".
If to cause "ApplyActorAnimation" near "Actor" - everything works.
PHP код:
cmd:test(playeridparams[]){
    
ApplyActorAnimation(MyActor"DEALER""Dealer_idle"4.110000);
    return 
1;

The problem regarding actors is well known. They sometimes sync away from the objects, sometimes don't get their anim applied etc. What you can do is set a timer of 2-3 mins to respawn all actors and re-apply animation or simply run a 60 sec timer to re-apply animations on them, that way they will re-sync if there is someone near them every 60 sec.


Quote:
Originally Posted by Vince
Посмотреть сообщение
Does ApplyAnimation accept packed strings? Don't they need to be unpacked, first?
Yeah you can do it with packed strings.
Reply
#8

Listen it's A Problem That Sometimes The Animination Don't Work Try Using The Same Animination Again Like Make 2 Actors And make 2 animinations and you will see that one will work and the other animination don't work
Reply
#9

Quote:
Originally Posted by CarRamper
Посмотреть сообщение
Listen it's A Problem That Sometimes The Animination Don't Work Try Using The Same Animination Again Like Make 2 Actors And make 2 animinations and you will see that one will work and the other animination don't work
I caused Animination 3 times on 1 actor, Animination wasn't applied.
Reply
#10

Example of a fix [Пример фикса]: http://pastebin.com/76vhaiuT
Topic [Тема:] https://sampforum.blast.hk/showthread.php?pid=3716869#pid3716869
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)