Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

DK22Pac

[CLEO4]NewOpcodes by DK22Pac

Recommended Posts

Bad.boy!

That one works, thanks.

Share this post


Link to post
Share on other sites
DK22Pac

An update is coming... Soon...

Audio

 

0DXX: HMP3EFFECT = set_audiostream HMP3 effect AUDIOSTREAMEFFECT_ECHO

 

with default BASS effects

 

AUDIOSTREAMEFFECT_CHORUSAUDIOSTREAMEFFECT_COMPRESSORAUDIOSTREAMEFFECT_DISTORTIONAUDIOSTREAMEFFECT_ECHOAUDIOSTREAMEFFECT_FLANGERAUDIOSTREAMEFFECT_GARGLEAUDIOSTREAMEFFECT_I3DL2REVERBAUDIOSTREAMEFFECT_PARAMEQAUDIOSTREAMEFFECT_REVERB

 

 

0DXX: set_audiostream HMP3 position_time 30.0

 

Already did these things on CLEO (for a quick test tounge.gif )

Drawing

 

0DXX: print "Hello, world!" at 20.0 20.0 scale 1.0 1.0 font FONT_GOTHIC color 255 255 255 255 // basic version

 

Share this post


Link to post
Share on other sites
TheGodfather.

That's pretty good news..Waiting for the update..icon14.gif

Share this post


Link to post
Share on other sites
DK22Pac

Update uploaded.

D/L

Added opcodes:

 

0D64: [email protected] = load_texture_png_from "image.png" // IF and SET

 

 

0D65: print "Hello, world" at 50.0 50.0 scale 1.0 1.0 style FONT_GOTHIC

 

 

0D66: print "Hello, world" at 50.0 50.0 scale 1.0 1.0 style FONT_GOTHIC prop TRUE align ALIGN_LEFT wrap 600.0 justify FALSE color 255 255 255 255 outline 0 shadow 0 dropColor 0 0 0 0 background FALSE backColor 0 0 0 0

 

 

0D67: set_audiostream [email protected] position_time 30.0

 

 

0D68: [email protected] = get_audiostream [email protected] position_time

 

 

0D69: [email protected] = set_audiostream [email protected] effect AUDIOSTREAMEFFECT_ECHO priority 0

 

 

0D6A: remove_audiostream [email protected] effect [email protected]

 

 

0D6B: set_audiostream_effect [email protected] parameters_from_buf [email protected]

 

 

0D6C: get_audiostream_effect [email protected] parameters_to_buf [email protected]

 

 

0D6D: reset_audiostream_effect [email protected]

 

 

0D6E: set_audiostream [email protected] attribute AUDIOSTREAMATTR_PAN to -1.0

 

 

0D6F: [email protected] = get_audiostream [email protected] attribute AUDIOSTREAMATTR_PAN

 

 

0D70: set_3d_audiostream [email protected] _3d_attributes_mode 3DAUDIOSTREAM3DMODE_NORMAL min -1.0 max -1.0 iangle -1 oangle -1 outvol -1.0

 

 

0D71: get_3d_audiostream [email protected] _3d_attributes_mode_to [email protected] min_to [email protected] max_to [email protected] iangle_to NULL oangle_to NULL outvol_to NULL

 

 

0D72: get_sfx_volume_to [email protected] radio_volume_to NULL type TYPE_FLOAT

 

 

0D73: get_screen_width_to [email protected] height_to [email protected] type TYPE_FLOAT

 

Info added into help files.

Share this post


Link to post
Share on other sites
TheGodfather.

Well done icon14.gif You are just amazing dude..

Going to try it out..wink.gif

 

