Overriding Frag Message and GetCVar not working in Multiplayer

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
buu342
 
Posts: 58
Joined: Tue Nov 08, 2016 11:23 pm
Location: Earth

Overriding Frag Message and GetCVar not working in Multiplayer

#1

Post by buu342 » Thu Feb 09, 2017 11:38 pm

Is there any way of overriding default HUD elements, specifically to modify the text which pops up on the screen when a player gets a kill and has Large Frag Messages enabled (The "You fragged X" message)

For my second issue, GetCVar seems to return the incorrect value, but only in multiplayer. I'm trying to make a weapon show on the screen through HudMessage, and I've made two versions. One has the bottom most part cut off in order to not overlap with the default Doom status bar, and one version which shows the entire weapon for when GetCVar("screenblocks") > 10. However, in multiplayer it always seems to return that it is >10, causing the weapon to overlap the default Doom status bar.
[spoiler]

Code: Select all

if (GetCVar("screenblocks") < 11) 
SetFont("DRK2E0"); 
else 
SetFont("DRNKF0");

SetHudSize(640,400,true);
hudmessage(s:"a";HUDMSG_PLAIN,91,cR_ORANGE,0.5,0.5,1);
delay(1);
restart;
[/spoiler]
Remember that you are unique, just like everyone else.

User avatar
Fused
Contributor
Posts: 663
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
Contact:

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#2

Post by Fused » Fri Feb 10, 2017 10:02 am

The frag messages are hardcoded and can not be changed (for now).

Regarding the hud problem, I need more information. Please post the whole script.
I feel like you can't check this at all as I had a problem with this a year ago, so screenblocks might be bugged.
My mods
Image Image

My socials
Image Image

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#3

Post by SwordGrunt » Fri Feb 10, 2017 3:04 pm

It could be as silly as needing to make the script clientside so that it obtains the client's value for that CVar.

User avatar
buu342
 
Posts: 58
Joined: Tue Nov 08, 2016 11:23 pm
Location: Earth

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#4

Post by buu342 » Fri Feb 10, 2017 4:36 pm

SwordGrunt wrote:It could be as silly as needing to make the script clientside so that it obtains the client's value for that CVar.
Script is clientside as it detects player inputs before changing the weapon sprites.
Fused wrote:The frag messages are hardcoded and can not be changed (for now).
Well that's a pest. Anyway to disable it for players on the server without utilizing the ConsoleCommand function?
Fused wrote:Regarding the hud problem, I need more information. Please post the whole script.
I feel like you can't check this at all as I had a problem with this a year ago, so screenblocks might be bugged.
Well, it's odd that it works in Singleplayer just fine but not in multiplayer.

Here's the script, be warned though, it's a 289 lines beast
[spoiler]

Code: Select all

