Forum: GTA IV Mod Releases / W.I.P.s


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Like Tree21Likes

Thread: [release] Particle Effects Manager - Beta 1.1.0
  

Page 5 of 7 FirstFirst ... 3 4 5 6 7 LastLast
Results 41 to 50 of 70
  1. #41  
    nativesith's Avatar
    nativesith is online now Moderator
    Join Date
    Jun 2011
    Location
    Los Santos
    Posts
    1,363
    Downloads
    12
    Uploads
    7
    Mentioned
    37 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    962
    Likes Received
    647
    Wow dat is huge, a billion(fa fillion)lol! Never thought we could go dat high.
    Usually I stay at 255 or below(somewhere in between)...
    This works for not getting thrown off a bike(even by cops)...
    Code:
    void burn(void)
    {
      if (!IS_CHAR_SITTING_IN_ANY_CAR(GetPlayerPed()))
      {
        if (Vptfx!=0)
        {
          REMOVE_PTFX_FROM_VEHICLE(carptr);
          Vptfx = 0;
        }
      }
      else if (IS_CHAR_SITTING_IN_ANY_CAR(GetPlayerPed()))
      {
        GET_CAR_CHAR_IS_USING(GetPlayerPed(), &carptr);
    
        if (Vptfx==0)
        {
          if (DOES_VEHICLE_EXIST(carptr))
          { 
          Vptfx = START_PTFX_ON_VEH("ambient_fire_generic", carptr, Vxoff, Vyoff, Vzoff, Vyaw, Vpitch, Vroll, Vscale);
          }
        }
      }
      if (Pptfx==0)
      {
        //Pptfx = START_PTFX_ON_PED("fire_gas_burner", GetPlayerPed(), Pxoff, Pyoff, Pzoff, Pyaw, Ppitch, Proll, Pscale); // set the whole of niko on fire
        Pptfx = START_PTFX_ON_PED_BONE("ambient_fire_generic", GetPlayerPed(), Pxoff, Pyoff, Pzoff, Pyaw, Ppitch, Proll, 1205, Pscale); //set nikos head on fire
        SET_CHAR_PROOFS(GetPlayerPed(), 1, 1, 1, 1, 1);
        SET_CHAR_MOVE_ANIM_SPEED_MULTIPLIER(GetPlayerPed(),3);
        SET_CHAR_SHOOT_RATE(GetPlayerPed(),99);
        SET_CHAR_ACCURACY(GetPlayerPed(),99);
        SET_CHAR_CANT_BE_DRAGGED_OUT(GetPlayerPed(), true);
      }
    }
    Thought aboot it and I was like false?! What am I sayin?!
    Last edited by nativesith; 08-02-2012 at 07:20 PM.
    Reply With Quote  

  2. #42  
    jumper's Avatar
    jumper is online now Developer
    Join Date
    Jul 2005
    Posts
    288
    Downloads
    3
    Uploads
    0
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    74
    Likes Received
    207
    I didn't have any freezes from it, but like I said a lot didn't work, so there has to be something wrong.. I was kind of surprised at how many times that same number pops up for that native in the decompiled scripts pack, maybe it's an error?

    The decompiled scripts pack I'm talking about is linked here: http://alexander.sannybuilder.com/?category=iv_programs
    And to search all of that madness at once I used windows grep: Windows Grep: Grep for Windows
    Reply With Quote  

  3. #43  
    nativesith's Avatar
    nativesith is online now Moderator
    Join Date
    Jun 2011
    Location
    Los Santos
    Posts
    1,363
    Downloads
    12
    Uploads
    7
    Mentioned
    37 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    962
    Likes Received
    647
    This is what I am usin now.
    Code:
    #include <natives.h>
    #include <common.h>
    #include <strings.h>
    #include <types.h>
    #include <consts.h>
    
    #include "Functions.c"
    
    
    /********************** PS3 CONTROLLER BUTTON MAP **********************/
    #define L1         0x4
    #define L2         0x5
    #define R1         0x6
    #define R2         0x7
    #define DPAD_UP    0x8
    #define DPAD_DOWN  0x9
    #define DPAD_LEFT  0xA
    #define DPAD_RIGHT 0xB
    #define START      0xC
    #define SELECT     0xD
    #define SQUARE     0xE
    #define TRIANGLE   0xF
    #define X          0x10
    #define CIRCLE     0x11
    #define STICK_L    0x12  //L3
    #define STICK_R    0x13  //R3
    /**************************************************  *********************/
    
    uint rA=200, rB=255,
         gA=  0, gB=0,
         bA=  0, bB=0,
         aA=110, aB=0, a=110,
    
         ptfxmode=1; // 1=tweak variables mode, 2=gameplay mode
    
    
    float pos_xA=0.06000000, pos_xB=0.05000000,
    
          width = 0.30000000, height = 0.30000000,
    
          x,y,z,h, //coords and heading
    
          Pxoff  = 0.1, Pyoff  = 0.1, Pzoff = 0.0, //player ptfx coord offsets
          Pyaw   = 0.0, Ppitch = 0.0, Proll = 0.0, //player ptfx rotational offsets
          Pscale = 4.0,                            //player ptfx scale/intensity
    
          Vxoff  = 0.0, Vyoff  = 0.0, Vzoff = 0.0, //vehicle ptfx coord offsets
          Vyaw   = 0.0, Vpitch = 0.0, Vroll = 0.0, //vehicle ptfx rotational offsets
          Vscale = 5.0,                            //vehicle ptfx scale/intensity
    
          pos_yA=0.29000000, pos_yB=0.32000000, pos_yC=0.35000000,
          pos_yD=0.38000000, pos_yE=0.41000000, pos_yF=0.44000000,
          pos_yG=0.47000000, pos_yH=0.53000000, pos_yI=0.56000000,
          pos_yJ=0.59000000, pos_yK=0.62000000, pos_yL=0.65000000,
          pos_yM=0.68000000, pos_yN=0.71000000, pos_yO=0.74000000,
    
          markerpos = 0.0, markerposY = 0.29000000;
    
    
    int Pptfx = 0, Vptfx = 0, //player ptfx and vehicle ptfx pointers
        carptr = 0; //players car pointer
    
    
    void NumberDisplayLoop(void)
    {
      set_up_draw(0, width, height, rB, gB, bB, a);   draw_text("STRING", pos_xB, markerposY, ">");
    
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yA, Pxoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yB, Pyoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yC, Pzoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yD, Pyaw);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yE, Ppitch);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yF, Proll);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yG, Pscale);
    
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yH, Vxoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yI, Vyoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yJ, Vzoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yK, Vyaw);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yL, Vpitch);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yM, Vroll);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yN, Vscale);
    
      set_up_draw(2, width, height, rA, gA, bA, aA);
    
           if (ptfxmode==1) { draw_text("STRING", pos_xB, pos_yO, "tweak"); }
      else if (ptfxmode==2) { draw_text("STRING", pos_xB, pos_yO, "play"); }
    }
    
    
    void movemarker(void)
    {
           if (markerpos==0.0)  { markerposY = pos_yA; }   else if (markerpos==1.0)  { markerposY = pos_yB; }
      else if (markerpos==2.0)  { markerposY = pos_yC; }   else if (markerpos==3.0)  { markerposY = pos_yD; }
      else if (markerpos==4.0)  { markerposY = pos_yE; }   else if (markerpos==5.0)  { markerposY = pos_yF; }
      else if (markerpos==6.0)  { markerposY = pos_yG; }   else if (markerpos==7.0)  { markerposY = pos_yH; }
      else if (markerpos==8.0)  { markerposY = pos_yI; }   else if (markerpos==9.0)  { markerposY = pos_yJ; }
      else if (markerpos==10.0) { markerposY = pos_yK; }   else if (markerpos==11.0) { markerposY = pos_yL; }
      else if (markerpos==12.0) { markerposY = pos_yM; }   else if (markerpos==13.0) { markerposY = pos_yN; }
    }
    
    
    void changeoffsets(void)
    {
      /*buttons used:  DPAD_UP DPAD_DOWN DPAD_LEFT DPAD_RIGHT
    
        markerpos values and relative value types
                coord offsets: 0,1,2,7,8,9
           rotational offsets: 3,4,5,10,11,12
                   ptfx scale: 6,13
    
          0/7   1/8  2/9    3/10  4/11  5/12    6/13
         Pxoff Pyoff Pzoff  Pyaw Ppitch Proll  Pscale
         Vxoff Vyoff Vzoff  Vyaw Vpitch Vroll  Vscale
      */
      if (ptfxmode==1)
      {
        if (IS_BUTTON_JUST_PRESSED(0,DPAD_DOWN))
        {
          if (markerpos==13.0) { markerpos = 0.0; }
          else                 { markerpos = markerpos+1.0; }
    
          movemarker();
        }
    
        if (IS_BUTTON_JUST_PRESSED(0,DPAD_UP))
        {
          if (markerpos==0.0) { markerpos = 13.0; }
          else                { markerpos = markerpos-1.0; }
    
          movemarker();
        }
    
        if (IS_BUTTON_PRESSED(0,DPAD_RIGHT))
        {
               if (markerpos==0.0) { Pxoff = Pxoff+0.1; }   else if (markerpos==1.0) { Pyoff = Pyoff+0.1; }
          else if (markerpos==2.0) { Pzoff = Pzoff+0.1; }   else if (markerpos==7.0) { Vxoff = Vxoff+0.1; }
          else if (markerpos==8.0) { Vyoff = Vyoff+0.1; }   else if (markerpos==9.0) { Vzoff = Vzoff+0.1; }
    
          else if (markerpos==3.0)  { if (Pyaw>=359.9)   { Pyaw   = 0.0; } else { Pyaw   = Pyaw+0.1; } }
          else if (markerpos==4.0)  { if (Ppitch>=359.9) { Ppitch = 0.0; } else { Ppitch = Ppitch+0.1; } }
          else if (markerpos==5.0)  { if (Proll>=359.9)  { Proll  = 0.0; } else { Proll  = Proll+0.1; } }
          else if (markerpos==10.0) { if (Vyaw>=359.9)   { Vyaw   = 0.0; } else { Vyaw   = Vyaw+0.1; } }
          else if (markerpos==11.0) { if (Vpitch>=359.9) { Vpitch = 0.0; } else { Vpitch = Vpitch+0.1; } }
          else if (markerpos==12.0) { if (Vroll>=359.9)  { Vroll  = 0.0; } else { Vroll  = Vroll+0.1; } }
    
          else if (markerpos==6.0)  { if (Pscale>=5.0) { Pscale = 0.1; } else { Pscale = Pscale+0.1; } }
          else if (markerpos==13.0) { if (Vscale>=5.0) { Vscale = 0.1; } else { Vscale = Vscale+0.1; } }
    
          WAIT(5);
        }
    
        if (IS_BUTTON_PRESSED(0,DPAD_LEFT))
        {
               if (markerpos==0.0) { Pxoff = Pxoff-0.1; }   else if (markerpos==1.0) { Pyoff = Pyoff-0.1; }
          else if (markerpos==2.0) { Pzoff = Pzoff-0.1; }   else if (markerpos==7.0) { Vxoff = Vxoff-0.1; }
          else if (markerpos==8.0) { Vyoff = Vyoff-0.1; }   else if (markerpos==9.0) { Vzoff = Vzoff-0.1; }
    
          else if (markerpos==3.0)  { if (Pyaw<=0.0)   { Pyaw   = 359.9; } else { Pyaw   = Pyaw-0.1; } }
          else if (markerpos==4.0)  { if (Ppitch<=0.0) { Ppitch = 359.9; } else { Ppitch = Ppitch-0.1; } }
          else if (markerpos==5.0)  { if (Proll<=0.0)  { Proll  = 359.9; } else { Proll  = Proll-0.1; } }
          else if (markerpos==10.0) { if (Vyaw<=0.0)   { Vyaw   = 359.9; } else { Vyaw   = Vyaw-0.1; } }
          else if (markerpos==11.0) { if (Vpitch<=0.0) { Vpitch = 359.9; } else { Vpitch = Vpitch-0.1; } }
          else if (markerpos==12.0) { if (Vroll<=0.0)  { Vroll  = 359.9; } else { Vroll  = Vroll-0.1; } }
    
          else if (markerpos==6.0)  { if (Pscale<=0.1) { Pscale = 5.0; } else { Pscale = Pscale-0.1; } }
          else if (markerpos==13.0) { if (Vscale<=0.1) { Vscale = 5.0; } else { Vscale = Vscale-0.1; } }
    
          WAIT(5);
        }
      }
    }
    
    
    void applyoffsets(void)
    {
      if (ptfxmode==1)
      {
        if (IS_BUTTON_JUST_PRESSED(0,STICK_R))
        {
          /* i don't think these 2 lines work but if you want to try them here they are
    
          if (Vptfx!=0) { UPDATE_PTFX_OFFSETS(Vptfx,Vxoff,Vyoff,Vzoff,Vyaw,V  pitch,Vroll); }
          if (Pptfx!=0) { UPDATE_PTFX_OFFSETS(Pptfx,Pxoff,Pyoff,Pzoff,Pyaw,P  pitch,Proll); }
          //*/
    
    
          // since burn() automatically sets you and the vehicle on fire resetting the
          // particle effects pointers should reset the effects with adjusted variables
    
          Vptfx=0;
          Pptfx=0;
    
          REMOVE_PTFX_FROM_PED(GetPlayerPed());
        }
      }
    }
    
    void changemode(void)
    {
      // 1=tweak variables mode, 2=gameplay mode
      if (IS_BUTTON_JUST_PRESSED(0,STICK_L))
      {
        if (ptfxmode==2)
        {
          ptfxmode=1;
          a=aA;
        }
        else
        {
          ptfxmode=ptfxmode+1;
    
          if (ptfxmode==2) { a=aB; }
          else             { a=aA; }
        }
      }
    }
    
    void burn(void)
    {
      if (!IS_CHAR_SITTING_IN_ANY_CAR(GetPlayerPed()))
      {
        if (Vptfx!=0)
        {
          REMOVE_PTFX_FROM_VEHICLE(carptr);
          Vptfx = 0;
        }
      }
      else if (IS_CHAR_SITTING_IN_ANY_CAR(GetPlayerPed()))
      {
        GET_CAR_CHAR_IS_USING(GetPlayerPed(), &carptr);
    
        if (Vptfx==0)
        {
          if (DOES_VEHICLE_EXIST(carptr))
          { 
          Vptfx = START_PTFX_ON_VEH("ambient_fire_generic", carptr, Vxoff, Vyoff, Vzoff, Vyaw, Vpitch, Vroll, Vscale);
          }
        }
      }
      if (Pptfx==0)
      {
        //Pptfx = START_PTFX_ON_PED("fire_gas_burner", GetPlayerPed(), Pxoff, Pyoff, Pzoff, Pyaw, Ppitch, Proll, Pscale); // set the whole of niko on fire
        Pptfx = START_PTFX_ON_PED_BONE("ambient_fire_generic", GetPlayerPed(), Pxoff, Pyoff, Pzoff, Pyaw, Ppitch, Proll, 1205, Pscale); //set nikos head on fire
        SET_CHAR_PROOFS(GetPlayerPed(), 1, 1, 1, 1, 1);
        SET_CHAR_MOVE_ANIM_SPEED_MULTIPLIER(GetPlayerPed()  ,3);
        SET_CHAR_SHOOT_RATE(GetPlayerPed(),99);
        SET_CHAR_ACCURACY(GetPlayerPed(),99);
        SET_CHAR_CANT_BE_DRAGGED_OUT(GetPlayerPed(), true);
      }
    }
    void main(void)
    {
      while(true)
      {
        WAIT(0);
    
        burn();
        changeoffsets();
        changemode();
        applyoffsets();
        NumberDisplayLoop();
      }
    }
    Until we can get UPDATE_PTFX_TINT(uint ptfx, float r, float g, float b, float a); working.
    Here is da video of dis script in action!
    Last edited by nativesith; 08-03-2012 at 02:44 AM.
    ribonucleic likes this.
    Reply With Quote  

  4. #44  
    Three-Socks's Avatar
    Three-Socks is offline Developer
    Join Date
    Feb 2011
    Posts
    362
    Downloads
    16
    Uploads
    0
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    83
    Likes Received
    308
    ribonucleic I've converted a basic version of your mod to menu library.

    I've been kinda busy the past few days so I didn't have much time to work on it. I was planning on giving you a really good basis to work on from.

    Heres what I was planning for the menu layout:

    Effect -(Choose a effect, I was just going to list two and let you do the rest.)
    Offsets
    Bone (List a few bones to set the particle on)
    A menu for this native UPDATE_PTFX_TINT.
    Start Effect.

    and someplace to choose to set effect on ped or veh.

    ^ I still plan on doing this for you. But I've ran out of time for today and maybe the whole weekend. Which is why I'm giving it to you now as it is.

    So all I've done so far is the basic structure of the mod with just one main menu with no subs. Just listing the offsets. When pressed they apply the flame effect to the ped.

    One note on the main structure of the mod (particlemanager.c). Its a little unconventional and different to my trainer and modmanager (converted to menu library). Because menu library is designed to be run by a startup script by modmanager (see 3s_trainer_startup.c). But because we need your script to keep running (to save the values). I had to do things a little different thats all.

    Press R1+Down to open menu.
    Last edited by Three-Socks; 08-03-2012 at 12:34 PM.
    HuN and ribonucleic like this.
    Reply With Quote  

  5. #45  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    641
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    127
    Likes Received
    279
    Quote Originally Posted by Three-Socks View Post
    ribonucleic I've converted a basic version of your mod to menu library.

    I've been kinda busy the past few days so I didn't have much time to work on it. I was planning on giving you a really good basis to work on from.

    Heres what I was planning for the menu layout:

    Effect -(Choose a effect, I was just going to list two and let you do the rest.)
    Offsets
    Bone (List a few bones to set the particle on)
    A menu for this native UPDATE_PTFX_TINT.
    Start Effect.

    and someplace to choose to set effect on ped or veh.

    ^ I still plan on doing this for you. But I've ran out of time for today and maybe the whole weekend. Which is why I'm giving it to you now as it is.

    So all I've done so far is the basic structure of the mod with just one main menu with no subs. Just listing the offsets. When pressed they apply the flame effect to the ped.

    One note on the main structure of the mod (particlemanager.c). Its a little conventional and different to my trainer and modmanager (converted to menu library). Because menu library is designed to be run by a startup script by modmanager (see 3s_trainer_startup.c). But because we need your script to keep running (to save the values). I had to do things a little different thats all.

    Press R1+Down to open menu.
    cool, could you provide the code for what you have so far or do you want to leave it till you're finished?
    Last edited by ribonucleic; 01-12-2013 at 12:46 AM.
    Reply With Quote  

  6. #46  
    nativesith's Avatar
    nativesith is online now Moderator
    Join Date
    Jun 2011
    Location
    Los Santos
    Posts
    1,363
    Downloads
    12
    Uploads
    7
    Mentioned
    37 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    962
    Likes Received
    647
    "Say driver...the table is turned.
    Catch a fire, your gonna get burned! Yeah!"- Bob Marley

    OMG UPDATE_PXTFX_TINT menu! Thanks ,praise, and much respect 3!
    Reply With Quote  

  7. #47  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    641
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    127
    Likes Received
    279
    Quote Originally Posted by nativesith View Post
    This is what I am usin now.
    Code:
    #include <natives.h>
    #include <common.h>
    #include <strings.h>
    #include <types.h>
    #include <consts.h>
    
    #include "Functions.c"
    
    
    /********************** PS3 CONTROLLER BUTTON MAP **********************/
    #define L1         0x4
    #define L2         0x5
    #define R1         0x6
    #define R2         0x7
    #define DPAD_UP    0x8
    #define DPAD_DOWN  0x9
    #define DPAD_LEFT  0xA
    #define DPAD_RIGHT 0xB
    #define START      0xC
    #define SELECT     0xD
    #define SQUARE     0xE
    #define TRIANGLE   0xF
    #define X          0x10
    #define CIRCLE     0x11
    #define STICK_L    0x12  //L3
    #define STICK_R    0x13  //R3
    /**************************************************  *********************/
    
    uint rA=200, rB=255,
         gA=  0, gB=0,
         bA=  0, bB=0,
         aA=110, aB=0, a=110,
    
         ptfxmode=1; // 1=tweak variables mode, 2=gameplay mode
    
    
    float pos_xA=0.06000000, pos_xB=0.05000000,
    
          width = 0.30000000, height = 0.30000000,
    
          x,y,z,h, //coords and heading
    
          Pxoff  = 0.1, Pyoff  = 0.1, Pzoff = 0.0, //player ptfx coord offsets
          Pyaw   = 0.0, Ppitch = 0.0, Proll = 0.0, //player ptfx rotational offsets
          Pscale = 4.0,                            //player ptfx scale/intensity
    
          Vxoff  = 0.0, Vyoff  = 0.0, Vzoff = 0.0, //vehicle ptfx coord offsets
          Vyaw   = 0.0, Vpitch = 0.0, Vroll = 0.0, //vehicle ptfx rotational offsets
          Vscale = 5.0,                            //vehicle ptfx scale/intensity
    
          pos_yA=0.29000000, pos_yB=0.32000000, pos_yC=0.35000000,
          pos_yD=0.38000000, pos_yE=0.41000000, pos_yF=0.44000000,
          pos_yG=0.47000000, pos_yH=0.53000000, pos_yI=0.56000000,
          pos_yJ=0.59000000, pos_yK=0.62000000, pos_yL=0.65000000,
          pos_yM=0.68000000, pos_yN=0.71000000, pos_yO=0.74000000,
    
          markerpos = 0.0, markerposY = 0.29000000;
    
    
    int Pptfx = 0, Vptfx = 0, //player ptfx and vehicle ptfx pointers
        carptr = 0; //players car pointer
    
    
    void NumberDisplayLoop(void)
    {
      set_up_draw(0, width, height, rB, gB, bB, a);   draw_text("STRING", pos_xB, markerposY, ">");
    
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yA, Pxoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yB, Pyoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yC, Pzoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yD, Pyaw);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yE, Ppitch);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yF, Proll);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yG, Pscale);
    
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yH, Vxoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yI, Vyoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yJ, Vzoff);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yK, Vyaw);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yL, Vpitch);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yM, Vroll);
      set_up_draw(2, width, height, rA, gA, bA, aA);  draw_float("NUMBR", pos_xA, pos_yN, Vscale);
    
      set_up_draw(2, width, height, rA, gA, bA, aA);
    
           if (ptfxmode==1) { draw_text("STRING", pos_xB, pos_yO, "tweak"); }
      else if (ptfxmode==2) { draw_text("STRING", pos_xB, pos_yO, "play"); }
    }
    
    
    void movemarker(void)
    {
           if (markerpos==0.0)  { markerposY = pos_yA; }   else if (markerpos==1.0)  { markerposY = pos_yB; }
      else if (markerpos==2.0)  { markerposY = pos_yC; }   else if (markerpos==3.0)  { markerposY = pos_yD; }
      else if (markerpos==4.0)  { markerposY = pos_yE; }   else if (markerpos==5.0)  { markerposY = pos_yF; }
      else if (markerpos==6.0)  { markerposY = pos_yG; }   else if (markerpos==7.0)  { markerposY = pos_yH; }
      else if (markerpos==8.0)  { markerposY = pos_yI; }   else if (markerpos==9.0)  { markerposY = pos_yJ; }
      else if (markerpos==10.0) { markerposY = pos_yK; }   else if (markerpos==11.0) { markerposY = pos_yL; }
      else if (markerpos==12.0) { markerposY = pos_yM; }   else if (markerpos==13.0) { markerposY = pos_yN; }
    }
    
    
    void changeoffsets(void)
    {
      /*buttons used:  DPAD_UP DPAD_DOWN DPAD_LEFT DPAD_RIGHT
    
        markerpos values and relative value types
                coord offsets: 0,1,2,7,8,9
           rotational offsets: 3,4,5,10,11,12
                   ptfx scale: 6,13
    
          0/7   1/8  2/9    3/10  4/11  5/12    6/13
         Pxoff Pyoff Pzoff  Pyaw Ppitch Proll  Pscale
         Vxoff Vyoff Vzoff  Vyaw Vpitch Vroll  Vscale
      */
      if (ptfxmode==1)
      {
        if (IS_BUTTON_JUST_PRESSED(0,DPAD_DOWN))
        {
          if (markerpos==13.0) { markerpos = 0.0; }
          else                 { markerpos = markerpos+1.0; }
    
          movemarker();
        }
    
        if (IS_BUTTON_JUST_PRESSED(0,DPAD_UP))
        {
          if (markerpos==0.0) { markerpos = 13.0; }
          else                { markerpos = markerpos-1.0; }
    
          movemarker();
        }
    
        if (IS_BUTTON_PRESSED(0,DPAD_RIGHT))
        {
               if (markerpos==0.0) { Pxoff = Pxoff+0.1; }   else if (markerpos==1.0) { Pyoff = Pyoff+0.1; }
          else if (markerpos==2.0) { Pzoff = Pzoff+0.1; }   else if (markerpos==7.0) { Vxoff = Vxoff+0.1; }
          else if (markerpos==8.0) { Vyoff = Vyoff+0.1; }   else if (markerpos==9.0) { Vzoff = Vzoff+0.1; }
    
          else if (markerpos==3.0)  { if (Pyaw>=359.9)   { Pyaw   = 0.0; } else { Pyaw   = Pyaw+0.1; } }
          else if (markerpos==4.0)  { if (Ppitch>=359.9) { Ppitch = 0.0; } else { Ppitch = Ppitch+0.1; } }
          else if (markerpos==5.0)  { if (Proll>=359.9)  { Proll  = 0.0; } else { Proll  = Proll+0.1; } }
          else if (markerpos==10.0) { if (Vyaw>=359.9)   { Vyaw   = 0.0; } else { Vyaw   = Vyaw+0.1; } }
          else if (markerpos==11.0) { if (Vpitch>=359.9) { Vpitch = 0.0; } else { Vpitch = Vpitch+0.1; } }
          else if (markerpos==12.0) { if (Vroll>=359.9)  { Vroll  = 0.0; } else { Vroll  = Vroll+0.1; } }
    
          else if (markerpos==6.0)  { if (Pscale>=5.0) { Pscale = 0.1; } else { Pscale = Pscale+0.1; } }
          else if (markerpos==13.0) { if (Vscale>=5.0) { Vscale = 0.1; } else { Vscale = Vscale+0.1; } }
    
          WAIT(5);
        }
    
        if (IS_BUTTON_PRESSED(0,DPAD_LEFT))
        {
               if (markerpos==0.0) { Pxoff = Pxoff-0.1; }   else if (markerpos==1.0) { Pyoff = Pyoff-0.1; }
          else if (markerpos==2.0) { Pzoff = Pzoff-0.1; }   else if (markerpos==7.0) { Vxoff = Vxoff-0.1; }
          else if (markerpos==8.0) { Vyoff = Vyoff-0.1; }   else if (markerpos==9.0) { Vzoff = Vzoff-0.1; }
    
          else if (markerpos==3.0)  { if (Pyaw<=0.0)   { Pyaw   = 359.9; } else { Pyaw   = Pyaw-0.1; } }
          else if (markerpos==4.0)  { if (Ppitch<=0.0) { Ppitch = 359.9; } else { Ppitch = Ppitch-0.1; } }
          else if (markerpos==5.0)  { if (Proll<=0.0)  { Proll  = 359.9; } else { Proll  = Proll-0.1; } }
          else if (markerpos==10.0) { if (Vyaw<=0.0)   { Vyaw   = 359.9; } else { Vyaw   = Vyaw-0.1; } }
          else if (markerpos==11.0) { if (Vpitch<=0.0) { Vpitch = 359.9; } else { Vpitch = Vpitch-0.1; } }
          else if (markerpos==12.0) { if (Vroll<=0.0)  { Vroll  = 359.9; } else { Vroll  = Vroll-0.1; } }
    
          else if (markerpos==6.0)  { if (Pscale<=0.1) { Pscale = 5.0; } else { Pscale = Pscale-0.1; } }
          else if (markerpos==13.0) { if (Vscale<=0.1) { Vscale = 5.0; } else { Vscale = Vscale-0.1; } }
    
          WAIT(5);
        }
      }
    }
    
    
    void applyoffsets(void)
    {
      if (ptfxmode==1)
      {
        if (IS_BUTTON_JUST_PRESSED(0,STICK_R))
        {
          /* i don't think these 2 lines work but if you want to try them here they are
    
          if (Vptfx!=0) { UPDATE_PTFX_OFFSETS(Vptfx,Vxoff,Vyoff,Vzoff,Vyaw,V  pitch,Vroll); }
          if (Pptfx!=0) { UPDATE_PTFX_OFFSETS(Pptfx,Pxoff,Pyoff,Pzoff,Pyaw,P  pitch,Proll); }
          //*/
    
    
          // since burn() automatically sets you and the vehicle on fire resetting the
          // particle effects pointers should reset the effects with adjusted variables
    
          Vptfx=0;
          Pptfx=0;
    
          REMOVE_PTFX_FROM_PED(GetPlayerPed());
        }
      }
    }
    
    void changemode(void)
    {
      // 1=tweak variables mode, 2=gameplay mode
      if (IS_BUTTON_JUST_PRESSED(0,STICK_L))
      {
        if (ptfxmode==2)
        {
          ptfxmode=1;
          a=aA;
        }
        else
        {
          ptfxmode=ptfxmode+1;
    
          if (ptfxmode==2) { a=aB; }
          else             { a=aA; }
        }
      }
    }
    
    void burn(void)
    {
      if (!IS_CHAR_SITTING_IN_ANY_CAR(GetPlayerPed()))
      {
        if (Vptfx!=0)
        {
          REMOVE_PTFX_FROM_VEHICLE(carptr);
          Vptfx = 0;
        }
      }
      else if (IS_CHAR_SITTING_IN_ANY_CAR(GetPlayerPed()))
      {
        GET_CAR_CHAR_IS_USING(GetPlayerPed(), &carptr);
    
        if (Vptfx==0)
        {
          if (DOES_VEHICLE_EXIST(carptr))
          { 
          Vptfx = START_PTFX_ON_VEH("ambient_fire_generic", carptr, Vxoff, Vyoff, Vzoff, Vyaw, Vpitch, Vroll, Vscale);
          }
        }
      }
      if (Pptfx==0)
      {
        //Pptfx = START_PTFX_ON_PED("fire_gas_burner", GetPlayerPed(), Pxoff, Pyoff, Pzoff, Pyaw, Ppitch, Proll, Pscale); // set the whole of niko on fire
        Pptfx = START_PTFX_ON_PED_BONE("ambient_fire_generic", GetPlayerPed(), Pxoff, Pyoff, Pzoff, Pyaw, Ppitch, Proll, 1205, Pscale); //set nikos head on fire
        SET_CHAR_PROOFS(GetPlayerPed(), 1, 1, 1, 1, 1);
        SET_CHAR_MOVE_ANIM_SPEED_MULTIPLIER(GetPlayerPed()  ,3);
        SET_CHAR_SHOOT_RATE(GetPlayerPed(),99);
        SET_CHAR_ACCURACY(GetPlayerPed(),99);
        SET_CHAR_CANT_BE_DRAGGED_OUT(GetPlayerPed(), true);
      }
    }
    void main(void)
    {
      while(true)
      {
        WAIT(0);
    
        burn();
        changeoffsets();
        changemode();
        applyoffsets();
        NumberDisplayLoop();
      }
    }
    Until we can get UPDATE_PTFX_TINT(uint ptfx, float r, float g, float b, float a); working.
    Here is da video of dis script in action!
    thanks for the video very interesting to see a different effect in action, have not done much in the last few days lost my bloody display cables, btw how can i create videos from the ps3 version (still not picked up a copy of the pc version keep forgetting to do so)?
    Reply With Quote  

  8. #48  
    Three-Socks's Avatar
    Three-Socks is offline Developer
    Join Date
    Feb 2011
    Posts
    362
    Downloads
    16
    Uploads
    0
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    83
    Likes Received
    308
    Quote Originally Posted by ribonucleic View Post
    cool, could you provide the code for what you have so far or do you want to leave it till you're finished?
    Sorry I was supposed to give you the link :P

    I've uploaded to my repo https://bitbucket.org/ThreeSocks/par...ffects-manager
    ribonucleic likes this.
    Reply With Quote  

  9. #49  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    641
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    127
    Likes Received
    279
    Quote Originally Posted by Three-Socks View Post
    Sorry I was supposed to give you the link :P

    I've uploaded to my repo https://bitbucket.org/ThreeSocks/par...ffects-manager
    you shouldn't be apologising you're doing me and a lot of others favors with the stuff you come up with ModManager, Garage Mod Shop and now the Menu Library and Trainer
    Last edited by ribonucleic; 01-12-2013 at 12:47 AM.
    Three-Socks likes this.
    Reply With Quote  

  10. #50  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    641
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    127
    Likes Received
    279
    Just looking through my code and realising that with the new menu system i can cut out significant chunks of code
    Last edited by ribonucleic; 01-12-2013 at 12:48 AM.
    Reply With Quote  

Page 5 of 7 FirstFirst ... 3 4 5 6 7 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •