Raised This Month: $32 Target: $400
 8% 

[STOCK] Usage of env_instructor_hint as a HUD


Post New Thread Reply   
 
Thread Tools Display Modes
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 02-03-2016 , 20:09   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #21

Quote:
Originally Posted by Lord_Rofl View Post
dont work, only the first get the message
instead of saying it doesn't work, why don't you show us your code then
__________________
8guawong is offline
Lord_Rofl
Senior Member
Join Date: Aug 2006
Location: Bad Pyrmont, Germany
Old 02-04-2016 , 10:42   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #22

Quote:
Originally Posted by 8guawong View Post
instead of saying it doesn't work, why don't you show us your code then
Because zipcore tried it and he knows what he do.
He quit working with env_instructor_hint because of the limitations and annoying sounds that you canīt disable.
Lord_Rofl is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-04-2016 , 14:53   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #23

It's likely that sending the usrmsg directly will allow some more changes. Not sure if there are sounds and other settings.
Will have to use cheats with show user msgs to get the structure.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
hitmany
Senior Member
Join Date: Jul 2010
Old 02-09-2016 , 08:39   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #24

Its easy to block:
Tested, working!
PHP Code:
public OnPluginStart() 

    
AddAmbientSoundHook(AmbientSHook:OnNormalSoundPlayed);


public 
Action:OnNormalSoundPlayed(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{    
    if (
entity <= MaxClients)
    {
        if(
StrContains(sample"beepclear") != -1)
        {
                
StopSound(entitySNDCHAN_STATIC"ui/beepclear.wav");            
                return 
Plugin_Stop;
        }
    }
    return 
Plugin_Continue;

Thank you for the stock!

Trying with icon_button, caption with binding button name replace, but Icon is not replaced

DisplayInstructorHint(client, 5.0, 0.1, 0.1, false, false, "icon_button", "icon_button", "use", false, {0, 255, 0}, "Press %+use% for being batman");
Whats wrong?

Last edited by hitmany; 02-10-2016 at 04:47.
hitmany is offline
Lord_Rofl
Senior Member
Join Date: Aug 2006
Location: Bad Pyrmont, Germany
Old 02-09-2016 , 09:38   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #25

Yea the sound is not the real problem but the message is only transmitted to one player. Ways to fix this result in a massive amount of entities.
Lord_Rofl is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-10-2016 , 02:29   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #26

Send the message as a usrmsg instead.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
hitmany
Senior Member
Join Date: Jul 2010
Old 02-10-2016 , 04:49   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #27

I found way how to use binding icon, use use_binding instead of icon_button
Quote:
Originally Posted by friagram View Post
Send the message as a usrmsg instead.
Can you explain or write example?

Cant find valid msg:
Maybe CS_UM_Train
PHP Code:

new Handle:hBf StartMessageOne("Train"client)
if(
Handle:hBf != INVALID_HANDLE)
{
    
PbSetInt(hBf"hint_static"1);
    
PbSetFloat(hBf"hint_timeout"0.1);
    
PbSetString(hBf"hint_icon_onscreen""use_binding");
    
PbSetString(hBf"hint_icon_offscreen""use_binding");
    
PbSetString(hBf"hint_binding""use");
    
PbSetString(hBf"hint_caption""Hello");
}
EndMessage(); 

Last edited by hitmany; 02-10-2016 at 05:16.
hitmany is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-13-2016 , 14:23   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #28

Quote:
Originally Posted by hitmany View Post
I found way how to use binding icon, use use_binding instead of icon_button

Can you explain or write example?

Cant find valid msg:
Maybe CS_UM_Train
PHP Code:

new Handle:hBf StartMessageOne("Train"client)
if(
Handle:hBf != INVALID_HANDLE)
{
    
PbSetInt(hBf"hint_static"1);
    
PbSetFloat(hBf"hint_timeout"0.1);
    
PbSetString(hBf"hint_icon_onscreen""use_binding");
    
PbSetString(hBf"hint_icon_offscreen""use_binding");
    
PbSetString(hBf"hint_binding""use");
    
PbSetString(hBf"hint_caption""Hello");
}
EndMessage(); 

If you turn on cheats you can see net messages, I think that would be a start.
I've been too busy to look into this, sorry.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 02-14-2016 , 02:36   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #29

Yes it's "Train", but it doesn't work like this, you send an entity id with this usermessage, so...
__________________
zipcore is offline
TheWho
AlliedModders Donor
Join Date: Jul 2012
Old 02-18-2016 , 17:42   Re: [STOCK] Usage of env_instructor_hint as a HUD
Reply With Quote #30

IMHO I don't think that there is a protobuf yet, we can't even use html in it, the color is controlled with the variable instead of html.

Please don't use this entity spawning script when you can fire the event..

PHP Code:
new Handle:event CreateEvent("instructor_server_hint_create");
    if (
event == INVALID_HANDLE)
    {
        return;
    }
    
    
SetEventString(event"hint_name""RandomHint");
    
SetEventString(event"hint_replace_key""RandomHint");
    
SetEventInt(event"hint_target"0);
    
SetEventInt(event"hint_activator_userid"0);
    
SetEventInt(event"hint_timeout"20 );
    
SetEventString(event"hint_icon_onscreen""icon_tip");
    
SetEventString(event"hint_icon_offscreen""icon_tip");
    
SetEventString(event"hint_caption""Testing..");
    
SetEventString(event"hint_activator_caption""Testing..");
    
SetEventString(event"hint_color""255 0 0");
    
SetEventFloat(event"hint_icon_offset"0.0 );
    
SetEventFloat(event"hint_range"0.0 );
    
SetEventInt(event"hint_flags"1);// Change it..
    
SetEventString(event"hint_binding""");
    
SetEventBool(event"hint_allow_nodraw_target"true);
    
SetEventBool(event"hint_nooffscreen"false);
    
SetEventBool(event"hint_forcecaption"false);
    
SetEventBool(event"hint_local_player_only"false);
    
FireEvent(event); 
This will be visible to all players when they have gameinstructor_enable 1 and your server sv_gameinstructor_disable 0, they need to be in a team, alive and on ground. ( All those thing are hackable but gameinstructor_enable not and EVERYONE has disabled it anyway so don't waste more time on this please. )

You can't block those annoying instructions since they aren't even serverside. Proof? Here:
PHP Code:
HookEvent("instructor_server_hint_create"Event_HintCreate);
HookEvent("instructor_server_hint_stop"Event_HintStop);

public 
Action:Event_HintStop(Handle:event, const String:name[], bool:dontBroadcast)
{
    
PrintToServer(">>> Fired instructor_server_hint_stop!!");
    return 
Plugin_Continue;
}

public 
Action:Event_HintCreate(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
hint_target GetEventInt(event"hint_target");
    
PrintToServer(">>> Fired instructor_server_hint_create!! hint_target: %d"hint_target);
    return 
Plugin_Continue;

What are you talking about train? Train has nothing to do with messages, it is just a func_tracktrain and stuff..

edit:

Btw why is the csgo event list outdated?
https://wiki.alliedmods.net/Counter-...fensive_Events

Last edited by TheWho; 02-18-2016 at 17:48.
TheWho is offline
Reply


Thread Tools
Display Modes

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 18:06.


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