Sign in to follow this  
Followers 0
Guest stibs

Анимация с первого раза + синхронизация

1 post in this topic

Многие наверняка замечали, что анимации срабатывают ТОЛЬКО после повторого их использования. Сегодня будем исправлять данный косяк ;)

В паблик OnPlayerConnect:
 

PreloadAnimLibs(playerid);

Ко всем стокам / в конец мода:
 

stock PreloadAnimLibs(playerid) 
{ 
    static animlibs[131][] = { 
    "AIRPORT", "Attractors", "BAR", "BASEBALL", "BD_FIRE", "BEACH", "benchpress", "BF_injection", 
    "BIKED", "BIKEH", "BIKELEAP", "BIKES", "BIKES", "BIKEV", "BIKE_DBZ", "BLOWJOBZ", "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", 
    "SEX", "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"}; 
    for(new i = 0; i < 131; i++) ApplyAnimation(playerid, animlibs[i][0], "null", 0.0, 0, 0, 0, 0, 0); 
    return 1; 
}

Все, фикс готов. 

Теперь профиксим асинхронность анимаций. В a_players.inc (/pawno/include) найдите эту строку:

native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);

И замените на эту:
 

native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 1);

После этого обязательно сохраните инклуд и скомпилируйте мод. 

А на этом все.

Автор фиксов: неизвестен. 

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   You have pasted content with formatting.   Remove formatting

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

Loading...
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • warrion4ik
      By warrion4ik
      При телепорте по метке она тепает под текстуры и приходится перетелепортироваться, как это можно исправить?
      Видео: https://youtu.be/FLjer8lfGc0