HLFX.Ru Forum Страницы (2): [1] 2 »
Показать все 21 сообщений этой темы на одной странице

HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Pev->body dependent on the player model (https://hlfx.ru/forum/showthread.php?threadid=3075)


Отправлено daku 29-10-2011 в 05:46:

Pev->body dependent on the player model

Hi

I have super idea
make pev->body dependent on the player model
now explain what I mean , look at pictures and you should know I want to do

Man's model's [pev->body = 0]



Woman's model's [pev->body = 1]



how i can check player models and set weapon pev->body to 1 if player has one of woman models ?


Отправлено Jimmy C. 29-10-2011 в 05:58:

Amm, you have different team?

__________________
Все что делает маппер, программист делает в движке, поскольку ему лень. ©Дядя Миша


Отправлено daku 29-10-2011 в 06:03:

i dont understand your question , what team ?

i don't make teams in my mod yet


Отправлено PLut 29-10-2011 в 06:33:

daku Use check in your weapon file. Something like this:

C++ Source Code:
1
if (FStrEq(STRING(m_pPlayer->pev->model), "models/man.mdl"))
2
  pev->body = 0;
3
else
4
  pev->body = 1;

__________________
Base Defense on Steam, ModDB


Отправлено qpAHToMAS 29-10-2011 в 06:33:

He just wants to know the current player model (model "gordon" in console) and set weapon hands (i hope hands - is submodels in v_ models).

If playermodel = "gordon / any male model" then set male hands for weapons.
Else If playermodel = "gina / any female model" then set female hands for weapons.


Отправлено daku 29-10-2011 в 06:45:

code:
if (FStrEq(STRING(m_pPlayer->pev->model), "models/man.mdl")) pev->body = 0; else pev->body = 1;

this method is wrong ;/

if i start new game, hl is crashing


Отправлено Дядя Миша 29-10-2011 в 06:47:

Player body can be changed only on the client, not server.

__________________
My Projects: download page

F.A.Q по XashNT
Блог разработчика в телеграме

Цитата:

C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'


Отправлено daku 29-10-2011 в 06:49:

i know about it, i have done change section but i don't know how to get player model

e.g
model yuri
"models/player/yuri/yuri.mdl"

if player has this model set his pev->body 1
else pev->body 0


Отправлено PLut 29-10-2011 в 06:56:

daku Where you do this check?

__________________
Base Defense on Steam, ModDB


Отправлено daku 29-10-2011 в 06:58:

in weapon spawn function

this is bad place ??


Отправлено Дядя Миша 29-10-2011 в 07:01:

Hmmm...
Try this for example

C++ Source Code:
int body = atoi(g_engfuncs.pfnInfoKeyValue(g_engfuncs.pfnGetInfoKeyBuffer(m_pPlayer->edict()), "body"));

__________________
My Projects: download page

F.A.Q по XashNT
Блог разработчика в телеграме

Цитата:

C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'


Отправлено daku 29-10-2011 в 07:04:

i don't understand your code ;/

where in it is player model check ?


Отправлено Дядя Миша 29-10-2011 в 07:38:

It's a body check not a player model.

__________________
My Projects: download page

F.A.Q по XashNT
Блог разработчика в телеграме

Цитата:

C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'


Отправлено Jimmy C. 29-10-2011 в 07:53:

if( FStrEq( g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model" ), "model name" )), no?

__________________
Все что делает маппер, программист делает в движке, поскольку ему лень. ©Дядя Миша


Отправлено daku 29-10-2011 в 10:32:

crash on loading map

debug return edict() function

Добавлено 29-10-2011 в 17:32:

pev->body works fine if i set it in weapon

yours code doesn't work ;/

http://www.youtube.com/watch?v=Py69HMxJHnU


Временная зона GMT. Текущее время 16:58. Страницы (2): [1] 2 »
Показать все 21 сообщений этой темы на одной странице

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