How can I do it for those who want to prevent getting items with spawn protection?
https://www.hizliresim.com/7jmpfge
![]()
How can I do it for those who want to prevent getting items with spawn protection?
https://www.hizliresim.com/7jmpfge
![]()
You want "spawn protector activated" can't pick up the item ?
Code:void obj_Player::UpdateActionUI()Code:*** DO HERE TO DETECT YOUR SPAWN PROTECTOR AND DISABLE THE INTERACT hudActionUI->Deactivate();
I don't want it to receive items while spawned
- - - Updated - - -
I don't want it to receive items while spawned
just think of it, there is a timer, just if(timer > 0.0f) then do not allow to process the pickup packet... just add a return to it??!?!?!?!?! is it that hard?
how can I do I don't know what to do from this part
//Cynthia: 202 Delay 0.5 second picking up items when shooting. if(m_Weapons[m_SelectedWeapon] && (r3dGetTime() < m_Weapons[m_SelectedWeapon]->getLastTimeFired() + 0.5f)) return;
Code:if(distance < 1.0f) // distance to ray. if more than 1, then it is outside of ray { // in case if you are standing right next to pile of objects, we need to re-init ui each time we pick different item from pile static GameObject* prevHUDItem = NULL; static uint32_t meantToShare = 0;//Cynthia:1142. medical items local player intended to heal other player. static bool bIsPrimaryInteraction = true; //DouglasPro:: oh fuck! new logic for test spawn protection, I don't know if this shit will work!! if(hudActionUI->isActive() && (m_AuraType != AT_SPAWNPROTECTION || prevHUDItem != dropObj || (m_Weapons[m_SelectedWeapon] && meantToShare!=m_Weapons[m_SelectedWeapon]->getItemID()))) { bIsPrimaryInteraction = true; hudActionUI->Deactivate(); ActionUI_pressedKeyTimer = 0; }
thank you bro
- - - Updated - - -
It takes it while spawned but not when it's over
Search :
if(distance < 1.0f)
replace :
if(distance < 1.0f && !m_SpawnProtectedUntil) // distance to ray. if more than 1, then it is outside of ray
You can only get the item when you punch
People already posted a solution, but please keep in mind, do not only do it on the clientside, add the same check to the serverside where the pickup packets get processed...