This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

~~ Questions Time ~~


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Patrick Star
Junior Member
Join Date: Apr 2012
Old 04-27-2012 , 13:46   ~~ Questions Time ~~
Reply With Quote #1

I'm making a mod and I seriously need help. So I would love if someone could answer the following questions.

Q: What is wrong with the following code?, if I want to put the TF_Cond of being Ubercharged of the client "other" being ubered for 5 seconds lets say. - The issue is that the amount of time stays 30 secs.
A: No answer , cause no one answered yet.
PHP Code:
TF2_AddCondition(other,TFCond_Ubercharged,5); 

Q:How do I play sounds? - Lets say the file of the sound is at ...tf/sounds/player/fire_out
A: No answer , cause no one answered yet.
Thanks for who helps. Please if you can, P.M me or leave at the comment your Steam Profile Link so I could contact you.

Last edited by Patrick Star; 04-27-2012 at 13:46.
Patrick Star is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 04-27-2012 , 14:23   Re: ~~ Questions Time ~~
Reply With Quote #2

1/
Code:
/**
 * Adds a condition to a player
 *
 * @param client		Player's index.
 * @param condition		Integer identifier of condition to apply.
 * @param duration		Duration of condition (does not apply to all conditions).
 * @noreturn
 * @error				Invalid client index, client not in game, or no mod support.
 */
native TF2_AddCondition(client, TFCond:condition, Float:duration);
"Duration of condition (does not apply to all conditions)."

2/
Code:
/**
 * Emits a sound to a list of clients.
 *
 * @param clients		Array of client indexes.
 * @param numClients	Number of clients in the array.
 * @param sample		Sound file name relative to the "sounds" folder.
 * @param entity		Entity to emit from.
 * @param channel		Channel to emit with.
 * @param level			Sound level.
 * @param flags			Sound flags.
 * @param volume		Sound volume.
 * @param pitch			Sound pitch.
 * @param speakerentity	Unknown.
 * @param origin		Sound origin.
 * @param dir			Sound direction.
 * @param updatePos		Unknown (updates positions?)
 * @param soundtime		Alternate time to play sound for.
 * @param ...			Optional list of Float[3] arrays to specify additional origins.
 * @noreturn
 * @error				Invalid client index.
 */
native EmitSound(const clients[],
				 numClients,
				 const String:sample[],
				 entity = SOUND_FROM_PLAYER,
				 channel = SNDCHAN_AUTO,
				 level = SNDLEVEL_NORMAL,
				 flags = SND_NOFLAGS,
				 Float:volume = SNDVOL_NORMAL,
				 pitch = SNDPITCH_NORMAL,
				 speakerentity = -1,
				 const Float:origin[3] = NULL_VECTOR,
				 const Float:dir[3] = NULL_VECTOR,
				 bool:updatePos = true,
				 Float:soundtime = 0.0,
				 any:...);
3/ SourceMod Scripting API
__________________
Leonardo is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 04-27-2012 , 15:28   Re: ~~ Questions Time ~~
Reply With Quote #3

1. TF2_AddCondition(other, TFCond_Ubercharged, 5.0);

2. PrecacheSound("player/fire_out.wav");
EmitSoundToAll("player/fire_out.wav");

And yeah, the duration won't apply to all conditions. But, it applies to Ubercharged, I know that.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
Patrick Star
Junior Member
Join Date: Apr 2012
Old 04-27-2012 , 17:08   Re: ~~ Questions Time ~~
Reply With Quote #4

Quote:
Originally Posted by MasterOfTheXP View Post
1. TF2_AddCondition(other, TFCond_Ubercharged, 5.0);

2. PrecacheSound("player/fire_out.wav");
EmitSoundToAll("player/fire_out.wav");

And yeah, the duration won't apply to all conditions. But, it applies to Ubercharged, I know that.
Thank you very , very much!

Quote:
Originally Posted by Leonardo View Post
1/
Code:
/**
 * Adds a condition to a player
 *
 * @param client		Player's index.
 * @param condition		Integer identifier of condition to apply.
 * @param duration		Duration of condition (does not apply to all conditions).
 * @noreturn
 * @error				Invalid client index, client not in game, or no mod support.
 */
native TF2_AddCondition(client, TFCond:condition, Float:duration);
"Duration of condition (does not apply to all conditions)."

2/
Code:
/**
 * Emits a sound to a list of clients.
 *
 * @param clients		Array of client indexes.
 * @param numClients	Number of clients in the array.
 * @param sample		Sound file name relative to the "sounds" folder.
 * @param entity		Entity to emit from.
 * @param channel		Channel to emit with.
 * @param level			Sound level.
 * @param flags			Sound flags.
 * @param volume		Sound volume.
 * @param pitch			Sound pitch.
 * @param speakerentity	Unknown.
 * @param origin		Sound origin.
 * @param dir			Sound direction.
 * @param updatePos		Unknown (updates positions?)
 * @param soundtime		Alternate time to play sound for.
 * @param ...			Optional list of Float[3] arrays to specify additional origins.
 * @noreturn
 * @error				Invalid client index.
 */
native EmitSound(const clients[],
				 numClients,
				 const String:sample[],
				 entity = SOUND_FROM_PLAYER,
				 channel = SNDCHAN_AUTO,
				 level = SNDLEVEL_NORMAL,
				 flags = SND_NOFLAGS,
				 Float:volume = SNDVOL_NORMAL,
				 pitch = SNDPITCH_NORMAL,
				 speakerentity = -1,
				 const Float:origin[3] = NULL_VECTOR,
				 const Float:dir[3] = NULL_VECTOR,
				 bool:updatePos = true,
				 Float:soundtime = 0.0,
				 any:...);
3/ SourceMod Scripting API
Even now that you sent it to me - it's the same as it shows on the site. Very unclearly and blurry.
Patrick Star 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 23:35.


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