Solved Strange Bug

Installation Problems Support
Post Reply
User avatar
Mark
VIP
VIP
United States of America
Posts: 283
Joined: 5 years ago
Location: Des Moines/USA
Contact:

Strange Bug

#1

Post by Mark » 5 years ago

Ok this has todo with 2 extra items i can't seem to figure out why its doing this.

When spawn as human the light looks like this. (Normal)
20180911221313_1.jpg
When human and buy T-Virus it looks like this.
20180911221327_1.jpg
When using the antidote to turn back into human it looks like this.
20180911221335_1.jpg

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#2

Post by Raheem » 5 years ago

Don't test before game not started, in core we don't add support for pre-game start things.
What i mean there is must be at least 2, 3, 4 (Based on required zombies cvar) so game start.

Try these when game start and let me know how it looks.
He who fails to plan is planning to fail

User avatar
Mark
VIP
VIP
United States of America
Posts: 283
Joined: 5 years ago
Location: Des Moines/USA
Contact:

#3

Post by Mark » 5 years ago

Raheem wrote: 5 years ago Don't test before game not started, in core we don't add support for pre-game start things.
What i mean there is must be at least 2, 3, 4 (Based on required zombies cvar) so game start.

Try these when game start and let me know how it looks.
Looks same

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#4

Post by Raheem » 5 years ago

Post the antidote source.
He who fails to plan is planning to fail

User avatar
Mark
VIP
VIP
United States of America
Posts: 283
Joined: 5 years ago
Location: Des Moines/USA
Contact:

#5

Post by Mark » 5 years ago

Raheem wrote: 5 years ago Post the antidote source.
  1. #include <zombie_escape>
  2.  
  3. new g_iAntidote, szName[32]
  4.  
  5. public plugin_init()
  6. {
  7.   register_plugin("[ZE] Extra Item: Antidote", "1.0", "Rain1153/Jack GamePlay")
  8.   g_iAntidote = ze_register_item("Antidote", 30, 0)
  9. }
  10.  
  11. public ze_select_item_pre(id, itemid, ignorecost)
  12. {
  13.   if (itemid != g_iAntidote)
  14.     return ZE_ITEM_AVAILABLE
  15.  
  16.   if(!ze_is_user_zombie(id))
  17.     return ZE_ITEM_DONT_SHOW
  18.  
  19.   return ZE_ITEM_AVAILABLE
  20. }
  21.  
  22. public ze_select_item_post(id, itemid, ignorecost)
  23. {
  24.   if (itemid != g_iAntidote)
  25.     return
  26.  
  27.   get_user_name(id, szName, charsmax(szName))
  28.   set_hudmessage(0, 255, 0, -0.05, -0.45, 1, 0.0, 5.0, 1.0, 1.0, -1)
  29.   show_hudmessage(0, "%s has used antidote!", szName)
  30.   ze_set_user_human(id)
  31. }

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#6

Post by Raheem » 5 years ago

In core find public Set_User_Human(id) and edit it to:

  1. public Set_User_Human(id)
  2. {
  3.     if (!is_user_alive(id))
  4.         return
  5.    
  6.     g_bIsZombie[id] = false
  7.     set_entvar(id, var_health, get_pcvar_float(g_pCvarHumanHealth))
  8.     set_entvar(id, var_gravity, get_pcvar_float(g_pCvarHumanGravity)/800.0)
  9.     ExecuteForward(g_iForwards[FORWARD_HUMANIZED], g_iFwReturn, id)
  10.    
  11.     // Reset Nightvision
  12.     Set_NightVision(id, 0, 0, 0x0000, 0, 0, 0, 0)
  13.    
  14.     if (get_member(id, m_iTeam) != TEAM_CT)
  15.         rg_set_user_team(id, TEAM_CT, MODEL_UNASSIGNED)
  16. }

Only i added the reset night vision line, verify it's working and i'll commit it to github to be default in our Mod.
He who fails to plan is planning to fail

User avatar
Mark
VIP
VIP
United States of America
Posts: 283
Joined: 5 years ago
Location: Des Moines/USA
Contact:

#7

Post by Mark » 5 years ago

Raheem wrote: 5 years ago In core find public Set_User_Human(id) and edit it to:

  1. public Set_User_Human(id)
  2. {
  3.     if (!is_user_alive(id))
  4.         return
  5.    
  6.     g_bIsZombie[id] = false
  7.     set_entvar(id, var_health, get_pcvar_float(g_pCvarHumanHealth))
  8.     set_entvar(id, var_gravity, get_pcvar_float(g_pCvarHumanGravity)/800.0)
  9.     ExecuteForward(g_iForwards[FORWARD_HUMANIZED], g_iFwReturn, id)
  10.    
  11.     // Reset Nightvision
  12.     Set_NightVision(id, 0, 0, 0x0000, 0, 0, 0, 0)
  13.    
  14.     if (get_member(id, m_iTeam) != TEAM_CT)
  15.         rg_set_user_team(id, TEAM_CT, MODEL_UNASSIGNED)
  16. }

Only i added the reset night vision line, verify it's working and i'll commit it to github to be default in our Mod.
Yep fixed

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#8

Post by Raheem » 5 years ago

He who fails to plan is planning to fail

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 0 guests