Raised This Month: $ Target: $400
 0% 

I made one plugin but..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mrrr
Member
Join Date: Jun 2007
Old 07-16-2007 , 09:58   I made one plugin but..
Reply With Quote #1

Hello

I made this plugin:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "plugin"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("say /command", "server_command", ADMIN_ALL, "something here")
}
public server_command(id)
{
client_print(id, print_chat, "*************** something ***************")
client_print(id, print_chat, "something here")
client_print(id, print_chat, "*************** something ***************")
return PLUGIN_HANDLED
}
public playerconnect(id)
{
client_print(id, print_chat, "*************** something ***************")
client_print(id, print_chat, "something here")
client_print(id, print_chat, "*************** something ***************")
}

public client_putinserver(id) {
new name[32];
get_user_name(id,name,31)
server_cmd("say player %s is connecting",name)
}

But when i or other people connect, it doesn't display anything else except "player NICKNAME_HERE is connecting"

Yes.. the command: /command WORKS, but the public playerconnect(id) doesnt

Can you tell me why, and how i can fix it ?

Thanks
Regards

Last edited by Mrrr; 07-16-2007 at 10:06.
Mrrr is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-16-2007 , 10:03   Re: I made one plugin but..
Reply With Quote #2

1.is public client_connect(id) !
2.You can't print a message to a player when connect because is not in game! You can print to all a message when someone connect using '0' instead 'id'
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Mrrr
Member
Join Date: Jun 2007
Old 07-16-2007 , 10:43   Re: I made one plugin but..
Reply With Quote #3

Okey, i changed playerconnect(id) to client_connect(id)

But it doesn't display the text in private when a player is connected.
(I want when a player is connected in server, and he is choose a team, server to display to him a messages)

Quote:
You can't print a message to a player when connect because is not in game! You can print to all a message when someone connect using '0' instead 'id'
It doesn't metter, because the message in public client_putinserver must be displayed to all peoples (and it works).

-----------------------------------------

When i tryed again with your suggestion (to replace playerconnect(id) with client_connect(id)) it doesn't work again.

Just nothing is displayed.
Everything else is working except this. :/

sorry for my bad english

Thanks
Regards,
Mrrr
Mrrr is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-16-2007 , 10:48   Re: I made one plugin but..
Reply With Quote #4

Man! When player is connecting you CAN'T print him a message! Maybe do a task!

Code:
public client_connect(id)
{
    set_task(15.0,"print_something",id);
}
 
public print_something(id)
{
    client_print(id, print_chat, "*************** something ***************")
    client_print(id, print_chat, "something here")
    client_print(id, print_chat, "*************** something ***************")
}
15 seconds ater player is connecting, will show him that message!
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 07-16-2007 , 11:23   Re: I made one plugin but..
Reply With Quote #5

Quote:
Originally Posted by Alka View Post
Man! When player is connecting you CAN'T print him a message! Maybe do a task!

Code:
public client_connect(id)
{
    set_task(15.0,"print_something",id);
}
 
public print_something(id)
{
    client_print(id, print_chat, "*************** something ***************")
    client_print(id, print_chat, "something here")
    client_print(id, print_chat, "*************** something ***************")
}
15 seconds ater player is connecting, will show him that message!
what about
client_print( id, print_console, "BLA" ); in client_connect ?
__________________
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-16-2007 , 11:29   Re: I made one plugin but..
Reply With Quote #6

Hum...maybe! or client_cmd(id,"echo ^"BLAH^") !
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Mrrr
Member
Join Date: Jun 2007
Old 07-17-2007 , 09:20   Re: I made one plugin but..
Reply With Quote #7

Hm.. somethings wrong.. i made that you told me, but nothing is displayed.. :/

I made: client_cmd(id,"echo ^"BLAH^") - the same result :/

Quote:
what about
client_print( id, print_console, "BLA" ); in client_connect ?
I want to display in chat, not in console

----------------------------------

Here is the plugin on this stage:

Quote:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "plugin"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("say /command", "some_command", ADMIN_ALL, "some text")
}
public some_command(id)
{
client_print(id, print_chat, "*************** text ***************")
client_print(id, print_chat, "text")
client_print(id, print_chat, "text")
client_print(id, print_chat, "text")
client_print(id, print_chat, "*************** text ***************")
return PLUGIN_HANDLED
}

public client_putinserver(id) {
new name[32];
get_user_name(id,name,31)
server_cmd("say player with %s is connecting",name)
}

public client_connect(id)
{
client_cmd(id,"echo ^"BLAH^")
}
What is wrong ?

Can you fix it ?
Mrrr is offline
Old 07-17-2007, 09:53
organizedKaoS
This message has been deleted by organizedKaoS.
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 21:34.


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