Raised This Month: $ Target: $400
 0% 

quick register_concmd() related question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Damocles
Member
Join Date: Jan 2005
Old 01-20-2005 , 05:54   quick register_concmd() related question
Reply With Quote #1

hey all,

i was wondering are there a list of constants anywhere that can be found that can be used to cause an event. For example

register_concmd() executes a function given a particular command is executed.

I have seen commands like this:

register_concmd("admin_exec","admin_exec",0,"- execute a command on the targets client")

and also like this....

register_concmd("chooseteam","team_block",0)

What i want is a list of the key words that can be used to raise events. 'chooseteam' is obviously a keyword that is used when a client changes team....are there keywords like 'connect' and 'endround' aswell ???

Im after executing a command when a user connects, so therefore can i use...

register_concmd("connect","execute_example_fu nction",0)

?? Thanks for any help
Damocles is offline
Da Bishop
Senior Member
Join Date: Aug 2004
Location: Chester County PA
Old 01-20-2005 , 08:49  
Reply With Quote #2

Code:
register_concmd()

This is used to make a function that runs when someone enters the command in a console.

To get when a player connects simple make a public function like so

Code:
public  client_connect(id) { //code }

To get when a player is actually in the server

Code:
public client_putinserver(id) { //code }
__________________
Anything that is done can only be done better by urself - since life is a opinion make it the way urs feel its best

~live by it
Da Bishop is offline
Send a message via MSN to Da Bishop
Damocles
Member
Join Date: Jan 2005
Old 01-20-2005 , 08:54  
Reply With Quote #3

thanks for your help Bishop.

also do i have to register that im using a command, i.e.

register_event("client_putinserver", "check_rates", "a")

or will 'client_putinserver' be automatically called when a user connects and i can directly put my code within the client_putinserver function ?
Damocles is offline
Da Bishop
Senior Member
Join Date: Aug 2004
Location: Chester County PA
Old 01-20-2005 , 15:01  
Reply With Quote #4

Its a built in function so yes, Its called automatically.

note: client put in server is when they are in the server. client connect is when they connect. Just a slight note
__________________
Anything that is done can only be done better by urself - since life is a opinion make it the way urs feel its best

~live by it
Da Bishop is offline
Send a message via MSN to Da Bishop
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 19:25.


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