EDIT: I tried it this one is just awesome (Previous version didn't worked for me) although I was really waiting for this opcode:

 

 

0D72: get_sfx_volume_to [email protected] radio_volume_to NULL type TYPE_FLOAT

 

 

 

Thanks a lot..Great & amazing work..cookie.gifcookie.gificon14.gif

 

Edited by arijitsen

Share this post


Link to post
Share on other sites
Jason Statham

I think you can destroy this texture using function:

 

.text:007F3820    ; int __cdecl RwTextureDestroy(RwTexture *texture)

 

Edited by juarez

Share this post


Link to post
Share on other sites
Xzax

what is this newopcodes ? I downloaded a car mod, it tells me that I need this, how can I install this ?

Share this post


Link to post
Share on other sites
MasterHK

I saw many versions of this mod in some mods.e.g. Izerli's ActiveDashBoard.

Is this (23.01.2013) last version?

Share this post


Link to post
Share on other sites
DK22Pac

I'm planning to release fixed/improved version of newOpcodes (possibly it will be depended on plugin sdk).

Possibly some new opcodes will be added. If you have any ideas - post them here.

Share this post


Link to post
Share on other sites
Silent

Psst, there is GET_PED_TYPE :pp

Share this post


Link to post
Share on other sites
jackusCTB

Idea: maybe convert this function to an opcode that would look something like this:

0000: get_collision_point to [email protected] [email protected] [email protected] from_origin [email protected] [email protected] [email protected] to_target [email protected] [email protected] [email protected] entity_to [email protected] with_params 0 0 0 0 1 1 1 1 
0AA7: call_function 0x0056BA00 num_params 12 pop 12 bIgnoreShootThroughStuff false bIgnoreSomeObjectsForCamera false bIgnoreSeeThroughStuff false bParticle false bObject true bPed true bVehicle true bBuilding true pclEntity [email protected] pclPoint [email protected] pstTarget [email protected] pstOrigin [email protected] bReturn 5

Share this post


Link to post
Share on other sites
DK22Pac

or maybe more "actor [email protected] kill actor [email protected]" opcodes similar to those from VC. There's only 1 for SA.

There are 3 opcodes in SA for this (CTaskComplexKillPedOnFootTask):

 

05E2: AS_actor [email protected] kill_actor [email protected]: AS_actor -1 attack_actor $PLAYER_ACTOR time 1500 // same as above but timed0634: AS_actor [email protected] attack_using_weapon_actor [email protected] flags 4 perform_actions_after_time 2000 chance_of_action 100 // same as above but with additional parameters (mostly used for armed peds)

Idea: maybe convert this function to an opcode that would look something like this:

This one is already done.

 

0D3A=20,get_collision_between_points %1d% %2d% %3d% and %4d% %5d% %6d% flags %7d% %8d% %9d% %10d% %11d% %12d% %13d% %14d% ignore_entity %15d% store_point_to %17d% %18d% %19d% entity_to %20d% colpoint_data_to %16d% // IF and SET
Edited by _DK

Share this post


Link to post
Share on other sites
Ss4gogeta0

anyway you can make an opcode to set a custom weapon ID # to weapons added using the "Weapon Limit Adjuster"?

Share this post


Link to post
Share on other sites
DK22Pac

@Ss4gogeta0 Nope ;)

Ok, looks like I'm rewriting it.

6mbh.th.png

Share this post


Link to post
Share on other sites
Ss4gogeta0

@Ss4gogeta0 Nope ;)

 

u sure? cuz I sent Silent this (cant remember where I found it in the GTA SA files....)

 

Weapon defines#define WEAPON_BRASSKNUCKLE                (1)#define WEAPON_GOLFCLUB                    (2)#define WEAPON_NITESTICK                (3)#define WEAPON_KNIFE                    (4)#define WEAPON_BAT                        (5)#define WEAPON_SHOVEL                    (6)#define WEAPON_POOLSTICK                (7)#define WEAPON_KATANA                    (8)#define WEAPON_CHAINSAW                    (9)#define WEAPON_DILDO                    (10)#define WEAPON_DILDO2                    (11)#define WEAPON_VIBRATOR                    (12)#define WEAPON_VIBRATOR2                (13)#define WEAPON_FLOWER                    (14)#define WEAPON_CANE                        (15)#define WEAPON_GRENADE                    (16)#define WEAPON_TEARGAS                    (17)#define WEAPON_MOLTOV                    (18)#define WEAPON_COLT45                    (22)#define WEAPON_SILENCED                    (23)#define WEAPON_DEAGLE                    (24)#define WEAPON_SHOTGUN                    (25)#define WEAPON_SAWEDOFF                    (26)#define WEAPON_SHOTGSPA                    (27)#define WEAPON_UZI                        (28)#define WEAPON_MP5                        (29)#define WEAPON_AK47                        (30)#define WEAPON_M4                        (31)#define WEAPON_TEC9                        (32)#define WEAPON_RIFLE                    (33)#define WEAPON_SNIPER                    (34)#define WEAPON_ROCKETLAUNCHER            (35)#define WEAPON_HEATSEEKER                (36)#define WEAPON_FLAMETHROWER                (37)#define WEAPON_MINIGUN                    (38)#define WEAPON_SATCHEL                    (39)#define WEAPON_BOMB                        (40)#define WEAPON_SPRAYCAN                    (41)#define WEAPON_FIREEXTINGUISHER            (42)#define WEAPON_CAMERA                    (43)#define WEAPON_PARACHUTE                (46)#define WEAPON_VEHICLE                    (49)#define WEAPON_DROWN                    (53)#define WEAPON_COLLISION                (54

seems it would be possible to define something

Share this post


Link to post
Share on other sites
Silent

u sure? cuz I sent Silent this (cant remember where I found it in the GTA SA files....)

Yeah, it would NOT be possible via SCM.

Share this post


Link to post
Share on other sites
DeLuca™

After doing some testing, it would appear that REAR_LIGHT_LEFT controls both rear lights, while REAR_LIGHT_RIGHT does nothing. So, if you set LEFT to damaged or default, it affects both lights. While RIGHT will do nothing at all.

