Raised This Month: $ Target: $400
 0% 

Where is the error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tester23
Junior Member
Join Date: May 2008
Old 08-29-2008 , 17:20   Where is the error
Reply With Quote #1

Code:
new maxplayers
new gmsgSayText

public plugin_init() {
    register_plugin("Contacto", "1.00", "Moke")
         register_clcmd("say /admin" , "contacto")

public contacto(id)

{    new message[124]

  
   console_print(id, print_chat,"^x04[hns]^ Abierta la inscripcion de nuevos adms : ^[email protected]^")
  
}
Where is the error i can find it

Last edited by Tester23; 08-29-2008 at 19:02.
Tester23 is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 08-29-2008 , 17:22   Re: Where is the error
Reply With Quote #2

You can't print colored messages in chat with client_print, use format/formatex...ori look in ColorChat.sma.
Also, you don't need the cstrike and fun module if thats the full code
__________________

anakin_cstrike is offline
Tester23
Junior Member
Join Date: May 2008
Old 08-29-2008 , 19:04   Re: Where is the error
Reply With Quote #3

Code:
public contacto(id)

{    new message[124]

  
   format (id, print_chat,"^x04[hns]^ Abierta la inscripcion de nuevos adms : ^x03aiasdsaar^")
   print_message(id,message)
Like this way i coudnt find any tutorial of format/formatext
Tester23 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 08-29-2008 , 19:18   Re: Where is the error
Reply With Quote #4

Try this. I created a function for the SayText message.
PHP Code:
#include <amxmodx>

new maxplayers
new gmsgSayText

public plugin_init()
{
    
register_plugin("Contacto""1.00""Moke")
    
register_clcmd("say /admin""contacto")

    
maxplayers get_maxplayers()

    
gmsgSayText get_user_msgid("SayText")
}

public 
contacto(id)
{
    
SayText(id"^x04[hns] Abierta la inscripcion de nuevos adms : ^[email protected]")

    return 
PLUGIN_CONTINUE
}

SayTextid message[] , any:... )
{
    if( 
id > ( maxplayers ) )
        return 
0

    
if( id && ( !is_user_aliveid ) || is_user_botid ) ) ) 
        return 
0

    
static msg[252]
    
vformatmsg[1] , 251 message );

    if( !
id )
    {
        for( new 
0maxplayersi++ )
        {
            if( !
is_user_connected) || is_user_bot) ) continue

            
message_beginMSG_ONE gmsgSayText , {0,0,0} , id )
            
write_byteid )
            
write_stringmessage )
            
message_end()
        }
    }
    else
    {
        
message_beginMSG_ONE gmsgSayText , {0,0,0} , id )
        
write_byteid )
        
write_stringmessage )
        
message_end()
    }

    return 
1

__________________
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.

Last edited by v3x; 08-29-2008 at 19:26.
v3x 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 03:18.


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