AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to produce a global event? (https://forums.alliedmods.net/showthread.php?t=184404)

wwzw 05-04-2012 22:40

How to produce a global event?
 
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!

Bugsy 05-04-2012 23:52

Re: How to produce a global event?
 
http://forums.alliedmods.net/showthread.php?t=41241

wwzw 05-05-2012 03:01

Re: How to produce a global event?
 
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);




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

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