| closedConfused! - amxx.cfg |
| Started by Ba5ic on 12-24-2007, 03:17 PM |
Threads: 26
Joined: Nov 2005
Hey PeepsrnrnBefore yu'all sink into festive oblivion, can someone please tell me how to change the centre messages in the amxx.cfg.rnrn// Center typed colored messages (last parameter is a color in RRRGGGBBB format)rnamx_imessage ".:Welcome To The DrunkTank:." "000255100"rnamx_imessage ".:say /giveammo or giveammo - to refill weapon in hand:." "000255255"rnamx_imessage ".:ENGLISH only please!:." "000255100"rnrnIs there anyway of getting the ".:Welcome To The DrunkTank:." to appear a letter at a time?, if you get my drift.rnrnAnd how do i change the letter colours.rnrnNooby question i know but i can't see the wood for the tree's and the kids are driving me mad!.rnrnThanks!
Threads: 103
Joined: May 2005
you'd have to edit the imessage.sma and change the hud msg settings.. nnif you want each letter to be a different color.. that would be a bit tricky as you would have to use seperate hud msgs for each letter and you'd probably have to use the hudsync stuff to avoid overwriting them.. and it might not really work anyway lolnnyou can check out the one i run.. might not be exactly what your looking for but adjusting the hold time, fx time, and whatnot you can change the speed it writes at and that jazz..nn
///////////////////////////////////////////////////////////////////n//n// Info Message 2 (v0.3)n// diamond-opticn// 11.30.07n//n// Changes:n// - Updated to AMXX CVS version (CVS no longer used)n// - Y position moved closer to the top of screenn// - FX added & other variables adjusted to change msg appearancen// - Up to date with any AMXX SVN changesn//n///////////////////////////////////////////////////////////////////nn#include <amxmodx>n#include <amxmisc>nn#define X_POS -1.0n#define Y_POS 0.11n#define HOLD_TIME 10.0nnnew Array:g_Valuesnnew Array:g_Messagesnnew g_MessagesNumnnew g_Currentnn#define charsof(%1) (sizeof(%1)-1)nnnew amx_freq_imessage;nnpublic plugin_init()n{n g_Messages=ArrayCreate(384);n g_Values=ArrayCreate(3);n register_plugin("Info. Messages 2","0.3", "diamond-optic")n register_cvar("imessage2_stats", "0.3", FCVAR_SERVER|FCVAR_SPONLY)nn n register_dictionary("imessage.txt")n register_dictionary("common.txt")n register_srvcmd("amx_imessage", "setMessage")n amx_freq_imessage=register_cvar("amx_freq_imessage", "10")n n new lastinfo[8]n get_localinfo("lastinfomsg", lastinfo, 7)n g_Current = str_to_num(lastinfo)n set_localinfo("lastinfomsg", "")n}nnpublic infoMessage()n{n if (g_Current >= g_MessagesNum)n g_Current = 0n n // No messages, just get out of heren if (g_MessagesNum==0)n {n return;n }n n new values[3];n new Message[384];n n ArrayGetString(g_Messages, g_Current, Message, charsof(Message));n ArrayGetArray(g_Values, g_Current, values);n n new hostname[64];n n get_cvar_string("hostname", hostname, 63);n replace(Message, 380, "%hostname%", hostname);n n set_hudmessage(values[0], values[1], values[2], X_POS, Y_POS, 0, 0.5, HOLD_TIME, 0.15, 7.0, -1);n n show_hudmessage(0, "%s", Message);n n client_print(0, print_console, "%s", Message);n ++g_Current;n n new Float:freq_im = get_pcvar_float(amx_freq_imessage);n n if (freq_im > 0.0)n set_task(freq_im, "infoMessage", 12345);n}nnpublic setMessage()n{nn new Message[384];n n remove_task(12345)n read_argv(1, Message, 380)n n while (replace(Message, 380, "
", "^n")) {}n n new mycol[12]n new vals[3];n n read_argv(2, mycol, 11) // RRRGGGBBBn vals[2] = str_to_num(mycol[6])n n mycol[6] = 0n vals[1] = str_to_num(mycol[3])n n mycol[3] = 0n vals[0] = str_to_num(mycol[0])n n g_MessagesNum++n n new Float:freq_im = get_pcvar_float(amx_freq_imessage)n n ArrayPushString(g_Messages, Message);n ArrayPushArray(g_Values, vals);n n if (freq_im > 0.0)n set_task(freq_im, "infoMessage", 12345)n n return PLUGIN_HANDLEDn}nnpublic plugin_end()n{n new lastinfo[8]nn num_to_str(g_Current, lastinfo, 7)n set_localinfo("lastinfomsg", lastinfo)n}nThreads: 26
Joined: Nov 2005
Thanks Optic Your a Diamond!....rnrnHave a great holiday...rnrn:)rnrnUPDATErnrnDiamond, i copied and pasted ur coding - when i went to compile i get these errors? , any idea's or am i having a mid life crisis!rnrn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(33) : error 017: undefined symbol "ArrayCreate"rn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(33) : warning 213: tag mismatchrn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(34) : error 017: undefined symbol "ArrayCreate"rn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(34) : warning 213: tag mismatchrn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(64) : error 017: undefined symbol "ArrayGetString"rn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(64) : error 088: number of arguments does not match definitionrn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(65) : error 017: undefined symbol "ArrayGetArray"rn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(111) : error 017: undefined symbol "ArrayPushString"rn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(112) : error 017: undefined symbol "ArrayPushArray"rn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(130) : warning 204: symbol is assigned a value that is never used: "g_Messages"rn/home/groups/amxmodx/tmp3/phpwNB3lR.sma(130) : warning 204: symbol is assigned a value that is never used: "g_Values"rnrn7 Errors.rnCould not locate output file /home/groups/amxmodx/public_html/websc3/phpwNB3lR.amx (compile failed).
Threads: 26
Joined: Nov 2005
OK, i used the compiler here and it worked, but it does not compile on the amxmodx site... wierd?.rnrnAnyways, i've installed it and it's still doing the same thing :s, what else should i do.rnrnTIA.
Threads: 103
Joined: May 2005
oh you know why what i posted is for amxx 1.8.0+nnand for some odd reason the amxmodx.org web compiler is still on 1.76 and the compiler here has 1.8.0nnn..and if it compiles fine and you're using 1.8.0 (for dod should be 1.8.1 technically) and your not getting any errors.. it should work
Threads: 26
Joined: Nov 2005
you'd have to edit the imessage.sma and change the hud msg settings.. rnrnif you want each letter to be a different color.. that would be a bit tricky as you would have to use seperate hud msgs for each letter and you'd probably have to use the hudsync stuff to avoid overwriting them.. and it might not really work anyway lolrnrnyou can check out the one i run.. might not be exactly what your looking for but adjusting the hold time, fx time, and whatnot you can change the speed it writes at and that jazz..rnrnrnrnDiamondrnrnReally sorry to labour the point but can you just clarify what i'm doing is correct.rnrnThe revised imessage.amxx is installed. i'm running AMXX v1.8.0.3660.rnrnDo i have the correct info in the amxx.cfg? :-rnrnrn// Center typed colored messages (last parameter is a color in RRRGGGBBB format)rnamx_imessage ".:Welcome To The DrunkTank:." "000255100"rnamx_imessage ".:say /giveammo or giveammo - to refill weapon in hand:." "000255255"rnamx_imessage ".:ENGLISH only please!:." "000255100"rnrnThe only message being displayed is the ".:ENGLISH only please!:." rnrnI feel kinder embarrassed asking but it's getting annoying! lol.rnrnrnThanks Guys///////////////////////////////////////////////////////////////////rn//rn// Info Message 2 (v0.3)rn// diamond-opticrn// 11.30.07rn//rn// Changes:rn// - Updated to AMXX CVS version (CVS no longer used)rn// - Y position moved closer to the top of screenrn// - FX added & other variables adjusted to change msg appearancern// - Up to date with any AMXX SVN changesrn//rn///////////////////////////////////////////////////////////////////rnrn#include <amxmodx>rn#include <amxmisc>rnrn#define X_POS -1.0rn#define Y_POS 0.11rn#define HOLD_TIME 10.0rnrnnew Array:g_Valuesrnnew Array:g_Messagesrnnew g_MessagesNumrnnew g_Currentrnrn#define charsof(%1) (sizeof(%1)-1)rnrnnew amx_freq_imessage;rnrnpublic plugin_init()rn{rn g_Messages=ArrayCreate(384);rn g_Values=ArrayCreate(3);rn register_plugin("Info. Messages 2","0.3", "diamond-optic")rn register_cvar("imessage2_stats", "0.3", FCVAR_SERVER|FCVAR_SPONLY)rnrn rn register_dictionary("imessage.txt")rn register_dictionary("common.txt")rn register_srvcmd("amx_imessage", "setMessage")rn amx_freq_imessage=register_cvar("amx_freq_imessage", "10")rn rn new lastinfo[8]rn get_localinfo("lastinfomsg", lastinfo, 7)rn g_Current = str_to_num(lastinfo)rn set_localinfo("lastinfomsg", "")rn}rnrnpublic infoMessage()rn{rn if (g_Current >= g_MessagesNum)rn g_Current = 0rn rn // No messages, just get out of herern if (g_MessagesNum==0)rn {rn return;rn }rn rn new values[3];rn new Message[384];rn rn ArrayGetString(g_Messages, g_Current, Message, charsof(Message));rn ArrayGetArray(g_Values, g_Current, values);rn rn new hostname[64];rn rn get_cvar_string("hostname", hostname, 63);rn replace(Message, 380, "%hostname%", hostname);rn rn set_hudmessage(values[0], values[1], values[2], X_POS, Y_POS, 0, 0.5, HOLD_TIME, 0.15, 7.0, -1);rn rn show_hudmessage(0, "%s", Message);rn rn client_print(0, print_console, "%s", Message);rn ++g_Current;rn rn new Float:freq_im = get_pcvar_float(amx_freq_imessage);rn rn if (freq_im > 0.0)rn set_task(freq_im, "infoMessage", 12345);rn}rnrnpublic setMessage()rn{rnrn new Message[384];rn rn remove_task(12345)rn read_argv(1, Message, 380)rn rn while (replace(Message, 380, " ", "^n")) {}rn rn new mycol[12]rn new vals[3];rn rn read_argv(2, mycol, 11) // RRRGGGBBBrn vals[2] = str_to_num(mycol[6])rn rn mycol[6] = 0rn vals[1] = str_to_num(mycol[3])rn rn mycol[3] = 0rn vals[0] = str_to_num(mycol[0])rn rn g_MessagesNum++rn rn new Float:freq_im = get_pcvar_float(amx_freq_imessage)rn rn ArrayPushString(g_Messages, Message);rn ArrayPushArray(g_Values, vals);rn rn if (freq_im > 0.0)rn set_task(freq_im, "infoMessage", 12345)rn rn return PLUGIN_HANDLEDrn}rnrnpublic plugin_end()rn{rn new lastinfo[8]rnrn num_to_str(g_Current, lastinfo, 7)rn set_localinfo("lastinfomsg", lastinfo)rn}rn
Threads: 26
Joined: Nov 2005
Do i need to comment out the default imessages.ammx and just add ur imessages2.amxx for this to work Diamond?.
Threads: 37
Joined: Mar 2007
of coarse u gotta comment out the original one in of the plugins.ini
Threads: 26
Joined: Nov 2005
of coarse u gotta comment out the original one in of the plugins.inirnrnrnNope it only works if you keep the original one.... :)
Threads: 37
Joined: Mar 2007
lol then something wrong there i doubt d-o meant for that
Threads: 103
Joined: May 2005
ya lol i run that one instead of the default one and it works fine for me

