AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Info Connect message (https://forums.alliedmods.net/showthread.php?t=134239)

OvidiuS 08-02-2010 12:49

Info Connect message
 
when user connect's i want to se custom chat message
here is the code
Code:

#include <amxmodx>
#include <colorchat>
 
public ShowMessage( id ) {
 ColorChat(id, NORMAL, "^4Custom chat ^3Message")
}
public client_putinserver( id ) {
 if( is_user_connected ( id ) ) {
  set_task( 1.0, "ShowMessage", id );
}

when i start new game
it starts loading map and it crashes...
in logs there's no error with this plugin
when i turn it off from plugins.ini, everything works fine

vato loco [GE-S] 08-02-2010 13:28

Re: Info Connect message
 
this should be -> ^3 -> ^03

u can do it like this:
PHP Code:

public ShowMessageid 
{
     
ColorChat(idNORMAL"^04Custom chat ^03Message")
}

public 
client_putinserverid 
{
    
ShowMessageid )


or like this:
PHP Code:

public client_putinserverid 
{
    
ColorChat(idNORMAL"^04Custom chat ^03Message")



GXLZPGX 08-02-2010 16:25

Re: Info Connect message
 
Quote:

Originally Posted by vato loco [GE-S] (Post 1259448)
this should be -> ^3 -> ^03

u can do it like this:
PHP Code:

public ShowMessageid 
{
     
ColorChat(idNORMAL"^04Custom chat ^03Message")
}

public 
client_putinserverid 
{
    
ShowMessageid )


or like this:
PHP Code:

public client_putinserverid 
{
    
ColorChat(idNORMAL"^04Custom chat ^03Message")



Theres a possibility that his colorchat is different from yours. So maybe ^4 and ^3 are correct, he just fails.

vato loco [GE-S] 08-02-2010 16:28

Re: Info Connect message
 
possible is everything :wink:

minimiller 08-02-2010 17:20

Re: Info Connect message
 
is this the only plugin running at the time of the crash?

OvidiuS 08-03-2010 00:39

Re: Info Connect message
 
i disabled all extra plugins
here is the list of plugins that were running
Code:

Admin Base        1.8.1.3746  AMXX Dev Team    admin.amxx      running 
Admin Commands    1.8.1.3746  AMXX Dev Team    admincmd.amxx    running 
Admin Help        1.8.1.3746  AMXX Dev Team    adminhelp.amxx  running 
Slots Reservation  1.8.1.3746  AMXX Dev Team    adminslots.amxx  running 
Multi-Lingual Sys  1.8.1.3746  AMXX Dev Team    multilingual.am  running 
Menus Front-End    1.8.1.3746  AMXX Dev Team    menufront.amxx  running 
Commands Menu      1.8.1.3746  AMXX Dev Team    cmdmenu.amxx    running 
Players Menu      1.8.1.3746  AMXX Dev Team    plmenu.amxx      running 
Maps Menu          1.8.1.3746  AMXX Dev Team    mapsmenu.amxx    running 
Plugin Menu        1.8.1.3746  AMXX Dev Team    pluginmenu.amxx  running 
Anti Flood        1.8.1.3746  AMXX Dev Team    antiflood.amxx  running 
Scrolling Message  1.8.1.3746  AMXX Dev Team    scrollmsg.amxx  running 
Info. Messages    1.8.1.3746  AMXX Dev Team    imessage.amxx    running 
Admin Votes        1.8.1.3746  AMXX Dev Team    adminvote.amxx  running 
NextMap            1.8.1.3746  AMXX Dev Team    nextmap.amxx    running 
TimeLeft          1.8.1.3746  AMXX Dev Team    timeleft.amxx    running 
Pause Plugins      1.8.1.3746  AMXX Dev Team    pausecfg.amxx    running 
Stats Configurati  1.8.1.3746  AMXX Dev Team    statscfg.amxx    running 
AMX Super          4.2        Bmann_420        amx_super.amxx  running

when i enable that Custom Chat Message , server crashes
actually it's not online server, it's just new game with amxmodx, and bots? does that make any diffrence?
@vata_loco i checked my colorchat, it's ^4 and ^3
tried to compile your code, and some dump error showing
Error 021 server_cmd already defined

GarbageBox 08-03-2010 01:59

Re: Info Connect message
 
Code:

#include <amxmodx>
#include <colorchat>
 
public ShowMessage( id ) {
 ColorChat(id, NORMAL, "^4Custom chat ^3Message")
}
public client_putinserver( id ) {
 if( is_user_connected ( id ) ) {
  set_task( 1.0, "ShowMessage", id );
}//You miss one
}


OvidiuS 08-03-2010 10:14

Re: Info Connect message
 
Quote:

Originally Posted by GarbageBox (Post 1260069)
Code:

#include <amxmodx>
#include <colorchat>
 
public ShowMessage( id ) {
 ColorChat(id, NORMAL, "^4Custom chat ^3Message")
}
public client_putinserver( id ) {
 if( is_user_connected ( id ) ) {
  set_task( 1.0, "ShowMessage", id );
}//You miss one
}


if i add that brackets i got error 021
symbol already defined "server_cmd"

Devil259 08-03-2010 10:25

Re: Info Connect message
 
Show whole code, because you don't use server_cmd and you get this error. :3

SpeeDeeR 08-03-2010 10:31

Re: Info Connect message
 
PHP Code:

#include <amxmodx>
#include <colorchat>
 
public client_connectid 
{
  
set_task8.0"ShowMessage"id );
}

public 
ShowMessage(id)
{
    
ColorChat(idNORMAL"^4Custom chat ^3Message")




All times are GMT -4. The time now is 00:11.

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