Script 999 (void) // Client - Clean Your Weapon Weapon
{
	// I tried to do this in Decorate but it was impossible without some of the new functions in Zdoom, which ZANDRONUM DOESN'T HAVE FFS.
	// If the add them, I probably won't bother to convert it, since this works perfectly fine.
	if (RoundReal == 150)
	{
		if (KillsBefore[PlayerNumber()] == 0){if (GetCVar("screenblocks") < 11) SetFont("PPISA0"); else SetFont("P2ISA0");}
		if (KillsBefore[PlayerNumber()] == 1){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 2){if (GetCVar("screenblocks") < 11) SetFont("PPISK0"); else SetFont("P2ISK0");}
		if (KillsBefore[PlayerNumber()] == 3){if (GetCVar("screenblocks") < 11) SetFont("PPISL0"); else SetFont("P2ISL0");}
		if (KillsBefore[PlayerNumber()] == 4){if (GetCVar("screenblocks") < 11) SetFont("PPISM0"); else SetFont("P2ISM0");}
		if (KillsBefore[PlayerNumber()] == 5){if (GetCVar("screenblocks") < 11) SetFont("PPISN0"); else SetFont("P2ISN0");}
		if (KillsBefore[PlayerNumber()] == 6){if (GetCVar("screenblocks") < 11) SetFont("PPISO0"); else SetFont("P2ISO0");}
		if (KillsBefore[PlayerNumber()] == 7){if (GetCVar("screenblocks") < 11) SetFont("PPISP0"); else SetFont("P2ISP0");}	
		if (KillsBefore[PlayerNumber()] == 8){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}	
		if (KillsBefore[PlayerNumber()] == 9){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}		
	    if (KillsBefore[PlayerNumber()] == 10){if (GetCVar("screenblocks") < 11) SetFont("PPISG0"); else SetFont("P2ISG0");}
		if (KillsBefore[PlayerNumber()] == 11){if (GetCVar("screenblocks") < 11) SetFont("PPISH0"); else SetFont("P2ISH0");}
		if (KillsBefore[PlayerNumber()] == 12){if (GetCVar("screenblocks") < 11) SetFont("PPISH0"); else SetFont("P2ISH0");}
		if (KillsBefore[PlayerNumber()] == 13){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 14){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 15){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 16){if (GetCVar("screenblocks") < 11) SetFont("PPISH0"); else SetFont("P2ISH0");}
		if (KillsBefore[PlayerNumber()] == 17){if (GetCVar("screenblocks") < 11) SetFont("PPISH0"); else SetFont("P2ISH0");}
		if (KillsBefore[PlayerNumber()] == 18){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 19){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 20){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 21){if (GetCVar("screenblocks") < 11) SetFont("PPISH0"); else SetFont("P2ISH0");}
		if (KillsBefore[PlayerNumber()] == 22){if (GetCVar("screenblocks") < 11) SetFont("PPISH0"); else SetFont("P2ISH0");}
		if (KillsBefore[PlayerNumber()] == 23){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 24){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 25){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 26){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 27){if (GetCVar("screenblocks") < 11) SetFont("PPISQ0"); else SetFont("P2ISQ0");}
		if (KillsBefore[PlayerNumber()] == 28){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 29){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 30){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 31){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 32){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 33){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 34){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 35){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 36){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 37){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 38){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 39){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 40){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 41){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 42){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 43){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 44){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 45){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 46){if (GetCVar("screenblocks") < 11) SetFont("PPISQ0"); else SetFont("P2ISQ0");}
		if (KillsBefore[PlayerNumber()] == 47){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 48){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 49){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 50){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 51){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 52){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 53){if (GetCVar("screenblocks") < 11) SetFont("PPISH0"); else SetFont("P2ISH0");}
		if (KillsBefore[PlayerNumber()] == 54){if (GetCVar("screenblocks") < 11) SetFont("PPISH0"); else SetFont("P2ISH0");}
		if (KillsBefore[PlayerNumber()] == 55){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 56){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 57){if (GetCVar("screenblocks") < 11) SetFont("PPISJ0"); else SetFont("P2ISJ0");}
		if (KillsBefore[PlayerNumber()] == 58){if (GetCVar("screenblocks") < 11) SetFont("PPISQ0"); else SetFont("P2ISQ0");}
		if (KillsBefore[PlayerNumber()] == 59){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 60){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 61){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 62){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 63){if (GetCVar("screenblocks") < 11) SetFont("PPISR0"); else SetFont("P2ISR0");}
		if (KillsBefore[PlayerNumber()] == 64){if (GetCVar("screenblocks") < 11) SetFont("PPISS0"); else SetFont("P2ISS0");}
		if (KillsBefore[PlayerNumber()] == 65){if (GetCVar("screenblocks") < 11) SetFont("PPISQ0"); else SetFont("P2ISQ0");}
		if (KillsBefore[PlayerNumber()] == 66){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 67){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 68){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] == 69){if (GetCVar("screenblocks") < 11) SetFont("PPISK0"); else SetFont("P2ISK0");}
		if (KillsBefore[PlayerNumber()] == 70){if (GetCVar("screenblocks") < 11) SetFont("PPISL0"); else SetFont("P2ISL0");}
		if (KillsBefore[PlayerNumber()] == 71){if (GetCVar("screenblocks") < 11) SetFont("PPISM0"); else SetFont("P2ISM0");}
		if (KillsBefore[PlayerNumber()] == 72){if (GetCVar("screenblocks") < 11) SetFont("PPISM0"); else SetFont("P2ISM0");}
		if (KillsBefore[PlayerNumber()] == 73){if (GetCVar("screenblocks") < 11) SetFont("PPISN0"); else SetFont("P2ISN0");}
		if (KillsBefore[PlayerNumber()] == 74){if (GetCVar("screenblocks") < 11) SetFont("PPISO0"); else SetFont("P2ISO0");}
		if (KillsBefore[PlayerNumber()] == 75){if (GetCVar("screenblocks") < 11) SetFont("PPISP0"); else SetFont("P2ISP0");}
		if (KillsBefore[PlayerNumber()] == 76){if (GetCVar("screenblocks") < 11) SetFont("PPISP0"); else SetFont("P2ISO0");}
		if (KillsBefore[PlayerNumber()] == 77){if (GetCVar("screenblocks") < 11) SetFont("PPISF0"); else SetFont("P2ISF0");}
		if (KillsBefore[PlayerNumber()] >= 78){if (GetCVar("screenblocks") < 11) SetFont("PPISA0"); else SetFont("P2ISA0");}
		
		if( (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_ATTACK) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_ATTACK) )
		{
			KillsBefore[PlayerNumber()] = KillsBefore[PlayerNumber()]+1;
			if (KillsBefore[PlayerNumber()] == 4){LocalAmbientSound("DoomWare/CleanCock1",127);}
			if (KillsBefore[PlayerNumber()] == 5){LocalAmbientSound("DoomWare/CleanCock2",127);}
			if (KillsBefore[PlayerNumber()] == 6){LocalAmbientSound("DoomWare/CleanCock3",127);}
			if (KillsBefore[PlayerNumber()] == 7){LocalAmbientSound("DoomWare/CleanCock4",127);}
			if (KillsBefore[PlayerNumber()] == 13){LocalAmbientSound("DoomWare/CleanSpray",127);}
			if (KillsBefore[PlayerNumber()] == 18){LocalAmbientSound("DoomWare/CleanSpray",127);}
			if (KillsBefore[PlayerNumber()] == 28){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 29){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 30){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 31){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 32){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 33){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 34){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 35){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 36){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 37){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 38){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 39){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 40){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 41){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 42){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 43){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 44){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 45){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 55){LocalAmbientSound("DoomWare/CleanSpray",127);}
			if (KillsBefore[PlayerNumber()] == 59){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 60){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 61){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 62){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 63){LocalAmbientSound("DoomWare/CleanRub1",127);}
			if (KillsBefore[PlayerNumber()] == 64){LocalAmbientSound("DoomWare/CleanRub2",127);}
			if (KillsBefore[PlayerNumber()] == 71){LocalAmbientSound("DoomWare/CleanCock1",127);}
			if (KillsBefore[PlayerNumber()] == 73){LocalAmbientSound("DoomWare/CleanCock2",127);}
			if (KillsBefore[PlayerNumber()] == 74){LocalAmbientSound("DoomWare/CleanCock3",127);}
			if (KillsBefore[PlayerNumber()] == 75){LocalAmbientSound("DoomWare/CleanCock4",127);}
			if (KillsBefore[PlayerNumber()] == 78){			
													LocalAmbientSound("DoomWare/Check",127);
													SpawnSpotForced("WonRoundEffect",0,0,0);
													GiveInventory("WonRoundItem",1);
													BypassWinCheck[PlayerNumber()] = true;
												  }
		}
		
		SetHudSize(320,200,true);
		hudmessage(s:"a";HUDMSG_PLAIN,91,cR_ORANGE,0.5,0.9,1);
		delay(1);
		restart;
	}
	
	if (RoundReal == 152)
	{
		if (KillsBefore[PlayerNumber()] == 0){if (GetCVar("screenblocks") < 11) SetFont("TNT2A0"); else SetFont("TNT2A0");}
		if (KillsBefore[PlayerNumber()] == 1){if (GetCVar("screenblocks") < 11) SetFont("TNT2A0"); else SetFont("DRNKA0");}
		if (KillsBefore[PlayerNumber()] == 2){if (GetCVar("screenblocks") < 11) SetFont("DRN2A0"); else SetFont("DRNKB0");}
		if (KillsBefore[PlayerNumber()] == 3){if (GetCVar("screenblocks") < 11) SetFont("DRK2B0"); else SetFont("DRNKC0");}
		if (KillsBefore[PlayerNumber()] == 4){if (GetCVar("screenblocks") < 11) SetFont("DRK2C0"); else SetFont("DRNKD0");}
		if (KillsBefore[PlayerNumber()] == 5){if (GetCVar("screenblocks") < 11) SetFont("DRK2D0"); else SetFont("DRNKE0");}
		if (KillsBefore[PlayerNumber()] == 6){if (GetCVar("screenblocks") < 11) SetFont("DRK2E0"); else SetFont("DRNKF0");}
		if (KillsBefore[PlayerNumber()] == 7){if (GetCVar("screenblocks") < 11) SetFont("DRK2F0"); else SetFont("DRNKG0");}
		if (KillsBefore[PlayerNumber()] == 8){if (GetCVar("screenblocks") < 11) SetFont("DRK2G0"); else SetFont("DRNKH0");}
		if (KillsBefore[PlayerNumber()] == 9){if (GetCVar("screenblocks") < 11) SetFont("DRK2H0"); else SetFont("DRNKI0");}
		if (KillsBefore[PlayerNumber()] == 10){if (GetCVar("screenblocks") < 11) SetFont("DRK2I0"); else SetFont("DRNKJ0");}
		if (KillsBefore[PlayerNumber()] == 11){if (GetCVar("screenblocks") < 11) SetFont("DRK2J0"); else SetFont("DRNKK0");}
		if (KillsBefore[PlayerNumber()] == 12){if (GetCVar("screenblocks") < 11) SetFont("DRK2K0"); else SetFont("DRNKL0");}
		if (KillsBefore[PlayerNumber()] == 13){if (GetCVar("screenblocks") < 11) SetFont("DRK2L0"); else SetFont("DRNKM0");}
		if (KillsBefore[PlayerNumber()] == 14){if (GetCVar("screenblocks") < 11) SetFont("DRK2M0"); else SetFont("DRNKN0");}
		if (KillsBefore[PlayerNumber()] == 15){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 16){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 17){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 18){if (GetCVar("screenblocks") < 11) SetFont("DRK2M0"); else SetFont("DRNKN0");}
		if (KillsBefore[PlayerNumber()] == 19){if (GetCVar("screenblocks") < 11) SetFont("DRK2L0"); else SetFont("DRNKM0");}
		if (KillsBefore[PlayerNumber()] == 20){if (GetCVar("screenblocks") < 11) SetFont("DRK2L0"); else SetFont("DRNKM0");}
		if (KillsBefore[PlayerNumber()] == 21){if (GetCVar("screenblocks") < 11) SetFont("DRK2L0"); else SetFont("DRNKM0");}
		if (KillsBefore[PlayerNumber()] == 22){if (GetCVar("screenblocks") < 11) SetFont("DRK2M0"); else SetFont("DRNKN0");}
		if (KillsBefore[PlayerNumber()] == 23){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 24){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 25){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 26){if (GetCVar("screenblocks") < 11) SetFont("DRK2M0"); else SetFont("DRNKN0");}
		if (KillsBefore[PlayerNumber()] == 27){if (GetCVar("screenblocks") < 11) SetFont("DRK2L0"); else SetFont("DRNKM0");}
		if (KillsBefore[PlayerNumber()] == 28){if (GetCVar("screenblocks") < 11) SetFont("DRK2L0"); else SetFont("DRNKM0");}
		if (KillsBefore[PlayerNumber()] == 29){if (GetCVar("screenblocks") < 11) SetFont("DRK2L0"); else SetFont("DRNKM0");}
		if (KillsBefore[PlayerNumber()] == 30){if (GetCVar("screenblocks") < 11) SetFont("DRK2M0"); else SetFont("DRNKN0");}
		if (KillsBefore[PlayerNumber()] == 31){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 32){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 33){if (GetCVar("screenblocks") < 11) SetFont("DRK2N0"); else SetFont("DRNKO0");}
		if (KillsBefore[PlayerNumber()] == 34){if (GetCVar("screenblocks") < 11) SetFont("DRK2M0"); else SetFont("DRNKN0");}
		if (KillsBefore[PlayerNumber()] == 35){if (GetCVar("screenblocks") < 11) SetFont("DRK2L0"); else SetFont("DRNKM0");}
		if (KillsBefore[PlayerNumber()] == 36){if (GetCVar("screenblocks") < 11) SetFont("DRK2K0"); else SetFont("DRNKL0");}
		if (KillsBefore[PlayerNumber()] == 37){if (GetCVar("screenblocks") < 11) SetFont("DRK2J0"); else SetFont("DRNKK0");}
		if (KillsBefore[PlayerNumber()] == 38){if (GetCVar("screenblocks") < 11) SetFont("DRK2I0"); else SetFont("DRNKJ0");}
		if (KillsBefore[PlayerNumber()] == 39){if (GetCVar("screenblocks") < 11) SetFont("DRK2H0"); else SetFont("DRNKI0");}
		if (KillsBefore[PlayerNumber()] == 40){if (GetCVar("screenblocks") < 11) SetFont("DRK2G0"); else SetFont("DRNKH0");}
		if (KillsBefore[PlayerNumber()] == 41){if (GetCVar("screenblocks") < 11) SetFont("DRK2F0"); else SetFont("DRNKG0");}
		if (KillsBefore[PlayerNumber()] >= 42){if (GetCVar("screenblocks") < 11) SetFont("DRK2E0"); else SetFont("DRNKF0");}

		
		if( (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_ATTACK) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_ATTACK) )
		{
			KillsBefore[PlayerNumber()] = KillsBefore[PlayerNumber()]+1;
			if (KillsBefore[PlayerNumber()] == 16){LocalAmbientSound("DoomWare/Gulp",127);}
			if (KillsBefore[PlayerNumber()] == 24){LocalAmbientSound("DoomWare/Gulp",127);}
			if (KillsBefore[PlayerNumber()] == 32){LocalAmbientSound("DoomWare/Gulp",127);
												   LocalAmbientSound("DoomWare/Check",127);
												   SpawnSpotForced("WonRoundEffect",0,0,0);
												   GiveInventory("WonRoundItem",1);
												   BypassWinCheck[PlayerNumber()] = true;
												  }
			if (KillsBefore[PlayerNumber()] == 42){LocalAmbientSound("DoomWare/DrinkAh",127);}
		}
	
		SetHudSize(640,400,true);
		hudmessage(s:"a";HUDMSG_PLAIN,91,cR_ORANGE,0.5,0.5,1);
		delay(1);
		restart;
	}
	
	if (RoundReal == 156)
	{
		if (KillsBefore[PlayerNumber()] == 0){if (GetCVar("screenblocks") < 11) SetFont("TNT2A0"); else SetFont("TNT2A0");}
		if (KillsBefore[PlayerNumber()] == 1){if (GetCVar("screenblocks") < 11) SetFont("TNT2A0"); else SetFont("CHOCA0");}
		if (KillsBefore[PlayerNumber()] == 2){if (GetCVar("screenblocks") < 11) SetFont("CHOKA0"); else SetFont("CHOCB0");}
		if (KillsBefore[PlayerNumber()] == 3){if (GetCVar("screenblocks") < 11) SetFont("CHOKB0"); else SetFont("CHOCC0");}
		if (KillsBefore[PlayerNumber()] == 4){if (GetCVar("screenblocks") < 11) SetFont("CHOKC0"); else SetFont("CHOCD0");}
		if (KillsBefore[PlayerNumber()] == 5){if (GetCVar("screenblocks") < 11) SetFont("CHOKD0"); else SetFont("CHOCE0");}
		if (KillsBefore[PlayerNumber()] == 6){if (GetCVar("screenblocks") < 11) SetFont("CHOKE0"); else SetFont("CHOCF0");}
		if (KillsBefore[PlayerNumber()] == 7){if (GetCVar("screenblocks") < 11) SetFont("CHOKF0"); else SetFont("CHOCG0");}
		if (KillsBefore[PlayerNumber()] == 8){if (GetCVar("screenblocks") < 11) SetFont("CHOKG0"); else SetFont("CHOCH0");}
		if (KillsBefore[PlayerNumber()] == 9){if (GetCVar("screenblocks") < 11) SetFont("CHOKH0"); else SetFont("CHOCI0");}
		if (KillsBefore[PlayerNumber()] == 10){if (GetCVar("screenblocks") < 11) SetFont("CHOKI0"); else SetFont("CHOCJ0");}
		if (KillsBefore[PlayerNumber()] == 11){if (GetCVar("screenblocks") < 11) SetFont("CHOKJ0"); else SetFont("CHOCK0");}
		if (KillsBefore[PlayerNumber()] == 12){if (GetCVar("screenblocks") < 11) SetFont("CHOKK0"); else SetFont("CHOCL0");}
		if (KillsBefore[PlayerNumber()] == 13){if (GetCVar("screenblocks") < 11) SetFont("CHOKL0"); else SetFont("CHOCM0");}
		if (KillsBefore[PlayerNumber()] == 14){if (GetCVar("screenblocks") < 11) SetFont("CHOKM0"); else SetFont("CHOCN0");}
		if (KillsBefore[PlayerNumber()] == 15){if (GetCVar("screenblocks") < 11) SetFont("CHOKM0"); else SetFont("CHOCN0");}
		if (KillsBefore[PlayerNumber()] == 16){if (GetCVar("screenblocks") < 11) SetFont("CHOKN0"); else SetFont("CHOCO0");}
		if (KillsBefore[PlayerNumber()] == 17){if (GetCVar("screenblocks") < 11) SetFont("CHOKO0"); else SetFont("CHOCP0");}
		if (KillsBefore[PlayerNumber()] == 18){if (GetCVar("screenblocks") < 11) SetFont("CHOKP0"); else SetFont("CHOCQ0");}
		if (KillsBefore[PlayerNumber()] == 19){if (GetCVar("screenblocks") < 11) SetFont("CHOKQ0"); else SetFont("CHOCR0");}
		if (KillsBefore[PlayerNumber()] == 20){if (GetCVar("screenblocks") < 11) SetFont("CHOKR0"); else SetFont("CHOCS0");}
		if (KillsBefore[PlayerNumber()] == 21){if (GetCVar("screenblocks") < 11) SetFont("CHOKS0"); else SetFont("CHOCT0");}
		if (KillsBefore[PlayerNumber()] == 22){if (GetCVar("screenblocks") < 11) SetFont("CHOKT0"); else SetFont("CHOCU0");}
		if (KillsBefore[PlayerNumber()] == 23){if (GetCVar("screenblocks") < 11) SetFont("CHOKU0"); else SetFont("CHOCV0");}
		
		if( (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_ATTACK) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_ATTACK) )
		{
			KillsBefore[PlayerNumber()] = KillsBefore[PlayerNumber()]+1;
			if (KillsBefore[PlayerNumber()] == 16){
												   LocalAmbientSound("DoomWare/Check",127);
												   SpawnSpotForced("WonRoundEffect",0,0,0);
												   GiveInventory("WonRoundItem",1);
												   BypassWinCheck[PlayerNumber()] = true;
												  }
		}
	
		SetHudSize(640,400,true);
		hudmessage(s:"A";HUDMSG_PLAIN,91,cR_ORANGE,0.5,0.5,1);
		delay(1);
		restart;
	}
	
	if (RoundReal == 164)
	{
		if( WinCondition1 != 0 && (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_ATTACK) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_ATTACK) )
		{
			SetActorProperty(0,APROP_Health,GetActorProperty(0,APROP_Health)-1);
		}
		if( WinCondition1 != 1 && (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_USE) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_USE) )
		{
			SetActorProperty(0,APROP_Health,GetActorProperty(0,APROP_Health)-1);
		}
		if( WinCondition1 != 2 && (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_JUMP) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_JUMP) )
		{
			SetActorProperty(0,APROP_Health,GetActorProperty(0,APROP_Health)-1);
		}
		if( WinCondition1 == 0 && (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_ATTACK) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_ATTACK) )
		{
			GiveInventory("HealthBonus",1);
		}
		if( WinCondition1 == 1 && (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_USE) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_USE) )
		{
			GiveInventory("HealthBonus",1);
		}
		if( WinCondition1 == 2 && (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_JUMP) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_JUMP) )
		{
			ThrustThingZ(0, 20, 0, 0);
			GiveInventory("HealthBonus",1);
		}
		if (GetActorProperty(0,APROP_Health) > 130 && CheckInventory("WonRoundItem") == 0)
		{
			LocalAmbientSound("DoomWare/Check",127);
			SpawnSpotForced("WonRoundEffect",0,0,0);
			GiveInventory("WonRoundItem",1);
			BypassWinCheck[PlayerNumber()] = true;
		}
		delay(1);
		restart;
	}
	SetFont("BIGFONT");
	hudmessage(s:"";HUDMSG_PLAIN,91,cR_ORANGE,0.5,0.9,1);
}
[/spoiler]
Remember that you are unique, just like everyone else.

