Raised This Month: $ Target: $400
 0% 

client_print


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trumpet_Rhapsody
Junior Member
Join Date: Jun 2004
Old 06-07-2004 , 18:03   client_print
Reply With Quote #1

I am having TONS of trouble getting my client_print command to work. I'm a newbie to coding so I don't know much. All I've learned i've learned by reading other plugin's code and making assumptions. I'm making a plugin to display a help file, and it works perfectly except the client_print command that I want to run when a user joins the server. I'll attach my code just for refrence, but the specific code:

public display_info( id ){
if (id) {
client_print(id,print_chat,"Server Plugins: Say /pluginhelp for Client help on using the server's Plugins")
client_print(id,print_chat,"Server Plugins: Say /pluginAhelp for Admin help on using the server's Plugins")
}
}

This is placed right after the public plugin_init() section (do i need PLUGIN CONTINUE somewhere maybe?). I've tried variations of the client_print command that i've seen in other plugins but to no avail. Please if anyone has any idea what is going on here help me!
Attached Files
File Type: sma Get Plugin or Get Source (plugins_help.sma - 681 views - 1.6 KB)
File Type: sma Get Plugin or Get Source (plugins_help.sma - 784 views - 1.6 KB)
Trumpet_Rhapsody is offline
Send a message via ICQ to Trumpet_Rhapsody Send a message via AIM to Trumpet_Rhapsody
Girthesniper
Senior Member
Join Date: Mar 2004
Location: Maryland
Old 06-07-2004 , 18:56  
Reply With Quote #2

Might wana try some spaces in there.
__________________
BANNED
Girthesniper is offline
Send a message via AIM to Girthesniper Send a message via MSN to Girthesniper
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 06-07-2004 , 19:06  
Reply With Quote #3

it does show your client print text cause your function display_info is not called, if u want your print to be displayed to a player just after connect use
Code:
public client_connect(id){   client_print(...) }

client_connect is automaticlly called when player connects, when u make own function u have to call them somewhere in your code
__________________
alias White Panther
karlos is offline
Trumpet_Rhapsody
Junior Member
Join Date: Jun 2004
Old 06-07-2004 , 19:40  
Reply With Quote #4

Hmm makes sense. Still don't think it works though.

public client_connect(id){
client_print(id,print_chat,"Server Plugins: Say /pluginhelp for Client help on using the server's Plugins")
client_print(id,print_chat,"Server Plugins: Say /pluginAhelp for Admin help on using the server's Plugins")
}

That should work then right? Or should it be client_print(0,print_chat,"etc")
Trumpet_Rhapsody is offline
Send a message via ICQ to Trumpet_Rhapsody Send a message via AIM to Trumpet_Rhapsody
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 06-07-2004 , 19:43  
Reply With Quote #5

If your using :
Code:
public client_connect(id)
Then you will have to use :
Code:
client_print(0,print_chat,"message")
Good luck.
Peli is offline
Send a message via MSN to Peli
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 06-07-2004 , 20:22  
Reply With Quote #6

Quote:
Originally Posted by Trumpet_Rhapsody
Hmm makes sense. Still don't think it works though.

public client_connect(id){
client_print(id,print_chat,"Server Plugins: Say /pluginhelp for Client help on using the server's Plugins")
client_print(id,print_chat,"Server Plugins: Say /pluginAhelp for Admin help on using the server's Plugins")
}

That should work then right? Or should it be client_print(0,print_chat,"etc")
chat ? you don't have chat when not in server.
Use
Code:
public client_putinserver(id){     client_print(id,print_chat,"Server Plugins: Say /pluginhelp for Client help on using the server's Plugins")     client_print(id,print_chat,"Server Plugins: Say /pluginAhelp for Admin help on using the server's Plugins") }
or
Code:
public client_connect(id){     client_print(id,print_console,"Server Plugins: Say /pluginhelp for Client help on using the server's Plugins")     client_print(id,print_console,"Server Plugins: Say /pluginAhelp for Admin help on using the server's Plugins") }
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 06-07-2004 , 20:23  
Reply With Quote #7

NO!
You need to wait maybe 30 seconds after client connect
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
ts2do
Senior Member
Join Date: Mar 2004
Old 06-07-2004 , 20:24  
Reply With Quote #8

ya how bout just using putinserver
__________________
ts2do is offline
Send a message via AIM to ts2do
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 06-07-2004 , 20:26  
Reply With Quote #9

you are very funny
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
Trumpet_Rhapsody
Junior Member
Join Date: Jun 2004
Old 06-07-2004 , 20:53  
Reply With Quote #10

How do I have it wait 30 or so seconds? Basically what I'm trying to do is the same thing that happens in AMX mod when you enter a server. It says "For AMX Mod Help type /help" or something like that. What do I need to do to do that? ( for public client_putinserver wouldn't I have to call it somewhere, and if so how?) Somebody spoon-feed me this please, lol I told you I'm a noob at scripting.
Trumpet_Rhapsody is offline
Send a message via ICQ to Trumpet_Rhapsody Send a message via AIM to Trumpet_Rhapsody
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 14:55.


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