AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Outputs Info (https://forums.alliedmods.net/showthread.php?t=327344)

Ilusion9 09-13-2020 05:17

[ANY] Outputs Info
 
Description:
Get entities outputs.
Credits to: https://github.com/kidfearless/output-info-plugin/
This plugin skips the usage of saving outputs in arraylists (an arraylist of outputs for every entity).

GitHub:
https://github.com/Ilusion9/outputs-list-sm

Functions:
PHP Code:

/**
 * Returns an output from an entity outputs list
 *
 * @param entity            Entity index.
 * @param index             Index in the output list.
 * @param output            Buffer to copy the output name.
 * @param outputlen         Maximum size of the output buffer.
 * @param target            Buffer to copy the target name.
 * @param targetlen         Maximum size of the target buffer.
 * @param input             Buffer to copy the input received.
 * @param inputlen          Maximum size of the input buffer.
 * @param param             Buffer to copy the parameters received.
 * @param paramlen          Maximum size of the parameters buffer.
 * @param delay             Delay of the output
 * @param once              True if the output has 'Only Once' flag enabled.
 * @return                  True if the output has been returned.
 */
bool GetEntityOutput(int entityint indexchar[] outputint outputlenchar[] targetint targetlenchar[] inputint inputlenchar[] paramint paramlenfloatdelayboolonce);

/**
 * Returns the entity outputs count.
 *
 * @param entity            Entity index.
 * @return                  The entity outputs count.
 */
int GetEntityOutputsCount(int entity); 

Examples:
PHP Code:

bool inputOnce;
char outputName[256];
char targetName[256];
char inputName[256];
char params[256];
float inputDelay;
  
for (
int i 0GetEntityOutputsCount(entity); i++)
{        
    
// get output
    
if (!GetEntityOutput(entityioutputNamesizeof(outputName), targetNamesizeof(targetName), inputNamesizeof(inputName), paramssizeof(params), inputDelayinputOnce))
    {
        continue;
    }

    
// do something with this output



Ilusion9 11-21-2020 13:52

Re: [ANY] Outputs Info
 
Version 1.1:
Added support for CSS.
All outputs are saved into one ArrayList.


All times are GMT -4. The time now is 07:48.

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