Half-Life и Adrenaline Gamer форум

Всё об игре в Халф-Лайф и АГ
Текущее время: 29 мар 2024, 04:02

Часовой пояс: UTC + 5 часов [ Летнее время ]




Начать новую тему Ответить на тему  [ Сообщений: 7 ] 
Автор Сообщение
 Заголовок сообщения: HL Player Models API 1.0
СообщениеДобавлено: 12 мар 2019, 21:26 
Не в сети
Зарегистрирован:
24 апр 2017, 21:16
Последнее посещение:
19 ноя 2023, 09:01
Сообщения: 53
HL Player Models API

Author: rtxa | Version: 1.0

This API for Half-Life was made with the aim in mind to be able to use differents models in Teamplay mode. Now with this you can add classes for Zombie Mod, etc.

Introduction

This let you set custom models to the players and reset them to the default model. The custom model will stay until the player disconnects or you reset it manually.

Functions

Код:
/**
 * Sets a custom player model.
 *
 * @param id      Player index
 * @param model   Model short-name
 */
native hl_set_player_model(id, const model[])

/**
 * Restores default model of player.
 *
 * @param id    Player index
 */
native hl_reset_player_model(id)

/**
 * Returns the team id of the player, and optionally retrieves the name of
 * the team.
 *
 * @param id            Player index
 * @param team          Buffer to store team name
 * @param len           Maximum buffer length
 */
native hl_get_player_team(id, team[] = , len = )

/**
 * Sets the player's team without killing him.
 *
 * @param id        Player index
 * @param teamid    Team id
 */
native hl_set_player_team(id, teamid)

Requirements

  • AMX Mod X 1.9.0 Build 5208 or newer.
  • Fakemeta.
  • Hamsandwich.

Installation

  1. Download the attached files and extract them in your scripting folder, then type #include <hl_player_models_api> in your plugin to be able to use the functions.
  2. Compile hl_player_models_api.sma and add it to your plugin list in plugins.ini to turn on the API.

Notes

  • Any custom model that is going to be set to the player has to be previously precached.
  • Any plugin that use functions for get and set player team, must use the functions from this API to work correctly.
  • Bots that identify player’s team according by his model will not work correctly, modify them to use m_szTeamName instead.
  • You can’t get model key from players with custom models using get_user_info(id, “model”, …), instead you should get it from pev_modelindex o pev_model.

Sample plugin

I leave you this sample plugin called “Skin Menu”, what it does is open a menu to the player where he can choose choose a custom model (contains all default player models that comes with Half-Life).


Вложения:
Скачать плагин или Скачать исходник [hl_player_models_api.sma - 6.41 КБ]
Скачиваний: 465
hl_player_models_api.inc [2.25 КБ]
Скачиваний: 468
Скачать плагин или Скачать исходник [skin_menu.sma - 1008 байт]
Скачиваний: 498

_________________
Изображение
Zombie Mod X | AG Mod X | HL Player Models API
Contact:
@Discord: rtxa#6795
Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: HL Player Models API 1.0
СообщениеДобавлено: 20 ноя 2020, 09:17 
Не в сети
Аватара пользователя
Зарегистрирован:
18 сен 2014, 01:27
Последнее посещение:
26 мар 2024, 21:18
Сообщения: 164
Поставил себе на сервер ( Zombie Mod X ) эти плагины. Проверяю командой amx_plugins, всё работает, плагины запущены. Но на сервере ни каких изменений. Ни какого меню с выбором моделей не наблюдается. Плагины и для HLDS и ReHLDS ? Или только для ReHLDS ?


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: HL Player Models API 1.0
СообщениеДобавлено: 27 ноя 2020, 02:17 
Не в сети
AIMaster servers
Аватара пользователя
Зарегистрирован:
15 авг 2011, 18:31
Последнее посещение:
11 мар 2024, 00:24
Сообщения: 221
Откуда: Moscow
amxx cmds покажи.

_________________
Let's make HL great again! ~


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: HL Player Models API 1.0
СообщениеДобавлено: 28 ноя 2020, 18:09 
Не в сети
Аватара пользователя
Зарегистрирован:
18 сен 2014, 01:27
Последнее посещение:
26 мар 2024, 21:18
Сообщения: 164
Цитата:
amxx cmds покажи.
Палево конечно, показывать плагины сервера, ну да ладно. Ради идеи можно
 


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: HL Player Models API 1.0
СообщениеДобавлено: 02 дек 2020, 08:36 
Не в сети
Зарегистрирован:
24 апр 2017, 21:16
Последнее посещение:
19 ноя 2023, 09:01
Сообщения: 53
Sadly I don't enter too much to the forum so you don't see me answer these questions in time.

Valve, you need to install the sample plugin "Skin Menu" along with HL Players Model API to work.

_________________
Изображение
Zombie Mod X | AG Mod X | HL Player Models API
Contact:
@Discord: rtxa#6795


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: HL Player Models API 1.0
СообщениеДобавлено: 03 дек 2020, 12:01 
Не в сети
Аватара пользователя
Зарегистрирован:
18 сен 2014, 01:27
Последнее посещение:
26 мар 2024, 21:18
Сообщения: 164
rtxa
Hello, thank you for answering. I did so and installed it right away ( skin_menu, hl_player_models_api. inc and hl_player_models_api).


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: HL Player Models API 1.0
СообщениеДобавлено: 08 дек 2020, 06:33 
Не в сети
Зарегистрирован:
24 апр 2017, 21:16
Последнее посещение:
19 ноя 2023, 09:01
Сообщения: 53
So I guess it worked, you can find last version in AlliedModders with support for ReHLDS in case you're using it.

_________________
Изображение
Zombie Mod X | AG Mod X | HL Player Models API
Contact:
@Discord: rtxa#6795


Вернуться к началу
 Профиль 
  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 7 ] 

Часовой пояс: UTC + 5 часов [ Летнее время ]


Кто сейчас на конференции

Сейчас этот форум просматривают: Bing [Bot] и гости: 14


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

Найти:
Перейти:  
Создано на основе phpBB® Forum Software © phpBB Group
Русская поддержка phpBB