Raised This Month: $ Target: $400
 0% 

help plz


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 04-23-2004 , 03:15   help plz
Reply With Quote #1

How would you make a plugin where you say a word like hello or something and a wav plays?

Itryed but only got errors
__________________
Nick is offline
Send a message via MSN to Nick
DFA-Haplo
Junior Member
Join Date: Apr 2004
Location: Illinois
Old 04-23-2004 , 04:11  
Reply With Quote #2

The people around here are great, but it really helps if you could post the code that you have and then allow people to point out mistakes or show you how, using your code. This helps you beome a better coder and it helps others like me learn in the process too
DFA-Haplo is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 04-23-2004 , 20:47  
Reply With Quote #3

would it look something like this?

Code:
/* say_sounds, v1.0 NicK */ #include <amxmodx> #include <amxmisc> public plugin_init() { register_plugin("Say Sounds","1.0","NicK") register_clcmd("say","say_event") } public plugin_precache() { precache_sound("misc/spank.wav") } new phrase[1][] = { "oneandonly" } public say_event(id) {    new sid[10]    num_to_str(id,sid,10)    new said[192]    read_args(said,191)        for(new i = 0 ;i < 1; i += 1)       if(containi(said,phrase[i]) != -1) {          set_hudmessage(225, 25, 25, -1.0, 0.32, 0, 2.0, 9.0, 0.8, 0.8, 2)                 show_hudmessage(0,"I am the one and only!")             set_task(1.0,"client",0,sid,10)             break     } } public client(sid[]) {    new id = str_to_num(sid)    client_cmd(0,"spk misc/oneandonly")   }
__________________
Nick is offline
Send a message via MSN to Nick
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 04-23-2004 , 23:00  
Reply With Quote #4

"spk" isnt a command
__________________
QwertyAccess is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 04-23-2004 , 23:14  
Reply With Quote #5

what should it be?
__________________
Nick is offline
Send a message via MSN to Nick
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-23-2004 , 23:19  
Reply With Quote #6

Quote:
Originally Posted by QwertyAccess
"spk" isnt a command
Ur wrong..

"spk" is a clientside command to play sounds....
__________________
My Plugins

Got ??
AssKicR is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 04-24-2004 , 00:28  
Reply With Quote #7

yea its right cuz I just got it to work thanks alot
__________________
Nick is offline
Send a message via MSN to Nick
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 04-24-2004 , 00:30  
Reply With Quote #8

well, spk will only execute on the client side, not throughout the server unless you tell it to output to everyone
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers
FlyingMongoose is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 04-24-2004 , 00:39  
Reply With Quote #9

How would I do that? Whats the code?

I thought

Code:
client_cmd(0,"spk misc/oneandonly")

plays wav to all
and

Code:
client_cmd(ids[0], "spk misc/oneandonly")

played wav to only one client
__________________
Nick is offline
Send a message via MSN to Nick
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-24-2004 , 03:34  
Reply With Quote #10

client_cmd(IDOFFPLAYER,"command goes here")

IDOFPLAYER is a value between 1 and 32.... if you enter 0 it executes on everyone
__________________
My Plugins

Got ??
AssKicR 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 03:18.


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