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

Some Day Of Defeat:Source related questions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alfred E. Neumann
Junior Member
Join Date: Jan 2010
Location: Germany
Old 01-08-2010 , 09:01   Some Day Of Defeat:Source related questions
Reply With Quote #1

Hi guys!

I'm pretty new to sourcemod scripting system.
Atm I'm working on another Hide and Seek Plugin for DOD:S.

So far everything is working great. Forum and Docs were great to start with .

Now I'm getting stuck with a few smaller things:

-----------------

1) Is it possible to end a round (of course with specifying which team has won)?

I saw a lot of code for CSS in the forum, but apparently this code is not working for DOD:S (OrangeBox vs. HL2).
So I tried some stuff, but I just dont get it.
Atm I use my own "roundbased" system, but it would be nicer if the game could handle it itself.

2) Another question is: is it possible to remove or replace the sprite placed over the head of a player when he is using voice chat?

I know that there is no way of "Hooking" the voice usage, but maybe it is possible to overwrite the cached sprite for voice usage...?

3) As I'm already asking a lot of stuff, here is another:
In Hide and Seek, the Hidden Team usually uses third person view. If done this with some code I found.

This code is working fine, but I wanted to add a "regain" system into the game, so the hidden team can regain a seeker to their team be killing him. The problem is: the third person view cam stays on the attacker or the dead body instead resetting to the actual position of the player.

I already tried to reset the player to first person and then set it back to third person again.
No success at all

---------------

I hope somebody can help
Alfred E. Neumann is offline
Alfred E. Neumann
Junior Member
Join Date: Jan 2010
Location: Germany
Old 01-09-2010 , 06:04   Re: Some Day Of Defeat:Source related questions
Reply With Quote #2

Nobody any ideas?

I got some more questions to ask:

Is there a way to block the minimap/map overview from beeing showed?

Afaik it is a client command (overview_mode) which could not be set by using ClientCommand or FakeClientCommand.
But maybe it is possible to remove the player positions or the loaded map-overview picture itself?

Is there a way to get the height of a model?

The problem is the same as for any plugin which changes the player model: most of the default none-player models of DOD have the "Ground" part set wrong. So the model is just shown partly. The rest is sunken to the ground.

My idea is to get the model height, to see where the end of the model is and place it higher instead of using the models "ground"-tag.

If this is not going to be working with replaceing the player model (SetEntityModel) I would attach an entity to the player (which is following him) and make the playermodel itself invisible.
But first I need to know the size of the model.. -.-
Alfred E. Neumann is offline
Alfred E. Neumann
Junior Member
Join Date: Jan 2010
Location: Germany
Old 01-11-2010 , 13:25   Re: Some Day Of Defeat:Source related questions
Reply With Quote #3

I really hate to *bump* topics, but is there really nobody who has any idea?!
Alfred E. Neumann is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 01-12-2010 , 23:29   Re: Some Day Of Defeat:Source related questions
Reply With Quote #4

To 1: yes
To 2: no
To 3: some of your Code will be helpfull
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
Alfred E. Neumann
Junior Member
Join Date: Jan 2010
Location: Germany
Old 01-13-2010 , 12:59   Re: Some Day Of Defeat:Source related questions
Reply With Quote #5

finally an answer

1) How to do this?

2) Ok, I already thought this

3)

Code:
// Offsets
new m_hObserverTarget_offs;
new m_iObserverMode_offs;
new m_iFOV_offs;
new m_Local_offs;
new m_bDrawViewmodel_offs;

// ******************************************************************************
// * Change Point Of View (for 3rd person)                                        *
// ******************************************************************************
SetPOV (client, bool:bThird) 
{
    if ((IsClientConnected(client)) && (IsClientInGame(client)))
    {
        if (bThird) {
            SetEntData(client, m_hObserverTarget_offs, 0, 4, true);
            SetEntData(client, m_iObserverMode_offs, 1, 4, true);
            SetEntData(client, m_iFOV_offs, 120, 4, true);
            SetEntData(client, m_Local_offs+m_bDrawViewmodel_offs, 0, 4, true); 
        }
        else {
            SetEntData(client, m_hObserverTarget_offs, 0, 4, true);
            SetEntData(client, m_iObserverMode_offs, 0, 4, true);
            SetEntData(client, m_iFOV_offs, 90, 4, true);
            SetEntData(client, m_Local_offs+m_bDrawViewmodel_offs, 1, 4, true); 
        }
    }
}
Alfred E. Neumann is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 01-13-2010 , 16:53   Re: Some Day Of Defeat:Source related questions
Reply With Quote #6

