AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ResetHUD problem (https://forums.alliedmods.net/showthread.php?t=17065)

v3x 08-25-2005 08:17

ResetHUD problem
 
ResetHUD is called when I'm on CT, but not when I'm on T. Eh? Anybody know why?
Code:
register_event("ResetHUD","Event_ResetHUD","b");
( Yes, I am using ;'s now )

EDIT: AMXX 1.1

Xanimos 08-25-2005 12:15

Quote:

Originally Posted by v3x
( Yes, I am using ;'s now )

Me too. (Started about 4 plugs ago)

v3x 08-25-2005 12:42

Geee, this doesn't get any better now does it? I even tried Ava's method:
Code:
public client_PreThink(id) {     new iDeadFlag = entity_get_int(id,EV_INT_deadflag);         if(g_iOldDeadFlag[id] && !iDeadFlag)         SpawnStuff(id);     g_iOldDeadFlag[id] = iDeadFlag }
Modified by me slightly, STILL didn't work for T's but worked for CT's!

I need a solution! :(

Zenith77 08-25-2005 14:04

how do you know its only working for the t side...check your flags and what not...and if your using get_players anywhere in the code that may the prob...

v3x 08-25-2005 23:05

Quote:

Originally Posted by Zenith77
how do you know its only working for the t side...check your flags and what not...and if your using get_players anywhere in the code that may the prob...

Because, in the function hooked to my ResetHUD event I have this in it:
Code:
#if defined DEBUG     client_print(id,3,"You have spawned") #endif
It prints it for CT, but not T. Also, the attributes menu shows up for CT and not T. That is how I know. I seriously need a solution here. :(

P.S: I also tried pfn_spawn(); same scenario.

GHW_Chronic 08-25-2005 23:11

I believe ResetHUD must be called when an info_player_start spawns, not when an info_player_deathmatch is spawned.

XxAvalanchexX 08-25-2005 23:28

Quote:

Originally Posted by GHW_Chronic
I believe ResetHUD must be called when an info_player_start spawns, not when an info_player_deathmatch is spawned.

Hmm, no.

v3x you just broke the world, try starting an entirely new plugin, disabling your current one, and hooking ResetHUD.

Sp4rt4n 08-25-2005 23:32

Quote:

v3x you just broke the world, try starting an entirely new plugin, disabling your current one, and hooking ResetHUD.
LOL

Try that and if it dont work, disable all other non-needed plugins and trying that (throwing ideas in the open)

v3x 08-25-2005 23:51

Ok, so it worked with this:
Code:
#include <amxmodx> public plugin_init() {     register_plugin("Test","0.1","v3x")     register_event("ResetHUD","Event_ResetHUD","b") } public Event_ResetHUD(id) {     client_print(id,3,"You have spawned") }
How do you suppose I "broke" it? What could cause this? ;\

XxAvalanchexX 08-25-2005 23:55

It's probably line 238 where you set EV_INT_iStepLeft to 1 instead of 0.

Actually I'm just guessing because I don't know what your code is.


All times are GMT -4. The time now is 14:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.