Jump to content

[CLEO4]NewOpcodes by DK22Pac


Recommended Posts

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

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?

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

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

Update: 0D30 now works with string parameters!

aq2e.th.png

 

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

lal.

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

But using it in such way

 

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

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! : )

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 0@ 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 0@ 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: 0@ = load_texture_dds_from "image.dds" // IF and SETSCR: LOAD_TEXTURE_FROM_DDS_FILE0D7D=1, clean_loaded_texture %1d%0D7D: clean_loaded_texture 0@SCR: CLEAN_LOADED_TEXTURE
noComponent0D74=2,%2d% = component %1d% parent_component0D74: 1@ = component 0@ parent_componentSCR: GET_COMPONENT_PARENT_COMPONENT0D75=2,%2d% = component %1d% num_objects0D75: 1@ = component 0@ num_objectsSCR: GET_COMPONENT_NUM_OBJECTS0D76=3,%2d% = component %1d% object 00D76: 1@ = component 0@ object 0SCR: GET_COMPONENT_OBJECT0D77=2, object_atomic %1d% hide 10D77: object_atomic 0@ hide 1SCR: HIDE_OBJECT_ATOMIC0D78=3,%3d% = get_object %1d% atomic_flag %2d%0D78: 2@ = get_object 0@ atomic_flag 1@SCR: GET_OBJECT_ATOMIC_FLAG0D79=3, set_object 0@ atomic_flag 1@ state ENABLE0D79: set_object %1d% atomic_flag %2d% state %3d%SCR: SET_OBJECT_ATOMIC_FLAG0D7A=2,%2d% = get_object %1d% num_materials0D7A: 1@ = get_object 0@ num_materialsSCR: GET_OBJECT_ATOMIC_NUM_MATERIALS0D7B=3,%3d% = get_object %1d% material %2d% texture0D7B: 1@ = get_object 0@ material 0 textureSCR: GET_OBJECT_ATOMIC_MATERIAL_TEXTURE

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 0@ store to 1@
Edited by Danikov

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
  • Like 2

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

an great Idea:

some opcodes for your GREAT pathFinderSytem

0000: 0@ = 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 0@ :p

0000: path_defined 0@

Edit:

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

0@v = "R Hand"0AC7: 4@ = var 0@ offset0D30: 0@ = actor $PLAYER_ACTOR bone 4@
is impossible. It will detect 4@ as integer (bone index) parameter.

 

 

can i use these cases instead of yours?

4@ = Memory.Alloc(8)0AD3: 4@ "R Hand"

or

4@ = label @RHNAME offset...:RHNAMEhex"R" 20 "Hand" 00
Edited by MasterHK

an great Idea:

some opcodes for your GREAT pathFinderSytem

0000: 0@ = 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 0@ :p

0000: path_defined 0@

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

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

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

 

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;

0000: 0@v = current_cleo_file_name

(ThreadPointer + 8)

No....

It's script name. Property of a script.

Written either by a CLEO or 03A4 opcode.

Who asked me for 05FD opcode?

n583.th.png

Edited by _DK
  • Like 3

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)

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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