Raised This Month: $ Target: $400
 0% 

Need a little help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
clubz
Junior Member
Join Date: Dec 2004
Old 02-21-2005 , 03:32   Need a little help.
Reply With Quote #1

Am I doing this right, cause when I connect to server I don't see text.
Code:
// -cLuBz-

#include <amxmodx>

public plugin_init() {
	register_plugin("Test","0.00","cLuBz")
}

public client_connect(id) {
	client_print(id,print_chat,"Test")
}
__________________
-|No suit beats it|-
cLuBz
clubz is offline
Send a message via AIM to clubz
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-21-2005 , 03:35  
Reply With Quote #2

It is probably printing it when the map changes and the very first round starts, and that could be the reason that you aren't seeing it .
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
clubz
Junior Member
Join Date: Dec 2004
Old 02-21-2005 , 03:43  
Reply With Quote #3

Anyway to change that?
__________________
-|No suit beats it|-
cLuBz
clubz is offline
Send a message via AIM to clubz
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 02-21-2005 , 10:16  
Reply With Quote #4

you could use client_putinserver() which is called _after_ client_connect()...

Also, you could use a set_task() to delay the printing of your text a few seconds..

Code:
// -cLuBz- #include <amxmodx> #define TASK_ID 1234 public plugin_init() {    register_plugin("Test","0.00","cLuBz") } public client_putinserver(id) {    new sid[2]    sid[0] = id     // Show text in 3.0 seconds..     set_task( 3.0, "ShowText", TASK_ID, sid, 1 ) } public ShowText( args[] ) {     new id = sid[0]    client_print(id,print_chat,"Test") }
xeroblood is offline
Send a message via MSN to xeroblood
clubz
Junior Member
Join Date: Dec 2004
Old 02-21-2005 , 13:18  
Reply With Quote #5

Code:
// -cLuBz- 

#include <amxmodx> 

#define TASK_ID 1234 

public plugin_init() { 
   register_plugin("Test","0.00","cLuBz") 
} 

public client_putinserver(id) { 
   new sid[2] 
   sid[0] = id 

    // Show text in 3.0 seconds.. 
    set_task(3.0,"ShowText",TASK_ID,sid,1) 
} 

public ShowText(args[]) { 
    new id = sid[0] 
   client_print(id,print_chat,"Test") 
}
I get 4 errors though..

/home/users/amxmodx/tmp/phpaFp0Sw.sma(16) : warning 217: loose indentation
/home/users/amxmodx/tmp/phpaFp0Sw.sma(20) : error 017: undefined symbol "sid"
/home/users/amxmodx/tmp/phpaFp0Sw.sma(20) : warning 215: expression has no effect
/home/users/amxmodx/tmp/phpaFp0Sw.sma(20) : error 001: expected token: ";", but found "]"
/home/users/amxmodx/tmp/phpaFp0Sw.sma(20) : error 029: invalid expression, assumed zero
/home/users/amxmodx/tmp/phpaFp0Sw.sma(20) : fatal error 107: too many error messages on one line
__________________
-|No suit beats it|-
cLuBz
clubz is offline
Send a message via AIM to clubz
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 02-21-2005 , 13:44  
Reply With Quote #6

Oooops.. my bad.. I should've tried compiling it first...

Code:
#include <amxmodx> #define TASK_ID 1234 public plugin_init() {     register_plugin("Test","0.00","cLuBz") } public client_putinserver(id) {     new sid[2]     sid[0] = id     // Show text in 3.0 seconds..     set_task(3.0,"ShowText",TASK_ID,sid,1)     return PLUGIN_CONTINUE } public ShowText(args[]) {     new id = args[0]     client_print(id,print_chat,"Test") }

If you get loose indentation warnings it is okay, not that important, but if you don't want the warnings and cant find the problem in your code, then just put this at the top of your code:

#pragma tabsize 0

Hope that helps..
xeroblood is offline
Send a message via MSN to xeroblood
clubz
Junior Member
Join Date: Dec 2004
Old 02-21-2005 , 13:58  
Reply With Quote #7

Yes it works! thanks.
__________________
-|No suit beats it|-
cLuBz
clubz is offline
Send a message via AIM to clubz
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:13.


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