Raised This Month: $51 Target: $400
 12% 

Solved game_text l4d2 help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emilio3
Member
Join Date: Aug 2013
Location: London UK
Old 04-27-2017 , 11:18   game_text l4d2 help
Reply With Quote #1

i try to put in top right text static but not working
what is wrong
any help please


PHP Code:
#include <sourcemod>
#include <sdktools>


public OnPluginStart()
{
    
HookEvent"round_start",            EVENT_RoundStart );    
}

public 
EVENT_RoundStart(Handle event, const char[] namebool dontBroadcast)
{
    
int i 1;
    while (
<= MaxClients)
    
CreateTimer0.01Timer_Hudi);
}
    
public 
Action Timer_Hud(Handle timerany client)
{
    
int ent CreateEntityByName("game_text");
    
DispatchKeyValue(ent"channel""1");
    
DispatchKeyValue(ent"color""255 255 255");
    
DispatchKeyValue(ent"color2""0 0 0");
    
DispatchKeyValue(ent"effect""0");
    
DispatchKeyValue(ent"fadein""0.1");
    
DispatchKeyValue(ent"fadeout""55555555");
    
DispatchKeyValue(ent"fxtime""0.25");         
    
DispatchKeyValue(ent"holdtime""44444444");
    
DispatchKeyValue(ent"message""UKSymbyosys");
    
DispatchKeyValue(ent"spawnflags""0");     
    
DispatchKeyValue(ent"x""1");
    
DispatchKeyValue(ent"y""0");         
    
DispatchSpawn(ent);
    
SetVariantString("!activator");
    if(
IsValidEntity (ent))  
    
AcceptEntityInput(ent,"display",client);
    return 
Plugin_Handled;


Last edited by Emilio3; 11-29-2017 at 10:53.
Emilio3 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-27-2017 , 12:56   Re: game_text l4d2 help
Reply With Quote #2

Why are you using the game_text entity instead of the built-in HudMsg natives?
__________________
asherkin is offline
Emilio3
Member
Join Date: Aug 2013
Location: London UK
Old 04-28-2017 , 02:19   Re: game_text l4d2 help
Reply With Quote #3

because tsay not working in l4d2 and hud synchroniser not warking too in l4d2
i need put in top right static one text i try to many plugin to do but not working
you know any working in L4D2 asherkin
Emilio3 is offline
Emilio3
Member
Join Date: Aug 2013
Location: London UK
Old 04-28-2017 , 03:23   Re: game_text l4d2 help
Reply With Quote #4

Quote:
Originally Posted by asherkin View Post
Why are you using the game_text entity instead of the built-in HudMsg natives?
because not working this is the code with the native HudMsg
PHP Code:
#include <sourcemod>
#include <halflife>


public OnPluginStart() {
    
CreateTimer(5.0SendHudMsgTimerINVALID_HANDLE);
}

SendHudMsg(clientId) {
    new 
Handle:pb StartMessageOne("HudMsg"clientId);
 
    
PbSetInt(pb"channel"1);
    
    
float pos[2] = { 1.00.0 };
    
PbSetVector2D(pb"pos"pos);
    
    
int color[4] = { 25500255 };
    
PbSetColor(pb"clr1"color);
    
PbSetColor(pb"clr2"color);
    
    
PbSetInt(pb"effect"0);
    
PbSetFloat(pb"fade_in_time"1.0);
    
PbSetFloat(pb"fade_out_time"5555555.0);
    
PbSetFloat(pb"hold_time"44444444.0);
    
PbSetFloat(pb"fx_time"0.5);
    
    
PbSetString(pb"text""UK-Symbyosys");
 
    
EndMessage();
}

public 
Action:SendHudMsgTimer(Handle:timer) {
    for (
int i 1<= MaxClientsi++) {
        if (
IsClientInGame(i)) {
            
SendHudMsg(i);
        }
    }
    
    return 
Plugin_Continue;

Emilio3 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-28-2017 , 03:34   Re: game_text l4d2 help
Reply With Quote #5

If HudMsg doesn't work game_text won't either.
__________________
asherkin is offline
Emilio3
Member
Join Date: Aug 2013
Location: London UK
Old 04-28-2017 , 03:54   Re: game_text l4d2 help
Reply With Quote #6

Quote:
Originally Posted by asherkin View Post
If HudMsg doesn't work game_text won't either.
you know any way to print in Top Right static permanent the name my server in SCREEN asherkin
because only want this

Last edited by Emilio3; 04-30-2017 at 09:28.
Emilio3 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 04-30-2017 , 09:20   Re: game_text l4d2 help
Reply With Quote #7

try something like this:
PHP Code:
Handle HudHintTimers[MAXPLAYERS+1];
float fTime 5.0;

public 
void OnClientPostAdminCheck(int client)
{
    if(
client <= MaxClientsHudHintTimers[client] = CreateTimer(fTimeTimer_UpdateHudHintclientTIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public 
void OnClientDisconnect(int client)
{
    if(
HudHintTimers[client] != null)
    {
        
KillTimer(HudHintTimers[client]);
        
HudHintTimers[client] = null;
    }
}

public 
Action Timer_UpdateHudHint(Handle timerany client)
{
    
SetHudTextParams(0.990.01fTime 0.125525525525500.00.10.1);
    
ShowHudText(client, -1"UKSymbyosys");
    return 
Plugin_Continue;

__________________
Grey83 is offline
Emilio3
Member
Join Date: Aug 2013
Location: London UK
Old 04-30-2017 , 09:48   Re: game_text l4d2 help
Reply With Quote #8

i try but not working in l4d2 SetHudTextParams and game_text and native HudMsg but i see in one server russ print on top right and down right
Emilio3 is offline
Emilio3
Member
Join Date: Aug 2013
Location: London UK
Old 04-30-2017 , 09:49   Re: game_text l4d2 help
Reply With Quote #9

any way more to do please
Emilio3 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 04-30-2017 , 18:03   Re: game_text l4d2 help
Reply With Quote #10

Emilio3, maybe it's just overlay?
You can make screenshot?
__________________
Grey83 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:31.


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