![]() |
Страницы (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)
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 ?
Amm, you have different team?
__________________
Все что делает маппер, программист делает в движке, поскольку ему лень. ©Дядя Миша
i dont understand your question , what team ?
i don't make teams in my mod yet
daku Use check in your weapon file. Something like this:
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
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.
code:
if (FStrEq(STRING(m_pPlayer->pev->model), "models/man.mdl")) pev->body = 0; else pev->body = 1;
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'
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
daku Where you do this check?
__________________
Base Defense on Steam, ModDB
in weapon spawn function
this is bad place ??
Hmmm...
Try this for example
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'
i don't understand your code ;/
where in it is player model check ?
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'
if( FStrEq( g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model" ), "model name" )), no?
__________________
Все что делает маппер, программист делает в движке, поскольку ему лень. ©Дядя Миша
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