Raised This Month: $32 Target: $400
 8% 

[ANY] Outputs Info


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Plugin ID:
7289
Plugin Version:
Plugin Category:
All
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Get entities outputs.
    Old 09-13-2020 , 05:17   [ANY] Outputs Info
    Reply With Quote #1

    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

    __________________

    Last edited by Ilusion9; 09-13-2020 at 05:17.
    Ilusion9 is offline
    Ilusion9
    Veteran Member
    Join Date: Jun 2018
    Location: Romania
    Old 11-21-2020 , 13:52   Re: [ANY] Outputs Info
    Reply With Quote #2

    Version 1.1:
    Added support for CSS.
    All outputs are saved into one ArrayList.
    __________________
    Ilusion9 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 13:30.


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