Global Function?
#3
(03-01-2011, 11:23 AM)Dys0n Wrote: Can i make a function that can be called in all plugins eg if i make a function called

Coldsteel:SendData( pName, Message )

How could i call that in all lua scripts?

Haven't tried it yet, but you should be able to call Coldsteel:SendData( pName, Message ) from any other plugin as in Lua the var Coldsteel is registered global.

You may check existance by comparing Coldsteel with nil
PHP Code:
if(Coldsteel ~= nilthen
  
-- Coldsteel plugin loaded -> run function
  
Coldsteel:SendDatapNameMessage )
end 
Reply
Thanks given by:


Messages In This Thread
Global Function? - by Dys0n - 03-01-2011, 11:23 AM
RE: Global Function? - by Revolucas - 03-01-2011, 02:41 PM
RE: Global Function? - by Tybor - 03-02-2011, 02:28 AM
RE: Global Function? - by Tybor - 03-02-2011, 03:51 AM
RE: Global Function? - by Dys0n - 03-02-2011, 04:54 AM
RE: Global Function? - by FakeTruth - 03-02-2011, 06:19 AM



Users browsing this thread: 1 Guest(s)