Half-Life и Adrenaline Gamer форум http://aghl.ru/forum/ |
|
how i can restart spawn stuff of the map ? http://aghl.ru/forum/viewtopic.php?f=12&t=2672 |
Страница 1 из 2 |
Автор: | abdobiskra [ 09 май 2017, 17:44 ] |
Заголовок сообщения: | how i can restart spawn stuff of the map ? |
Hi how i can force to spawn weapons and iteams and function health .. etc ( like when map restart again) |
Автор: | Lev [ 10 май 2017, 00:04 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
Respawn a weapon should be easy: - cycle thru entites in the world, search for a weapon with Код: pNewWeapon->pev->effects |= EF_NODRAW;// invisible for now- set Код: pNewWeapon->pev->nextthink = gpGlobals->time + 0; // weapon respawns almost instantlyIt should respawn in this or next frame. Same for batteries, ammo, health. Rechargers should be handle different. Probably you should manually reset them: Код: m_iJuice = gSkillData.healthchargerCapacity; |
Автор: | abdobiskra [ 05 авг 2017, 17:00 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
about weapons i try ex: Код: public plugin_init() {I do not have a clear idea how to remove transparency about func_healthcharge & func_recharge : Can I just set the time m_iReactivate to 0 ? |
Автор: | Lev [ 06 авг 2017, 22:37 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
About weapons I meant that you should iterate thru all entites and search for weapons. abdobiskra писал(а): Can I just set the time m_iReactivate to 0 ? Can be done if you have offset.
|
Автор: | abdobiskra [ 07 авг 2017, 13:55 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
Lev писал(а): About weapons I meant that you should iterate thru all entites and search for weapons. Thx done!^^Lev писал(а): Can be done if you have offset. yes i have it but how i can cheak it ?Here is the code I explain exactly what I want |
Автор: | Lev [ 07 авг 2017, 18:34 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
Based on HLSDK source you need to do: Код: m_iJuice = gSkillData.healthchargerCapacity;I think you can just replace gSkillData.healthchargerCapacity with a constant value and replace SetThink with Код: pev->nextthink = 0; |
Автор: | rtxa [ 05 июн 2018, 10:47 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
Hi Lev, setting pev_nexthink to get_gametime() to ammo and items will make respawn them instantly without problems but with weapons doesn't work. Any ideas? |
Автор: | Lev [ 06 июл 2018, 04:06 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
Show the code. |
Автор: | rtxa [ 07 июл 2018, 10:59 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
This is the code, with ammo and items it works. ▼ Code I found that this will respawn weapons, sometimes... (i know this code is messing with pev_nexthink of all entities, i'm just testing) Код: // This works just when you: |
Автор: | abdobiskra [ 07 июл 2018, 12:36 ] |
Заголовок сообщения: | Re: how i can restart spawn stuff of the map ? |
rtxa писал(а): but with weapons doesn't work. Any ideas? Some thing like this :Код: public plugin_init() |
Страница 1 из 2 | Часовой пояс: UTC + 5 часов [ Летнее время ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |