Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (93,073 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. 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

    2. Red Dead Redemption

    3. 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

Silent

Indeed, there seems to be enough space for the fifth paintjob too. No more though.

 

And yes, was about to post this function too :p

Share this post


Link to post
Share on other sites
Danikov

Just tried a modification which adds paintjobs to SA's default cars(Modifies both .dffs and .txds) and that unfortunately didn't work.

 

Isn't there a way to make it apply on all cars? just like it happens with destroyed cars,they have a darker texture on them somehow...can't that method be copied?

Share this post


Link to post
Share on other sites
JBriones2016

as an addition to danikov, how to load "0D61: t = load_texture_from "test.bmp" with_mask NULL // IF and SET" in different cars?..... and @dk can you add for random car in newopcodes? and support 0D61 in all models?

Edited by ByteCode2014

Share this post


Link to post
Share on other sites
DK22Pac

You can use this only for cars with paintjobs.

 

Isn't there a way to make it apply on all cars?

Yes, and this way is called

shaders

 

 

I've reached 0D0E, 16 opcodes are remade! So slow...

8o81.th.png

Share this post


Link to post
Share on other sites
DK22Pac

Update: 0D30 now works with string parameters!

aq2e.th.png

 

{$CLEO .cs}0000:while true    wait 0    if        player.Defined(0)    then        if            0D30: [email protected] = actor $PLAYER_ACTOR bone "R UpperArm"        then            0D32: [email protected] = bone [email protected] quat            0D18: rotate_quat [email protected] axis_vector 1.0 0.0 0.0 angle 45.0 combine_op 2        end        if            0D30: [email protected] = actor $PLAYER_ACTOR bone "L UpperArm"        then            0D32: [email protected] = bone [email protected] quat            0D18: rotate_quat [email protected] axis_vector 1.0 0.0 0.0 angle 45.0 combine_op 2        end    endend
z7y2.png

lal.

Share this post


Link to post
Share on other sites
MasterHK

Just string? :(

that makes opcode useful specially when using scmFuncs...

Share this post


Link to post
Share on other sites
DK22Pac

No, it works with both string (bone name) and integer (bone index) types.

But using it in such way

 

[email protected] = "R Hand"0AC7: [email protected] = var [email protected] offset0D30: [email protected] = actor $PLAYER_ACTOR bone [email protected]
is impossible. It will detect [email protected] as integer (bone index) parameter. Edited by _DK

Share this post


Link to post
Share on other sites
Danikov

Haha,lol,Rotate all bones by 180 degrees and you'll get a moonwalking CJ.

 

Also,could you please rewrite opcode 0D5F,it appears to be crashing when its present in a script.

Share this post


Link to post
Share on other sites
DK22Pac

I'm rewriting all opcodes. Can't test them all, but testing some of them.

Share this post


Link to post
Share on other sites
MasterHK

OK. : |

thank you for answer.

now some Ideas for newOpcodes:

isMenuActivated (checks is current menu equal to this variable?)

getSelectedSlot (for get selectedSave/LoadSlot; as in Deji's example in his SuperVars)

saveOnSlot (not needs description for a coder like you : ) )

changeGxtContent (remember your IV radio hud)

exitImmediately (shutdownGame function used in fastman92's TimeCyCeDitor)

getIgnoreState (the result will be 2 boolean nums. one for byCops ignoring stat and one for byAll ignoring stat)

isCarHaveRadio (... : |)

addNewLineInFile (write specified 0x0A chars in a file)

and wesser's useful texture checking funcs.

 

However, goodLuck! : )

Share this post


Link to post
Share on other sites
Urkman1

Whenever I try this, I follow the instructions and it says "error loading plugin newOpcodes.cleo", and SA says it can't find my Audio Card :panic:

Share this post


Link to post
Share on other sites
MasterHK

have you cleo 4.2?

or better to say anti-every mod! :catspider:

Share this post


Link to post
Share on other sites
MasterHK

for me, using 0D39 make my game _!_!_ ... : (

check it out, please...

Share this post


Link to post
Share on other sites
DK22Pac

I've decided to split newOpcodes.cleo into few independent .cleo plugins. They will be:

 

noMatrix.cleo - matrices stuffnoVector.cleo - vectorsnoQuat.cleo - quatsnoTexture.cleo - textures loadernoTxd.cleo - stuff related to txd, like loading/unloading, searching for texture in txdnoBone.cleo - stuff with ped bonesnoComponent.cleo - vehicle components with ~20 new opcodes... and maybe some others
Currently added opcodes:

 

noSprite0D7E=10, draw_sprite_with_texture %1d% at_cornerA %2d% %3d% cornerB %4d% %5d% color %6d% %7d% %8d% %9d% angle %10d%0D7E: draw_sprite_with_texture [email protected] at_cornerA 100.0 100.0 cornerB 300.0 300.0 color 255 255 255 255 angle 0.0SCR: DRAW_2D_SPRITE0D7F=22, draw_sprite_with_texture %1d% at_cornerA %2d% %3d% cornerB %4d% %5d% colors %6d% %7d% %8d% %9d%  %10d% %11d% %12d% %13d%  %14d% %15d% %16d% %17d%  %18d% %19d% %20d% %21d% angle %22d%0D7F: draw_gradient_sprite_with_texture [email protected] at_cornerA 100.0 100.0 cornerB 300.0 300.0 color 255 255 255 255 angle 0.0SCR: DRAW_2D_SPRITE_WITH_GRADIENT
noTexture0D7C=2, %2d% = load_texture_dds_from %1s% // IF and SET0D7C: [email protected] = load_texture_dds_from "image.dds" // IF and SETSCR: LOAD_TEXTURE_FROM_DDS_FILE0D7D=1, clean_loaded_texture %1d%0D7D: clean_loaded_texture [email protected]: CLEAN_LOADED_TEXTURE
noComponent0D74=2,%2d% = component %1d% parent_component0D74: [email protected] = component [email protected] parent_componentSCR: GET_COMPONENT_PARENT_COMPONENT0D75=2,%2d% = component %1d% num_objects0D75: [email protected] = component [email protected] num_objectsSCR: GET_COMPONENT_NUM_OBJECTS0D76=3,%2d% = component %1d% object 00D76: [email protected] = component [email protected] object 0SCR: GET_COMPONENT_OBJECT0D77=2, object_atomic %1d% hide 10D77: object_atomic [email protected] hide 1SCR: HIDE_OBJECT_ATOMIC0D78=3,%3d% = get_object %1d% atomic_flag %2d%0D78: [email protected] = get_object [email protected] atomic_flag [email protected]: GET_OBJECT_ATOMIC_FLAG0D79=3, set_object [email protected] atomic_flag [email protected] state ENABLE0D79: set_object %1d% atomic_flag %2d% state %3d%SCR: SET_OBJECT_ATOMIC_FLAG0D7A=2,%2d% = get_object %1d% num_materials0D7A: [email protected] = get_object [email protected] num_materialsSCR: GET_OBJECT_ATOMIC_NUM_MATERIALS0D7B=3,%3d% = get_object %1d% material %2d% texture0D7B: [email protected] = get_object [email protected] material 0 textureSCR: GET_OBJECT_ATOMIC_MATERIAL_TEXTURE

Share this post


Link to post
Share on other sites
MasterHK

Great specially Sprite and Texture.

just please try to make it compatible with MogAika's one. : )

Edited by MasterHK

Share this post


Link to post
Share on other sites
Danikov

Can you add opcodes that check whether the vehicle is:

-A Boat

-A Helicopter

-A Plane

-A Bike

-A RC Vehicle

-A Train

 

I really hate how there are only opcodes that check if any actor is driving these,It would be really nice to have opcodes that check if the vehicle is an Aircraft for example,without depending on the fact if it has an actor or not inside it.

 

EDIT : I also forgot to mention another thing,can you add an opcode that stores a vehicle from a vehicle generator into a variable?

Example :

6789: get veh_from_generator [email protected] store to [email protected]
Edited by Danikov

Share this post


Link to post
Share on other sites
DK22Pac

Can you add opcodes that check whether the vehicle is:

Did you miss this?

 

0D5E=3,get_vehicle %1d% class_to %2d% subclass_to %3d% 
VEHICLE_CLASS_AUTOMOBILE VEHICLE_CLASS_MTRUCK VEHICLE_CLASS_QUAD VEHICLE_CLASS_HELI VEHICLE_CLASS_PLANE VEHICLE_CLASS_BOAT VEHICLE_CLASS_TRAIN VEHICLE_CLASS_FHELI VEHICLE_CLASS_FPLANE VEHICLE_CLASS_BIKE VEHICLE_CLASS_BMX VEHICLE_CLASS_TRAILER
Edited by _DK

Share this post


Link to post
Share on other sites
Danikov

yes,I have missed this,damnit,thank you!!!

 

And what about the vehicle generator suggestion?

Share this post


Link to post
Share on other sites
Silent

What's with you guys naming script stuff as CScriptThread? It's CRunningScript :p

Share this post


Link to post
Share on other sites
MasterHK

an great Idea:

some opcodes for your GREAT pathFinderSytem

0000: [email protected] = appear_path_from 2488.562 -1666.865 12.8757 to 1833.36 -1995.45 12.5 color 0xFF8800FF type 0 // 0 = vehicle / 1 = pedestrian

0000: clear_DK_path [email protected] :p

0000: path_defined [email protected]

Edit:

No, it works with both string (bone name) and integer (bone index) types.
But using it in such way

[email protected] = "R Hand"0AC7: [email protected] = var [email protected] offset0D30: [email protected] = actor $PLAYER_ACTOR bone [email protected]
is impossible. It will detect [email protected] as integer (bone index) parameter.

 

 

can i use these cases instead of yours?

[email protected] = Memory.Alloc(8)0AD3: [email protected] "R Hand"

or

[email protected] = label @RHNAME offset...:RHNAMEhex"R" 20 "Hand" 00
Edited by MasterHK

Share this post


Link to post
Share on other sites
Wesser

an great Idea:

some opcodes for your GREAT pathFinderSytem

0000: [email protected] = appear_path_from 2488.562 -1666.865 12.8757 to 1833.36 -1995.45 12.5 color 0xFF8800FF type 0 // 0 = vehicle / 1 = pedestrian

0000: clear_DK_path [email protected] :p

0000: path_defined [email protected]

You can follow some of these information for the path-find system.

Share this post


Link to post
Share on other sites
MasterHK

[offtopic]

Yes but apper an line on the map!

i think not it's possible in Cleo...

Share this post


Link to post
Share on other sites
DK22Pac

What's with you guys naming script stuff as CScriptThread? It's CRunningScript :p

That's how it's called in CLEO SDK.

Share this post


Link to post
Share on other sites
fastman92

 

What's with you guys naming script stuff as CScriptThread? It's CRunningScript :p

That's how it's called in CLEO SDK.

 

Make an alias.

 

typedef CScriptThread CRunningScript;

Share this post


Link to post
Share on other sites
MasterHK

0000: [email protected] = current_cleo_file_name

(ThreadPointer + 8)

Edited by MasterHK

Share this post


Link to post
Share on other sites
fastman92

0000: [email protected] = current_cleo_file_name

(ThreadPointer + 8)

No....

It's script name. Property of a script.

Written either by a CLEO or 03A4 opcode.

Share this post


Link to post
Share on other sites
MasterHK

yes, i know max length is 7 because +16 is base ip.

Share this post


Link to post
Share on other sites
Shmoopy

Is it ok if i release a mod that uses your New Opcodes ? What you managed to include to gta sa is beyond imagination ( vertices , png and bmp ... )

Share this post


Link to post
Share on other sites
DK22Pac

Who asked me for 05FD opcode?

n583.th.png

Edited by _DK

Share this post


Link to post
Share on other sites
MasterHK

some new ideas:

loadExternalIFP(as in deji's black market mod, it can be really useful when number of .ifp files inside img is very much and limit of ifps don't allow us to add more ifps)

 

findObjectByNodeName(as in your sawn-off mod)

 

getWeaponRwFrameByActor(as in your sawn-off mod)

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.