Server Side Functions - GamingMad101/GmodPowerAPI GitHub Wiki

Server Side Functions

Listed below are a list of server side functions added by each entity.


Plug

ENT:QuestionLifeChoices()

This function checks if the Appliance still exists, and if no longer does, removes itself.

ENT:PowerAPI_OnPlugIn()

This function is called when the socket is connected.

ENT:PowerAPI_OnUnPlug()

This function is called when the socket is removed.


Socket

ENT:PowerAPI_PlugIn( plug )

input: Plug (the plug entity to plug in)
This funtion makes the plug entity linked to the socket so power etc. can flow through.

ENT:PowerAPI_Unplug( plug )

input: Plug (the plug to unplug) This function makes the plug entity disconnected from the socket so it can be moved etc.