Quote:
Originally Posted by Alfred E. Neumann View Post
finally an answer

1) How to do this?

2) Ok, I already thought this

3)

Code:
// Offsets
new m_hObserverTarget_offs;
new m_iObserverMode_offs;
new m_iFOV_offs;
new m_Local_offs;
new m_bDrawViewmodel_offs;

// ******************************************************************************
// * Change Point Of View (for 3rd person)                                        *
// ******************************************************************************
SetPOV (client, bool:bThird) 
{
    if ((IsClientConnected(client)) && (IsClientInGame(client)))
    {
        if (bThird) {
            SetEntData(client, m_hObserverTarget_offs, 0, 4, true);
            SetEntData(client, m_iObserverMode_offs, 1, 4, true);
            SetEntData(client, m_iFOV_offs, 120, 4, true);
            SetEntData(client, m_Local_offs+m_bDrawViewmodel_offs, 0, 4, true); 
        }
        else {
            SetEntData(client, m_hObserverTarget_offs, 0, 4, true);
            SetEntData(client, m_iObserverMode_offs, 0, 4, true);
            SetEntData(client, m_iFOV_offs, 90, 4, true);
            SetEntData(client, m_Local_offs+m_bDrawViewmodel_offs, 1, 4, true); 
        }
    }
}
1) You need to find a signature to DOD's equivalent of the TerminateRound function. There may be something useful in this thread. Have fun.

3)
- use SetEntDataEnt2 when dealing with entities (m_hObserverTarget), -1 = "null"
- dont ignore the 4th param in SetEntData, props that hold boolean values are only 1 byte long (m_bDrawViewmodel)
- whats the deal with m_Local_offs? assuming its because youre using the deprecated function FindSendPropOffs, try FindSendPropInfo instead

Quote:
Originally Posted by Alfred E. Neumann View Post
The problem is: the third person view cam stays on the attacker or the dead body instead resetting to the actual position of the player.
Perhaps the game is overriding the values you set. Have you tried delaying it?

Quote:
Originally Posted by Alfred E. Neumann View Post
Is there a way to block the minimap/map overview from beeing showed?

Afaik it is a client command (overview_mode) which could not be set by using ClientCommand or FakeClientCommand.
But maybe it is possible to remove the player positions or the loaded map-overview picture itself?
See if any of the bits for m_iHideHUD happen to do what you want. Heres the list of them found in shareddefs.h (assume its for hl2dm), but the values vary from mod to mod. Usually the bits hide more than just one element of the hud, so this is pretty much a far shot.

Code:
// Hud Element hiding flags
#define	HIDEHUD_WEAPONSELECTION		( 1<<0 )	// Hide ammo count & weapon selection
#define	HIDEHUD_FLASHLIGHT			( 1<<1 )
#define	HIDEHUD_ALL					( 1<<2 )
#define HIDEHUD_HEALTH				( 1<<3 )	// Hide health & armor / suit battery
#define HIDEHUD_PLAYERDEAD			( 1<<4 )	// Hide when local player's dead
#define HIDEHUD_NEEDSUIT			( 1<<5 )	// Hide when the local player doesn't have the HEV suit
#define HIDEHUD_MISCSTATUS			( 1<<6 )	// Hide miscellaneous status elements (trains, pickup history, death notices, etc)
#define HIDEHUD_CHAT				( 1<<7 )	// Hide all communication elements (saytext, voice icon, etc)
#define	HIDEHUD_CROSSHAIR			( 1<<8 )	// Hide crosshairs
#define	HIDEHUD_VEHICLE_CROSSHAIR	( 1<<9 )	// Hide vehicle crosshair
#define HIDEHUD_INVEHICLE			( 1<<10 )

#define HIDEHUD_BITCOUNT			11
Quote:
Originally Posted by Alfred E. Neumann View Post
Is there a way to get the height of a model?
SourceMod sure doesnt have this functionality, although you can get the size of an entity using the model. Depending on what you really want this for, you may wanna consider defining a hardcoded list of models and their sizes.
__________________
plop
p3tsin is offline
Alfred E. Neumann
Junior Member
Join Date: Jan 2010
Location: Germany
Old 01-14-2010 , 03:22   Re: Some Day Of Defeat:Source related questions
Reply With Quote #7

Thanks for your help, I'll take a closer look to the commands you suggested.

I hope I get this signature scanning done. I already tried it with the linux binary, but I haven't found any matching string which has to do with "RoundEnd"/"RoundTerminate" or something (only RoundWon, but I think this get called if the round is already over)
Alfred E. Neumann 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:14.


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