Raised This Month: $ Target: $400
 0% 

[AMXX] Problem with client_putinserver


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
StoleA
Junior Member
Join Date: Nov 2011
Location: Romania
Old 07-28-2014 , 19:59   [AMXX] Problem with client_putinserver
Reply With Quote #1

Hi everyone, i have this code and doesn't work..

PHP Code:
#include <amxmodx>

public client_putinserver(id)
{
    
client_print(0print_chat"[Test Plugin] Test message.")

__________________
StoleA is offline
Send a message via Yahoo to StoleA Send a message via Skype™ to StoleA
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-28-2014 , 20:19   Re: [AMXX] Problem with client_putinserver
Reply With Quote #2

What makes you believe it is not working?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
StoleA
Junior Member
Join Date: Nov 2011
Location: Romania
Old 07-28-2014 , 20:36   Re: [AMXX] Problem with client_putinserver
Reply With Quote #3

It's tested.. I connect on server and nothing..
__________________
StoleA is offline
Send a message via Yahoo to StoleA Send a message via Skype™ to StoleA
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-28-2014 , 20:38   Re: [AMXX] Problem with client_putinserver
Reply With Quote #4

That is because client_putinserver is still to early for you to receive chat message. Other people will be able to see the message though. Simply add a delay and then you will see it.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-28-2014 , 20:39   Re: [AMXX] Problem with client_putinserver
Reply With Quote #5

You won't see it, because it's shown too early for you to see it. Test it with another player, who should be in the server when you connect, or just set a task like in 10 seconds, and display the message there.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 07-28-2014 , 22:51   Re: [AMXX] Problem with client_putinserver
Reply With Quote #6

Quote:
Originally Posted by Flick3rR View Post
You won't see it, because it's shown too early for you to see it. Test it with another player, who should be in the server when you connect, or just set a task like in 10 seconds, and display the message there.
Code:
public client_putinserver(id)       set_task(10.0,"show",id) public show(id)             client_print(0, print_chat, "[Test Plugin] Test message.")
__________________
Eagle07 is offline
Old 07-29-2014, 05:02
Flick3rR
This message has been deleted by Flick3rR. Reason: Nevermind
StoleA
Junior Member
Join Date: Nov 2011
Location: Romania
Old 07-29-2014 , 17:05   Re: [AMXX] Problem with client_putinserver
Reply With Quote #7

Nothing...

__________________
StoleA is offline
Send a message via Yahoo to StoleA Send a message via Skype™ to StoleA
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 07-29-2014 , 17:44   Re: [AMXX] Problem with client_putinserver
Reply With Quote #8

Quote:
Quote:
public client_putinserver(id)
set_task(10.0,"show",id)

public show(id)
client_print(0, print_chat, "[Test Plugin] Test message.")
Quote:
Originally Posted by StoleA View Post
Nothing...

change the client_print(0 to
Code:
id

Last edited by Fuck For Fun; 07-29-2014 at 17:46.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Mario AR.
Senior Member
Join Date: May 2011
Location: Lima, Perú
Old 07-29-2014 , 17:50   Re: [AMXX] Problem with client_putinserver
Reply With Quote #9

print_chat prints to chat. Use print_console or console_print. I'm sure you'll see the message in your server console with console_print(0, "Player connected.")
Mario AR. is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-30-2014 , 02:35   Re: [AMXX] Problem with client_putinserver
Reply With Quote #10

@Eagle: 3.0 seconds are enough...
@Mario: With the screen, I think that he wants to proove that the message didn't show.

PHP Code:
public client_putinserver(id)
{
    
set_task(3.0"Test"id)
}

public 
Test(id)
{
    
client_print(idprint_chat"Welcome")


Last edited by HamletEagle; 07-30-2014 at 02:37.
HamletEagle 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 07:24.


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