Добро пожаловать на Pro Pawn - Портал о PAWN-скриптинге.

Реклама


**Как получить V.I.P** (Перейти)
Чтобы заказать рекламу на Pro-Pawn.Ru, обращайтесь в Skype.
Баннерная реклама 200руб/мес, Текстовая 100руб/мес.
Страница 1 из 4 123 ... ПоследняяПоследняя
Показано с 1 по 10 из 38
  1. #1
    Аватар для P!ncho
    Пользователь

    Статус
    Оффлайн
    Регистрация
    19.05.2013
    Сообщений
    30
    Репутация:
    12 ±

    Прогрузка анимации.

    Здравствуйте пользователи портала Pro-Pawn.
    Думаю все сталкивались с такой проблемой, когда вводишь какую-либо команду, например: /s (Кричать), текст выходит, а анимация с первого раза не показалась.
    При помощи этого кода, мы исправляем эту проблему, то есть теперь любая анимация которая есть в Samp будет действовать с первого ввода команды или чего либо.



    В OnPlayerSpawn
    PHP код:
    if(!GetPVarInt(playerid"Animations")) PreloadAnimLib(playerid); 
    Конец мода
    PHP код:
    stock PreloadAnimLib(playerid)
    {
        
    ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"RAPPING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ON_LOOKERS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PARK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"INT_HOUSE","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRIB","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ROB_BANK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"JST_BUISNESS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0);
        
    SetPVarInt(playerid"Animations"1);

    Ну вот и всё, мы успешно сделали прогрузку анимаций.
    Доработчик: DeimoS

  2. #2
    Аватар для Mike
    Пользователь

    Статус
    Оффлайн
    Регистрация
    05.05.2013
    Адрес
    Москва
    Сообщений
    160
    Репутация:
    15 ±
    Молодец!

  3. #3
    Аватар для P!ncho
    Пользователь

    Статус
    Оффлайн
    Регистрация
    19.05.2013
    Сообщений
    30
    Репутация:
    12 ±
    Цитата Сообщение от Mike Посмотреть сообщение
    Молодец!
    Благодарю.

  4. #4
    Аватар для Takeshi
    Пользователь

    Статус
    Оффлайн
    Регистрация
    23.05.2013
    Адрес
    Нижнекамск
    Сообщений
    18
    Репутация:
    -1 ±
    Полезная тема!Молодец!

  5. #5
    Аватар для wAx
    ¯\_(ツ)_/¯

    Статус
    Оффлайн
    Регистрация
    13.12.2013
    Сообщений
    375
    Репутация:
    144 ±
    PHP код:
    #define PreloadAnimLib(%1, %2) ApplyAnimation(%1, %2, "null",0.0,0,0,0,0,0) 
    Не?

  6. #6
    Аватар для DeimoS
    Модератор?

    Статус
    Оффлайн
    Регистрация
    27.01.2014
    Адрес
    Восточный Мордор
    Сообщений
    3,931
    Репутация:
    1502 ±
    OnPlayerSpawn
    PHP код:
    if(!GetPVarInt(playerid"Animations")) PreloadAnimLib(playerid); 
    Конец мода
    PHP код:
    stock PreloadAnimLib(playerid)
    {
        
    ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"RAPPING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ON_LOOKERS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PARK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"INT_HOUSE","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRIB","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ROB_BANK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"JST_BUISNESS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0);
        
    SetPVarInt(playerid"Animations"1);

    Не?
    Связаться со мной можно в личных сообщениях этой группы

    Широко известно, что идеи стоят 0.8333 цента каждая (исходя из рыночной цены 10 центов за дюжину).
    Великих идей полно, на них нет спроса.
    Воплощение идеи в законченную игру требует долгой работы,
    таланта, терпения и креативности, не говоря уж о затратах денег, времени и ресурсов.
    Предложить идею просто, воплотить – вот в чём проблема

    Steve Pavlina

  7. 3 пользователя(ей) сказали cпасибо:
    BaBuIIIkaDrifteR (13.03.2015)Jeff_Monson (16.03.2014)wAx (08.03.2014)
  8. #7
    Аватар для Seregamil
    Проверенный

    Статус
    Оффлайн
    Регистрация
    21.11.2013
    Сообщений
    560
    Репутация:
    272 ±
    Цитата Сообщение от DeimoS Посмотреть сообщение
    OnPlayerSpawn
    PHP код:
    if(!GetPVarInt(playerid"Animations")) PreloadAnimLib(playerid); 
    Конец мода
    PHP код:
    stock PreloadAnimLib(playerid)
    {
        
    ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"RAPPING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ON_LOOKERS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PARK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"INT_HOUSE","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRIB","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ROB_BANK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"JST_BUISNESS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0);
        
    SetPVarInt(playerid"Animations"1);

    Не?
    PHP код:
    public OnPlayerSpawn(playerid){
    ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"RAPPING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ON_LOOKERS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PARK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"INT_HOUSE","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRIB","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ROB_BANK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"JST_BUISNESS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0);
        return 
    true;

    не?

  9. 2 пользователя(ей) сказали cпасибо:
    DeimoS (07.03.2014)wAx (08.03.2014)
  10. #8
    Аватар для DeimoS
    Модератор?

    Статус
    Оффлайн
    Регистрация
    27.01.2014
    Адрес
    Восточный Мордор
    Сообщений
    3,931
    Репутация:
    1502 ±
    Цитата Сообщение от Seregamil Посмотреть сообщение
    PHP код:
    public OnPlayerSpawn(playerid){
    ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"RAPPING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ON_LOOKERS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PARK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"INT_HOUSE","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRIB","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ROB_BANK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"JST_BUISNESS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0);
        return 
    true;

    не?
    Я предпочитаю хранить подобный код в стоках, а стоки в инклюдах, дабы в pwn был лишь "активный" код (тот, который в будущем может быть отредактирован. А тут уже нечего редактировать).
    Связаться со мной можно в личных сообщениях этой группы

    Широко известно, что идеи стоят 0.8333 цента каждая (исходя из рыночной цены 10 центов за дюжину).
    Великих идей полно, на них нет спроса.
    Воплощение идеи в законченную игру требует долгой работы,
    таланта, терпения и креативности, не говоря уж о затратах денег, времени и ресурсов.
    Предложить идею просто, воплотить – вот в чём проблема

    Steve Pavlina

  11. #9
    Аватар для Kevin_Patterson
    Пользователь

    Статус
    Оффлайн
    Регистрация
    21.05.2014
    Сообщений
    19
    Репутация:
    0 ±
    Цитата Сообщение от Seregamil Посмотреть сообщение
    PHP код:
    public OnPlayerSpawn(playerid){
    ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"RAPPING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ON_LOOKERS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PARK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"INT_HOUSE","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"CRIB","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"ROB_BANK","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"JST_BUISNESS","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0);
        
    ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0);
        return 
    true;

    не?
    Будет срабатывать при каждом спавне, а анимки не прогружаются вроде только после коннекта, возможно ошибаюсь :)
    Заинтересовало? Загляни!

    Мой проект: Rich City Role Play (Загляни, может понравится ;))
    Сайт: Click
    Форум: Click

  12. #10
    Аватар для OKStyle
    Заблокирован

    Статус
    Оффлайн
    Регистрация
    12.05.2013
    Сообщений
    205
    Репутация:
    49 ±

 

 
Страница 1 из 4 123 ... ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •