HLFX.Ru Forum
Показать все 4 сообщений этой темы на одной странице

HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Changing model skin. (https://hlfx.ru/forum/showthread.php?threadid=2296)


Отправлено supra36 28-08-2010 в 15:23:

Changing model skin.

Hello dear HLFX Forum.
I have one problem at changing the skin after executing
one Command.
The Code is:

C++ Source Code:
1
if (  m_pPlayer->r_mode1 == 1)
2
  pev->skin = 0;
3
if (  m_pPlayer->r_mode2  == 1)
4
  pev->skin = 1;
5
if (  m_pPlayer->r_mode3 == 1)
6
  pev->skin = 2;
7
if (  m_pPlayer->r_mode4 == 1)
8
  pev->skin = 3;
9
if (  m_pPlayer->r_mode5 == 1)
10
  pev->skin = 4;
11
if (  m_pPlayer->r_mode6 == 1)
12
  pev->skin = 5;
13
if (  m_pPlayer->r_mode7 == 1)
14
  pev->skin = 6;


I putted it into the Idle and Deploy Function of my Weapon.
But nothing happens ingame. I just looked into the python function
where it decides which bodypart it will use.
I dont think that my Code is w_ model related.

Maybe you can tell me where to put it in/ if its correct.

Greetings
Thanks!


Отправлено CrazyRussian 28-08-2010 в 15:27:

It seems that you changing weapon skins, not player's one.
Try this code:

C++ Source Code:
1
if (  m_pPlayer->r_mode1 == 1)
2
  m_pPlayer->pev->skin = 0;
3
if (  m_pPlayer->r_mode2  == 1)
4
  m_pPlayer->pev->skin = 1;
5
if (  m_pPlayer->r_mode3 == 1)
6
  m_pPlayer->pev->skin = 2;
7
if (  m_pPlayer->r_mode4 == 1)
8
  m_pPlayer->pev->skin = 3;
9
if (  m_pPlayer->r_mode5 == 1)
10
  m_pPlayer->pev->skin = 4;
11
if (  m_pPlayer->r_mode6 == 1)
12
  m_pPlayer->pev->skin = 5;
13
if (  m_pPlayer->r_mode7 == 1)
14
  m_pPlayer->pev->skin = 6;

__________________
Трагическая новость: Пятеро инженеров Casio умерли от смеха, узнав что Samsung анонсировали часы с заявленным временем работы в 25 часов


Отправлено supra36 28-08-2010 в 15:30:

Yes but i want to change weapons skin, not player`s skin .


Отправлено Ku2zoff 28-08-2010 в 17:43:

supra36 try to translate and read this tutorial: http://www.hlfx.ru/forum/showthread.php?s=&threadid=13

It contains changing v_model's skins & submodels, correct working of the holster animations, disabling weapon predicting and etc.

Добавлено 29-08-2010 в 00:43:

CrazyRussian Ты неправильно понял. Ему надо менять скин вьюмодели (pev->skin меняется в коде оружия). Только вот просто так эта смена не прокатывает, сам много раз убеждался. Но тут как раз помогает Дядь Мишин тутор.


Временная зона GMT. Текущее время 11:52.
Показать все 4 сообщений этой темы на одной странице

На основе vBulletin версии 2.3.0
Авторское право © Jelsoft Enterprises Limited 2000 - 2002.
Дизайн и программирование: Crystice Softworks © 2005 - 2024