AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   ShowSyncHudText in TF2 (https://forums.alliedmods.net/showthread.php?t=293948)

cidra 02-15-2017 14:11

ShowSyncHudText in TF2
 
Hi all, i'm trying to make a really simple plugin that displays on the player's HUD the zone the client is currently situated. I'm using this really useful plugin for my objective: https://forums.alliedmods.net/showthread.php?p=2023591

I've read that the limit of different texts to send on the majority of games is 6. (Max 6 channels)
Since the zones in my level are way above 6, is there a way to display more than 6 different messages on the same moment? (for example, when more than 6 players are in different zones)

Thanks in advance :)

Chaosxk 02-15-2017 14:48

Re: ShowSyncHudText in TF2
 
It sounds like you want to display a different message for each client (depending on what level they are at), not displaying more than 6 messages to 1 client at the same time.

If so just do

Code:

ShowSyncHudText(client, HUDHandle, "You are at level: %d", g_ClientLevel[client]);
Where g_ClientLevel is a global variable that holds what level that client is currently at, which you manually set.

Mitchell 02-15-2017 14:51

Re: ShowSyncHudText in TF2
 
You can't without editing the client's engine. You can however use the "\n" to make the text goto the next line.

cidra 02-17-2017 03:17

Re: ShowSyncHudText in TF2
 
Quote:

Originally Posted by Chaosxk (Post 2495675)
It sounds like you want to display a different message for each client (depending on what level they are at), not displaying more than 6 messages to 1 client at the same time.

If so just do

Code:

ShowSyncHudText(client, HUDHandle, "You are at level: %d", g_ClientLevel[client]);
Where g_ClientLevel is a global variable that holds what level that client is currently at, which you manually set.

It works! Thank you. Thought that I couldn't add variables in the string due to "const"


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

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