User avatar
Fused
Contributor
Posts: 663
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
Contact:

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#5

Post by Fused » Fri Feb 10, 2017 8:07 pm

Yeah if the script is clientside, then I don't know how much there is to do. Like I said this is probably bugged as I had this too a long time ago. Try making a ticket.
Also, as some advice, try putting a large chunk of that setfont stuff into an array. It will still be alot, but atleast it's better readable.
My mods
Image Image

My socials
Image Image

User avatar
buu342
 
Posts: 58
Joined: Tue Nov 08, 2016 11:23 pm
Location: Earth

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#6

Post by buu342 » Fri Feb 10, 2017 10:15 pm

Fused wrote:Yeah if the script is clientside, then I don't know how much there is to do. Like I said this is probably bugged as I had this too a long time ago. Try making a ticket.
Also, as some advice, try putting a large chunk of that setfont stuff into an array. It will still be alot, but atleast it's better readable.
Will do. Thanks for the help.

I tried getting them into an array in the past, but I had little sucess. Honestly I don't really mind its size as Doom Builder allows me to fold the code, so it doesn't really become a problem.

In a completely different topic, is it possible to Uniquely identify players? Like, for example, if a specific player joined the server he would get a message printed on his screen. This could be by either getting the players' name via ACS and comparing it somehow. Or am I better off just making a database for that, which I doubt many players would use or even remember to? If I'm stuck with the database option, I'll have to ask the higherups in TSPG to create the database for me since the command to generate one is blocked.
Remember that you are unique, just like everyone else.

