Raised This Month: $ Target: $400
 0% 

How to bind say command ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ALIENMODSX
BANNED
Join Date: Nov 2008
Old 12-29-2010 , 04:06   How to bind say command ?
Reply With Quote #1

Hello ,

I have applied a nanosuit script on my server . To access the nanosuit menu , we have to manually type "/nanosuit" every time .
How can i make it so , that anyone who join the server and presses "t" key , automatically says "/nanosuit" ?

thank u in advance !
ALIENMODSX is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 12-29-2010 , 05:28   Re: How to bind say command ?
Reply With Quote #2

A better way than changing the player's binds (which they might not be happy about) is to
PHP Code:
register_clcmd("say /nanosuit""NanosuitFunction")
register_clcmd("impulse 201" "NanosuitFunction"
impulse 201 is the default bind for the t key, used for the spray. This way you can change what the key does without touching the player's binds on other servers.
Elusive138 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-29-2010 , 05:49   Re: How to bind say command ?
Reply With Quote #3

I think you can't catch impulse this way.

Correct way is register_impulse(201, "callback_function")
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 12-29-2010 , 06:39   Re: How to bind say command ?
Reply With Quote #4

Oh really? Well, if clcmd doesn't work..

Only problem is register_impulse is an engine.inc native.

EDIT: Connor's right, doesn't work.. If you aren't using engine, might I suggest another key, maybe 'c' (radio3)?

Last edited by Elusive138; 12-29-2010 at 06:44.
Elusive138 is offline
MuzzMikkel
Member
Join Date: Aug 2010
Location: Denmark
Old 12-29-2010 , 07:26   Re: How to bind say command ?
Reply With Quote #5

Quote:
Originally Posted by Elusive138 View Post
A better way than changing the player's binds (which they might not be happy about) is to
PHP Code:
register_clcmd("say /nanosuit""NanosuitFunction")
register_clcmd("impulse 201" "NanosuitFunction"
impulse 201 is the default bind for the t key, used for the spray. This way you can change what the key does without touching the player's binds on other servers.
Where should paste it?
MuzzMikkel is offline
Send a message via MSN to MuzzMikkel
Elusive138
Senior Member
Join Date: Dec 2010
Old 12-29-2010 , 07:48   Re: How to bind say command ?
Reply With Quote #6

Quote:
Originally Posted by MuzzMikkel View Post
Where should paste it?
Please read the other posts, as that particular method does not work. Also, this is scripting help, so it's probably best if you have some basic understanding of the structure of a script.

Even if it were possible to register_clcmd an impulse, the function is just an example and I highly doubt it's actually called "NanosuitFunction".
Elusive138 is offline
ALIENMODSX
BANNED
Join Date: Nov 2008
Old 12-29-2010 , 11:59   Re: How to bind say command ?
Reply With Quote #7

could anyone just give me a working sma .... i am a server owner and im sorry , but i dont even know the "s" of scripting .... so plz provide me with a .sma file which can do what i requested in first post
ALIENMODSX is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2010 , 12:48   Re: How to bind say command ?
Reply With Quote #8

Next time, post in the requests thread not in Scripting Help.


Quote:
Originally Posted by Elusive138 View Post
Only problem is register_impulse is an engine.inc native.
How is that a problem?
__________________
fysiks is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 12-29-2010 , 13:07   Re: How to bind say command ?
Reply With Quote #9

Quote:
Originally Posted by Elusive138 View Post
Only problem is register_impulse is an engine.inc native.
Do you think using fakemeta you'll pr0 scripter? Lol
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-29-2010 , 13:14   Re: How to bind say command ?
Reply With Quote #10

Quote:
Originally Posted by meTaLiCroSS View Post
Do you think using fakemeta you'll pr0 scripter? Lol
He said nothing about Fakemeta.
__________________
hleV 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 02:03.


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