Share this post


Link to post
Share on other sites
Silent

After doing some testing, it would appear that REAR_LIGHT_LEFT controls both rear lights, while REAR_LIGHT_RIGHT does nothing. So, if you set LEFT to damaged or default, it affects both lights. While RIGHT will do nothing at all.

It's a SA bug fixed in MTA. I bet DK22 fixed it in ImVehFt.

Share this post


Link to post
Share on other sites
Danikov

Well,I think this would be an appropriate place to post what I am having trouble with.

 

I am trying to achieve what _DK had done in his first posts,apply the brick texture on the player's vehicle.

I altered the code a bit by using an other .bmp texture,removing some un-needed opcodes and adding a condition and a result.

When I am in game,I can see the .bmp I'm using on my hud in a square and round shape.

When any car is destroyed,the opcode that paints the car white worked,but the texture apply didn't work,I also have tried removing the car recoloring opcode,but the car didn't have any change.

Here's the code:

{$CLEO}{$I stdc}0D61: t = load_texture_from "test.bmp" with_mask NULL // IF and SET{$I CLEO\inloop}   0AB1: call_scm_function @drawTexturedCircle params 13 pos_x 250.0 pos_y 250.0 radius 150.0 step 6.0 texture t priority PRIORITY_OVER_HUD color_RGBA 255 255 255 255 angle -45.0 invert_x false invert_y false   0AB1: call_scm_function @drawTexturedQuad params 11 pos_x 450.0 pos_y 100.0 size 300.0 texture t priority PRIORITY_OVER_HUD color_RGBA 255 255 255 255 invert_x false invert_y false   {$I CLEO\forallcars}    if    0119: is_car_dead veh     then    0D62: set_car veh remap_texture t    0D63: set_car veh color ALL_COLORS RGB 255 255 255    end   {$I CLEO\for_end}{$I CLEO\end}{$I CLEO\drawtexturedcircle.scmf}{$I CLEO\drawtexturedquad.scmf}

help?

Edited by Danikov

Share this post


Link to post
Share on other sites
aStiffSausage

I think the problem is not the script or texture itself, but the mapping of vehicle. From my understanding, opcode 0D62 works kind of like paintjobs do, but with custom textures. If your vehicle isn't made to support paintjobs, the car will be just white. To be sure, try your script with a vehicle that supports paintjob. (Elegy, Sultan or similar)

Share this post


Link to post
Share on other sites
Danikov

I'll be damned,you are right,only vehicles that can have paintjobs applied to them can be affected of this script.

 

I saw somewhere that you can apply up to 3 paintjobs for each vehicle by adding more .txd s to the gta3.img,for example(flash1.txd , flash2.txd , flash3.txd),I think I'll actually test it and report the results if it changes anything.

 

EDIT : Well,I guess I was hoping for too much,it didn't work.

Edited by Danikov

Share this post


Link to post
Share on other sites
aStiffSausage

I don't remember the limit on how many paintjobs you can add to one vehicle, I think it was 9? (flash1.txd, flash2.txd and so on until flash9.txd) Tuning garages only allow you to buy four of those though.

If you want a car to be able to have paintjobs, you need to edit the model, bravura.dff for example. I don't know how to do so, but that would be one way of achieving what you're after. Though, most car mods do not have paintjobs, so you'd be screwed with those. :p

Share this post


Link to post
Share on other sites
Silent

It's four paintjobs per vehicle.

Edited by SilentPL

Share this post


Link to post
Share on other sites
aStiffSausage

It's four paintjobs per vehicle.

What about this plane with more than four paintjobs working? :p

 

The game itself supports more than four paintjobs per vehicle, but tuning garages don't allow you to buy more than that.

Edited by aStiffSausage

Share this post


Link to post
Share on other sites
Danikov

So if the model is modified to get paintjobed,the script would work on that specific vehicle?

Share this post


Link to post
Share on other sites
fastman92

 

It's four paintjobs per vehicle.

What about this plane with more than four paintjobs working? :p

 

The game itself supports more than four paintjobs per vehicle, but tuning garages don't allow you to buy more than that.

 

I don't know but there's a function

 

void __thiscall asignTXDofPaintjobToVehicle(CVehicleModelInfo *this, __int16 TXD_index){  signed int i; // [email protected]  WORD *v3; // [email protected]  v3 = (WORD *)((char *)this + 762);  i = 0;  if ( *((_WORD *)this + 381) != -1 )  {    do    {      if ( i >= 4 )        break;      ++v3;      ++i;    }    while ( *v3 != -1 );  }  *((_WORD *)this + i + 381) = TXD_index;}
      if ( i >= 4 )        break;
From code i understand that a limit is five paintjobs, when there are more paintjobs, always the last one (fifth) will be overwritten. Edited by fastman92

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.