Results 1 to 6 of 6

Thread: ES Tools Effect Translations

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. Default

    Code:
    est_Effect 1 <player Filter> <delay> <position 'X,Y,Z'> <direction 'X,Y,Z'>
    USES: TE_SetupArmorRicochet

    Code:
    stock ProcessEffect1(Handle:pack, String:cFilter[], const modelIndex)
    {
        ResetPack(pack);
        new String:buffer[128],String:vecExplode[3][128];
                    
        ReadPackString(pack, buffer, sizeof(buffer));
        ExplodeString(buffer, ",", vecExplode, sizeof(vecExplode), sizeof(vecExplode[]))
        new Float:effectVector1[3];
        effectVector1[0] = StringToFloat(vecExplode[0])
        effectVector1[1] = StringToFloat(vecExplode[1])
        effectVector1[2] = StringToFloat(vecExplode[2])
            
        ReadPackString(pack, buffer, sizeof(buffer))
        ExplodeString(buffer, ",", vecExplode, sizeof(vecExplode), sizeof(vecExplode[]))
        new Float:effectVector2[3];
        effectVector2[0] = StringToFloat(vecExplode[0])
        effectVector2[1] = StringToFloat(vecExplode[1])
        effectVector2[2] = StringToFloat(vecExplode[2])
            
        TE_SetupArmorRicochet(effectVector1, effectVector2);
        
        CloseHandle(pack);
        ProcessFilter(cFilter)
    }
    ---------- Post added at 01:22 PM ---------- Previous post was at 01:21 PM ----------

    Code:
    est_Effect 3 <player Filter> <delay> <model> (start <X> <Y> <Z>) (end <X> <Y> <Z>) <life> <width> <end width> <Red> <Green> <Blue> <Alpha>
    USES: TE_SetupBeamPoints

    Code:
    stock ProcessEffect3(Handle:pack, String:cFilter[], const modelIndex)
    {
        ResetPack(pack);
        new String:buffer[128];
                    
        new Float:effectVector1[3];
        ReadPackString(pack, buffer, sizeof(buffer))
        PrintToServer(buffer)
        effectVector1[0] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[1] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[2] = StringToFloat(buffer);
        
        new Float:effectVector2[3];
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector2[0] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector2[1] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector2[2] = StringToFloat(buffer);
        
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:lifeF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:widthF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:endWidthF = StringToFloat(buffer);
        
        new colorArray[4];
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[0] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[1] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[2] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[3] = StringToInt(buffer);
                
        TE_SetupBeamPoints(effectVector1, effectVector2, modelIndex, haloIndex, 0, 0, lifeF, widthF, endWidthF, 0, 0.0, colorArray, 0)
        
        CloseHandle(pack);
        ProcessFilter(cFilter)
    }
    ---------- Post added at 01:23 PM ---------- Previous post was at 01:22 PM ----------

    Code:
    est_Effect 4 <player Filter> <delay> <model> <userid> <life> <width> <end width> <time to fade> <Red> <Green> <Blue> <Alpha>
    USES: TE_SetupBeamFollow

    Code:
    stock ProcessEffect4(Handle:pack, String:cFilter[], const modelIndex)
    {
        ResetPack(pack);
        new String:buffer[128];
                    
        ReadPackString(pack, buffer, sizeof(buffer))
        new client = GetClientOfUserId(StringToInt(buffer));
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:lifeF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:widthF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:endWidthF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new fadeLength = StringToInt(buffer);
        
        new colorArray[4];
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[0] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[1] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[2] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[3] = StringToInt(buffer);
        
        TE_SetupBeamFollow(client, modelIndex, haloIndex, lifeF, widthF, endWidthF, fadeLength, colorArray)
        
        CloseHandle(pack);
        ProcessFilter(cFilter)
    }
    ---------- Post added at 01:25 PM ---------- Previous post was at 01:23 PM ----------

    Code:
    est_Effect 7 <player Filter> <delay> <model> <x> <y> <z> <scale> <framerate>
    USES: TE_SetupSmoke

    Code:
    stock ProcessEffect7(Handle:pack, String:cFilter[], const modelIndex)
    {
        ResetPack(pack);
        new String:buffer[128];
                    
        new Float:effectVector1[3];
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[0] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[1] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[2] = StringToFloat(buffer);
        
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:scaleF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new frameRate = StringToInt(buffer);
        
        TE_SetupSmoke(effectVector1, modelIndex, scaleF, frameRate);
        
        CloseHandle(pack);
        ProcessFilter(cFilter)
    }
    ---------- Post added at 01:26 PM ---------- Previous post was at 01:25 PM ----------

    Code:
    est_Effect 10 <player Filter> <delay> <model> <x> <y> <z> <start radius> <end radius> <life> <width> <spread> <amplitude> <Red> <Green> <Blue> <Alpha> <speed>
    USES: BeamRingPoint

    Code:
    stock ProcessEffect10(Handle:pack, String:cFilter[], const modelIndex)
    {
        ResetPack(pack);
        new String:buffer[128];
                    
        new Float:effectVector1[3];
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[0] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[1] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[2] = StringToFloat(buffer);
        
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:startRadiusF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:endRadiusF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:lifeF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:widthF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new spread = StringToInt(buffer); // frameRate
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:amplitudeF = StringToFloat(buffer);
            
        new colorArray[4];
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[0] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[1] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[2] = StringToInt(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        colorArray[3] = StringToInt(buffer);
        
        ReadPackString(pack, buffer, sizeof(buffer))
        new speed = StringToInt(buffer);
        
        TE_Start("BeamRingPoint");
        TE_WriteVector("m_vecCenter", effectVector1);
        TE_WriteFloat("m_flStartRadius", startRadiusF);
        TE_WriteFloat("m_flEndRadius", endRadiusF);
        TE_WriteNum("m_nModelIndex", modelIndex);
        TE_WriteNum("m_nHaloIndex", haloIndex);
        TE_WriteNum("m_nStartFrame", 0);
        TE_WriteNum("m_nFrameRate", 0);
        TE_WriteFloat("m_fLife", lifeF);
        TE_WriteFloat("m_fWidth", widthF);
        TE_WriteFloat("m_fEndWidth", widthF);
        TE_WriteFloat("m_fAmplitude", amplitudeF);
        TE_WriteNum("r", colorArray[0]);
        TE_WriteNum("g", colorArray[1]);
        TE_WriteNum("b", colorArray[2]);
        TE_WriteNum("a", colorArray[3]);
        TE_WriteNum("m_nSpeed", speed);
        TE_WriteNum("m_nFlags", 0);
        TE_WriteNum("m_nFadeLength", spread);
        
        CloseHandle(pack);
        ProcessFilter(cFilter)
    }
    ---------- Post added at 01:28 PM ---------- Previous post was at 01:26 PM ----------

    Code:
    est_Effect 11 <player Filter> <delay> <model> <x> <y> <z> <life> <size> <brightness>
    USES: TE_SetupGlowSprite

    Code:
    stock ProcessEffect11(Handle:pack, String:cFilter[], const modelIndex)
    {
        ResetPack(pack);
        new String:buffer[128];
                    
        new Float:effectVector1[3];
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[0] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[1] = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        effectVector1[2] = StringToFloat(buffer);
        
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:lifeF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new Float:sizeF = StringToFloat(buffer);
        ReadPackString(pack, buffer, sizeof(buffer))
        new brightness = StringToInt(buffer);
        
        TE_SetupGlowSprite(effectVector1, modelIndex, lifeF, sizeF, brightness);
        
        CloseHandle(pack);
        ProcessFilter(cFilter)
    }



  2. Default

    I will be creating effect stocks based on this data to allow for faster conversion of effects written in es to sm. There will also be a stock set that will allow calling based on the est effect names and then run the correct stock or TE_ as needed.

    For example there may be a function called Bubbles but also a function called est_effect_14 which references Bubbles. By having all reference functions in one include file called est_effects.inc it will be easy for users to locate the function they want to use.



  3. Default

    I already have 3 forwards finished this really takes a lot of time to do. There is so many comments to write. Good news is that the programing of foreknown effects will be much faster now.



  4. Default

    I should have them all finished in the next day or so. Then I just got to test them and they will be finished and released publically.



  5. Default

    Finished releasing code publically.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •