Raised This Month: $ Target: $400
 0% 

Do something after client joined team..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Br41n
Junior Member
Join Date: Apr 2006
Location: Magdeburg, Germany
Old 12-12-2006 , 14:27   Do something after client joined team..
Reply With Quote #1

Hi,
i want to do something, when a player joined a team.. but it doesn't work.. it's my first plugin and I never coded with C++, but i read the documentation with the basics of pawn..

My Code:
PHP Code:
public client_putinserver id ) {
    
// on join say hello to all
    
    
client_cmd(id"say hi")
    
    return 
PLUGIN_HANDLED

It doesn't work... I'm sure, that i did something wrong, but i don't know, what... Do I have to use set_task or do I have to set the variable "id"?

Thanks
Br41n
__________________
Br41n is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-12-2006 , 15:00   Re: Do something after client joined team..
Reply With Quote #2

try this
Code:
    #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {  register_plugin(PLUGIN, VERSION, AUTHOR)    // Add your code here... } public client_putinserver(id) {  client_print(id,print_chat,"Hello I Just Joined"); }
The Specialist is offline
Send a message via AIM to The Specialist
VEN
Veteran Member
Join Date: Jan 2005
Old 12-12-2006 , 15:23   Re: Do something after client joined team..
Reply With Quote #3

You can catch the TextMsg #Game_join_ct and #Game_join_terrorist (2nd arg) using register_event
VEN is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-12-2006 , 15:26   Re: Do something after client joined team..
Reply With Quote #4

Ven is always full of usefull info
The Specialist is offline
Send a message via AIM to The Specialist
Br41n
Junior Member
Join Date: Apr 2006
Location: Magdeburg, Germany
Old 12-12-2006 , 16:03   Re: Do something after client joined team..
Reply With Quote #5

Hey... thanks guys... i got it working:

Code:
public client_putinserver ( id ) {
	// on join display vote
	
	set_task(3.0,"showBindMenu",id)
	return PLUGIN_CONTINUE
}
Now i can use every function..

Thanks
Br41n
__________________
Br41n 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 06:51.


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