AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Setting health message = 0 (https://forums.alliedmods.net/showthread.php?t=58337)

gallucci 07-24-2007 04:30

Setting health message = 0
 
Hey, wondering if its just something cooky with Half-life in that whenever the health message is set so that it is displaying zero it seems to lock the directional plane. This is similar to in a KZ map when you checkpoint on a ladder.

+forward always goes in one direction, not the one in which you are looking. same goes with strafeleft/right and backwards. It happens when i set the person's health to 256 also, and not just when i display a zero.

This is the message function:
Code:

public hudtime_msg(id,cltime)
{
    message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("RoundTime"),{0,0,0},id)
    write_short(cltime)
    message_end()
   
    message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("Health"), {0,0,0}, id);
    new byte:checkpoints = byte:gChecks[id] // Realize this isn't probably needed
    write_byte(checkpoints)
    message_end()
   
    message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("Battery"), {0,0,0}, id);
    write_short(gTeles[id])
    message_end()
   
    return PLUGIN_HANDLED
}

What im really looking to find out is if this is something that i have done, a bug, or just something about HL

edit: Also like to note that this effect goes away after the player uses a checkpoint, and zero is no longer displayed

VEN 07-25-2007 13:16

Re: Setting health message = 0
 
Quote:

just something cooky with Half-life
Yes.

purple_pixie 07-26-2007 08:25

Re: Setting health message = 0
 
Aha - my spawn script ends up doing this (I didn't quite work out that your "move direction" doesn't rotate till I tried it in 3rd person view, I only knew it screws up moving.) ... I'll check if I'm accidentally setting health to 0.

It's somewhere to look at least - are there any other known causes of this effect?

X-Script 07-26-2007 12:06

Re: Setting health message = 0
 
PHP Code:

new byte:checkpoints byte:gChecks[id

Why?

gallucci 07-28-2007 20:21

Re: Setting health message = 0
 
I was doing something wrong with the message and every time it screwed up it crashed counter-strike. it was just to make sure while i was testing it. its gone now.


All times are GMT -4. The time now is 21:35.

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