Raised This Month: $ Target: $400
 0% 

Connect/Disconnect message


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 05-06-2006 , 12:37   Connect/Disconnect message
Reply With Quote #1

Hey, I went to a server this morning and saw a plugin where when a user connected, it said

Dizzy connected

it was green just like above... (0,255,0)

I gave a try at making a replica of this, since I could find one in the search...

I get 6 errors when compiling...

Code:
#include <amxmodx> public plugin_init() {     register_plugin("Connect/Disconnect Messages","0.1","Dizzy");     register_cvar("amx_connect_message", "%name% connected.");     register_cvar("amx_disconnect_message", "%name% disconnected.");     register_cvar("amx_cdm","1"); } public client_putinserver(id) {     new user[32], len;     user[0] = id;     len = get_user_name(id,user[1],31);     set_task(1.0, "connect_message", 0, user,len + 2);     return PLUGIN_CONTINUE; } public client_disconnect(id) {     new user[32], len;     user[0] = id;     len = get_user_name(id, user[1], 31);     set_task(1.0, "disconnect_message", 0, user, len + 2);     return PLUGIN_CONTINUE; } public connect_message(user[]) {       if (get_cvar_num("amx_cdm")!=0)     {         new message[192];         get_cvar_string("amx_connect_message", message, 191);         replace(message, 191, "%name%", user[1]);         message_begin(MSG_ONE, get_user_msgid("SayText"), {0,255,0}, id);         write_byte(id);         write_string("message colored text");         message_end();         return PLUGIN_CONTINUE;     }     return PLUGIN_CONTINUE; } public disconnect_message(user[]) {     if (get_cvar_num("amx_cdm")!=0)     {         new message[192];         get_cvar_string("amx_disconnect_message", message, 191);         replace(message, 191, "%name%", user[1]);         message_begin(MSG_ONE, get_user_msgid("SayText"), {0,255,0}, id);         write_byte(id);         write_string("message colored text");         message_end();         return PLUGIN_CONTINUE;     }     return PLUGIN_CONTINUE; }

The errors are:
Code:
//// amx_connection.sma
// C:\HLDS\cstrike\addons\amxmodx\scripting\amx_connection.sma(36) : error 017:
undefined symbol "id"
// C:\HLDS\cstrike\addons\amxmodx\scripting\amx_connection.sma(37) : error 017:
undefined symbol "id"
// C:\HLDS\cstrike\addons\amxmodx\scripting\amx_connection.sma(37) : error 088:
number of arguments does not match definition
// C:\HLDS\cstrike\addons\amxmodx\scripting\amx_connection.sma(52) : error 017:
undefined symbol "id"
// C:\HLDS\cstrike\addons\amxmodx\scripting\amx_connection.sma(53) : error 017:
undefined symbol "id"
// C:\HLDS\cstrike\addons\amxmodx\scripting\amx_connection.sma(53) : error 088:
number of arguments does not match definition
//
// 6 Errors.
// Could not locate output file compiled\amx_connection.amx (compile failed).
Help please
Dizzy is offline
Send a message via AIM to Dizzy
 



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 05:13.


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