AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   maximum user health and fantastic round ends (https://forums.alliedmods.net/showthread.php?t=51961)

mogel 02-27-2007 14:56

maximum user health and fantastic round ends
 
Hi,

what ist the maxmimum health that i can set with set_user_health() ... i set it to 1000 on some bots (players to 300)

the other problem is this logfile

Code:

20:57:13 og L 02/27/2007 - 20:55:52: "Massaker-Joe<5><BOT><TERRORIST>" killed "Invader Zim<7><STEAM_0:0:2912216><CT>" with "knife"
20:57:13 og L 02/27/2007 - 20:55:52: Server cvar "bot_stop" = "1"
20:57:13 og L 02/27/2007 - 20:55:52: "Groesster, gemeinsamer Teiler<4><BOT><TERRORIST>" committed suicide with "player"
20:57:13 og L 02/27/2007 - 20:55:52: Team "TERRORIST" triggered "Terrorists_Win" (CT "0") (T "1")
20:57:13 og L 02/27/2007 - 20:55:52: World triggered "Round_End"
20:57:13 og L 02/27/2007 - 20:55:52: "Massaker-Joe<5><BOT><TERRORIST>" committed suicide with "knife"
20:57:13 og L 02/27/2007 - 20:55:52: "Sushi-Koch von Italy<6><BOT><TERRORIST>" committed suicide with "player"
20:57:14 og L 02/27/2007 - 20:55:52: "Hannibal<9><BOT><TERRORIST>" committed suicide with "player"
20:57:14 og L 02/27/2007 - 20:55:52: "Macheten-Otto<10><BOT><TERRORIST>" committed suicide with "player"
20:57:14 og L 02/27/2007 - 20:55:52: "Schnitzel-Tom<11><BOT><TERRORIST>" committed suicide with "player"
20:57:14 og L 02/27/2007 - 20:55:52: Team "TERRORIST" triggered "Terrorists_Win" (CT "0") (T "2")
20:57:14 og L 02/27/2007 - 20:55:52: World triggered "Round_End"
20:57:18 og L 02/27/2007 - 20:55:57: World triggered "Round_Start"

current server-settings ... cs:cz / amxx 1.76c

hand, mogel

hip_hop_x 02-27-2007 15:31

Re: maximum user health and fantastic round ends
 
post your code here

XxAvalanchexX 02-27-2007 19:50

Re: maximum user health and fantastic round ends
 
You can set it incredibly high, I don't know the exact limit. However, it will not display correctly above 255.

What is the problem with the log messages?

FormulaZero 02-27-2007 20:03

Re: maximum user health and fantastic round ends
 
Let me correct you Avalanche.
If you set your health to 1337, it will say:
Half Life, no lie. If you set your health higher than 5000 it will crash your game.

Drak 02-27-2007 20:19

Re: maximum user health and fantastic round ends
 
Quote:

Originally Posted by FormulaZero (Post 446456)
Let me correct you Avalanche.
If you set your health to 1337, it will say:
Half Life, no lie. If you set your health higher than 5000 it will crash your game.

No it wont, he's right. Any higher then 225 will NOT show.

FormulaZero 02-27-2007 20:26

Re: maximum user health and fantastic round ends
 
With the correct plugin 1337, shows half-life Drak.

XxAvalanchexX 02-27-2007 20:31

Re: maximum user health and fantastic round ends
 
The client dll uses a formula to select the proper portion of the .spr file based on the number it is trying to display. Since bytes can only go up to 255, when the Health message is received and stored as a byte, if it was actually over 255, then it gets stored as some crazy number. So when you put this into the formula, it starts grabbing strange coordinates for wacky places (such as the Half-Life logo this is displayed during the tram ride).

Drak 02-27-2007 20:34

Re: maximum user health and fantastic round ends
 
Quote:

Originally Posted by FormulaZero (Post 446468)
With the correct plugin 1337, shows half-life Drak.

Okay no, 255 max. (Unless in other mod(s), the sprite is changeable as XxAvalanchexX was talking about)

(Also, don't call me that)

mogel 02-28-2007 11:21

Re: maximum user health and fantastic round ends
 
Moin,

Quote:

Originally Posted by XxAvalanchexX (Post 446453)
What is the problem with the log messages?

okay ... i delete some lines

Code:

og L 02/27/2007 - 20:55:52: Team "TERRORIST" triggered "Terrorists_Win" (CT "0") (T "1")
..
og L 02/27/2007 - 20:55:52: Team "TERRORIST" triggered "Terrorists_Win" (CT "0") (T "2")

double trigger of the same events at the same time (some times 3x) ... and suicide with "player"??

so i catch the event(s)
Code:

        register_event("SendAudio", "Event_TWin", "a", "2&%!MRAD_terwin")
        register_event("SendAudio", "Event_CTWin", "a", "2&%!MRAD_ctwin")

Code:

public Event_TWin() {
       
        // Fix zum dobble/trippel Trigger
        if (roundstatus != RS_RUNNING) return PLUGIN_CONTINUE
       
        if (HumanSide == CsTeam:CS_TEAM_T)
        {
                set_task(1.0, "Event_HumanWin_Thread")
        } else
        {
                set_task(1.0, "Event_BotWin_Thread")
        }

        Event_RoundEnd()
       
        return PLUGIN_CONTINUE
}
public Event_CTWin() {
       
        // Fix zum dobble/trippel Trigger
        if (roundstatus != RS_RUNNING) return PLUGIN_CONTINUE

        if (HumanSide == CsTeam:CS_TEAM_CT)
        {
                set_task(1.0, "Event_HumanWin_Thread")
        } else
        {
                set_task(1.0, "Event_BotWin_Thread")
        }

        Event_RoundEnd()
       
        return PLUGIN_CONTINUE
}

health-problem

i setted the bot-health to 250 and now works the player-level upgrade again (bevor, it jumps from 0 to 7 [maximum]) ... i do the same with the player-health and will show ... i think there is somewhere a byte-boundary (0..255)

hand, mogel

mogel 02-28-2007 15:30

Re: maximum user health and fantastic round ends
 
Omg,

i found the problem for double round-ends :mrgreen:

in both round-ends (ct-win and t-win) i start the function Event_RoundEnd ... in this function i kill all bot's, they are at one side (humans on the other) ... and that generates the second round-end event

set_task(1.0, "Event_RoundEnd")

hand, mogel


All times are GMT -4. The time now is 00:44.

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