Raised This Month: $ Target: $400
 0% 

Message call originations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 12-29-2007 , 11:40   Message call originations
Reply With Quote #1

Here's a quickie. Where do the 1st server commands amx_imessage and amx_scrollmsg originate from?
__________________
=====================================
- My Plugins -
=====================================
Vet is offline
Send a message via MSN to Vet
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 12-29-2007 , 18:00   Re: Message call originations
Reply With Quote #2

you mean what plugin registered these commands?

amx_imessage is from imessage.amxx
amx_scrollmsg is from scrollmsg.amxx
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 12-29-2007 , 21:33   Re: Message call originations
Reply With Quote #3

No, I mean where/how do they get called the very first time. The imessages plugin init is:
Code:
 
public plugin_init()
{
    register_plugin("Info. Messages", AMXX_VERSION_STR, "AMXX Dev Team")
    register_dictionary("imessage.txt")
    register_dictionary("common.txt")
    register_srvcmd("amx_imessage", "setMessage")
    register_cvar("amx_freq_imessage", "30")
 
 
    new lastinfo[8]
    get_localinfo("lastinfomsg", lastinfo, 7)
    g_Current = str_to_num(lastinfo)
    set_localinfo("lastinfomsg", "")
}
I see its called from within the plugin with a task in the setMessage routine after the first call. But I can't figure out where or how the first amx_imessage command is called. And the amx_scrollmsg is the same way. Its no big deal, I'm just wondering.
__________________
=====================================
- My Plugins -
=====================================
Vet is offline
Send a message via MSN to Vet
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 12-30-2007 , 03:12   Re: Message call originations
Reply With Quote #4

well:

amxx.cfg
calls amx_imessage
calls setMessage
inside it sets task if not exists: set_task(freq_im, "infoMessage", 12345)


i bet scrollmsg does the same thing
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 12-30-2007 , 10:51   Re: Message call originations
Reply With Quote #5

I was under the impression that amxx.cfg got executed before any of the plugin's were initialize. So the register_srvcmd wouldn't be valid at that time. Thus you'd need to call amx_imessage and amx_scrollmsg from somewhere else after the 2 plugins were initialized. Also the initializing of the different imessages need to get into imessage's g_Messages[MAX_MESSAGES][384] array somehow. This must be accomplished somewhere else.
__________________
=====================================
- My Plugins -
=====================================
Vet is offline
Send a message via MSN to Vet
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 12-30-2007 , 16:54   Re: Message call originations
Reply With Quote #6

amxx.cfg is called after all plugins are loaded

getting into the array has a loop variable that loops through the array everytime infoMessage is called
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 12-30-2007 , 21:38   Re: Message call originations
Reply With Quote #7

Quote:
Originally Posted by kp_uparrow View Post
amxx.cfg is called after all plugins are loaded
That explains it. All this time I tought it was executed before plugins.
Thanx
__________________
=====================================
- My Plugins -
=====================================
Vet is offline
Send a message via MSN to Vet
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 11:07.


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