Raised This Month: $ Target: $400
 0% 

How to produce a global event?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wwzw
Member
Join Date: Feb 2009
Old 05-04-2012 , 22:40   How to produce a global event?
Reply With Quote #1

How to make a new global event on a player? Just like "client_connect","client_putinserver","client _command","client_infochanged "......
I would like to detect the player how to produce a global event in a.amxx, post-test automatically trigger other plug-ins function works, using native is a very complicated thing, so I want to trigger a global event like this:

In a.sma
PHP Code:
 
Public XXX(id)
{
    ......
    if (...)
    {
        
//How to produce a global event:  client_loadfromsql(id)
    
}

In b.sma Or c.sma Or d.sma..........
PHP Code:
Public client_loadfromsql(id)
{
    
//Do my code......

Please help me! Thanks!

Last edited by wwzw; 05-04-2012 at 23:38.
wwzw is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-04-2012 , 23:52   Re: How to produce a global event?
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=41241
__________________
Bugsy is offline
Old 05-05-2012, 03:01
wwzw
This message has been deleted by wwzw.
wwzw
Member
Join Date: Feb 2009
Old 05-05-2012 , 03:01   Re: How to produce a global event?
Reply With Quote #4

Thank you very much for your help!

Now I do so:

In a.sma (main plugin)
PHP Code:
#include <amxmodx>
new iForward
public plugin_init()
{
    ......
    
iForward CreateMultiForward("client_logged",ET_IGNORE,FP_CELL)
    
register_clcmd("say /test","test")
}
 
public 
test(id)
{
    new 
iReturn
    ExecuteForward
(iForwardiReturnid)
    return 
PLUGIN_HANDLED;

Other plugin: b.sma Or c.sma Or d.sma......
PHP Code:
public client_logged(id)
{
   
client_print(0print_chat"client_logged:<%d>",id);


Last edited by wwzw; 05-05-2012 at 03:26.
wwzw is offline
Reply


Thread Tools
Display Modes

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 00:21.


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