User avatar
Fused
Contributor
Posts: 663
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
Contact:

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#7

Post by Fused » Sat Feb 11, 2017 7:53 am

If you mean displaying a message the first time a player joins, just store a bool in his ini. You can check that and it will always work unless someone cleans their config.
My mods
Image Image

My socials
Image Image

User avatar
buu342
 
Posts: 58
Joined: Tue Nov 08, 2016 11:23 pm
Location: Earth

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#8

Post by buu342 » Sat Feb 11, 2017 10:11 am

Fused wrote:If you mean displaying a message the first time a player joins, just store a bool in his ini. You can check that and it will always work unless someone cleans their config.
Not quite. I wanted to display a message only to specific players.
Remember that you are unique, just like everyone else.

User avatar
Fused
Contributor
Posts: 663
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
Contact:

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#9

Post by Fused » Sat Feb 11, 2017 4:22 pm

buu342 wrote:
Fused wrote:If you mean displaying a message the first time a player joins, just store a bool in his ini. You can check that and it will always work unless someone cleans their config.
Not quite. I wanted to display a message only to specific players.
Then use setActivator() to said player and display a message using print or hudmessage. I'm not sure what else you mean.
My mods
Image Image

My socials
Image Image

User avatar
buu342
 
Posts: 58
Joined: Tue Nov 08, 2016 11:23 pm
Location: Earth

Re: Overriding Frag Message and GetCVar not working in Multiplayer

#10

Post by buu342 » Sat Feb 11, 2017 6:11 pm

Fused wrote:
buu342 wrote:
Fused wrote:If you mean displaying a message the first time a player joins, just store a bool in his ini. You can check that and it will always work unless someone cleans their config.
Not quite. I wanted to display a message only to specific players.
Then use setActivator() to said player and display a message using print or hudmessage. I'm not sure what else you mean.
Still not quite there yet. For example, I want the message to display only if I, as in Buu342, joins the server. No one else should get this specific message.
buu342 wrote:This could be by either getting the players' name via ACS and comparing it somehow. Or am I better off just making a database for that, which I doubt many players would use or even remember to? If I'm stuck with the database option, I'll have to ask the higherups in TSPG to create the database for me since the command to generate one is blocked.
Remember that you are unique, just like everyone else.

Post Reply