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

Emit sound on walk


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Qes
AlliedModders Donor
Join Date: Jul 2014
Old 03-13-2018 , 08:29   Emit sound on walk
Reply With Quote #1

Hello,
How I can display sound on walk (shift key)?
Game disable sound on walk, but I want to add this option like in case of player runs.

[CS:GO]

Last edited by Qes; 03-19-2018 at 19:39.
Qes is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 03-18-2018 , 09:23   Re: display sound on walk
Reply With Quote #2

how do you "display" sound?
__________________
8guawong is offline
Qes
AlliedModders Donor
Join Date: Jul 2014
Old 03-19-2018 , 06:11   Re: display sound on walk
Reply With Quote #3

I want to add sound to player when he walk on shift, because game not display sound when player walk on shift
Qes is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 03-19-2018 , 07:38   Re: display sound on walk
Reply With Quote #4

Quote:
Originally Posted by Qes View Post
I want to add sound to player when he walk on shift, because game not display sound when player walk on shift
https://translate.google.com/
word:display
Code:
new bool:walking[MAXPLAYERS+1];
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{

	if (buttons & IN_WALK)
	{
		walking[client] = true;
		buttons &= ~IN_WALK;
		SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 0.5);
		return Plugin_Changed;
	}
	else if (walking[client])
	{
		walking[client] = false;
		SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
	}
	
	return Plugin_Continue;
}

Last edited by Indarello; 03-19-2018 at 07:41.
Indarello is offline
Qes
AlliedModders Donor
Join Date: Jul 2014
Old 03-19-2018 , 19:38   Re: display sound on walk
Reply With Quote #5

Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon, &subtype, &cmdnum, &tick, &seed, mouse[2])
{
	if(!IsValidClient(client))
	return Plugin_Continue;

	if(buttons & IN_SPEED && buttons & IN_FORWARD)
	{
		/* Other code */
		SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", 2.5);
		SetEntityGravity(client, 0.88);
	}
	/* Other code */

	SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", 1.0);
	SetEntityGravity(client, 1.0);

	return Plugin_Continue;
}
Emit sound footsteps when player use button IN_SPEED and IN_FORWARD.
IN_SPEED = shift

In CS:GO when player use button shift (IN_SPEED), he has silent footsteps.
Qes 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 04:37.


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