Quantcast

Jump to content

» «
Photo

[CLEO4]NewOpcodes by DK22Pac

109 replies to this topic
_DK
  • _DK

    Call me 'The Bald Guy"

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#1

Posted 29 July 2012 - 05:34 PM Edited by _DK, 30 January 2014 - 02:23 PM.

lvjq.png


Finally released as test version smile.gif

If you downloaded the archive, all you wanted to see (documentation/examples) is already there.

Download 04.08.12
Download 23.01.13
Download 29.01.14

I'll update this post later.
Thx to all who will help me to test it. smile.gif
  • Manfred Von Karma, fastman92, Vinnex89 and 4 others like this

HeresOtis
  • HeresOtis

    The SCM Undergrad

  • Members
  • Joined: 29 Apr 2011
  • United-States

#2

Posted 29 July 2012 - 05:37 PM

Great. Been waiting for this. cookie.gif cookie.gif

_DK
  • _DK

    Call me 'The Bald Guy"

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#3

Posted 04 August 2012 - 04:01 PM Edited by DK22Pac, 04 August 2012 - 05:48 PM.

Updated, fixed some opcodes.
CODE
{$CLEO}
{$I stdc}
0D61: t = load_texture_from "textures\brick.bmp" with_mask NULL // IF and SET
{$I 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 forplayercar}
       0D62: set_car veh remap_texture t
       0D63: set_car veh color ALL_COLORS RGB 255 255 255
   {$I for_end}
{$I end}
{$I drawtexturedcircle.scmf}
{$I drawtexturedquad.scmf}

user posted image
CODE
{$CLEO}
{$I stdc}
0D61: t = load_texture_from "textures\brick.bmp" with_mask NULL // IF and SET
{$I 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 forplayercar}
       0D62: set_car veh remap_texture t
       0D63: set_car veh color 1 RGB 255 255 255
       0407: store_coords_to a b c from_car veh with_offset -2.0 0.0 0.0
       0174: d = car veh z_angle
       0D50: draw_shadow_type TYPE_LIGHT position a b c width 2.5 height 2.5 rotation d distance 2.0 texture t intensity 1 RGB 150 150 150 shadow_data NULL
       0A97: s = car veh struct
       0D53: draw_corona_with_texture t color 255 255 255 150 on_entity s at 0.0 -3.0 1.0 size 1.0
   {$I for_end}
{$I end}
{$I drawtexturedcircle.scmf}
{$I drawtexturedquad.scmf}

user posted image

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci Racing
  • Joined: 01 Feb 2010
  • Poland

#4

Posted 04 August 2012 - 04:22 PM

Holy sh*t. Awesome.

HeresOtis
  • HeresOtis

    The SCM Undergrad

  • Members
  • Joined: 29 Apr 2011
  • United-States

#5

Posted 04 August 2012 - 05:08 PM

Is there any recommended photo extension (png, bmp, tga, jpg) and any photo resolution?

_DK
  • _DK

    Call me 'The Bald Guy"

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#6

Posted 04 August 2012 - 05:15 PM

It must work with any resolution. And only with .bmp format.
QUOTE (SilentPL)
Holy sh*t. Awesome.

Tnx tounge.gif

Recevr999
  • Recevr999

    Mark Chump

  • Members
  • Joined: 07 Jun 2012

#7

Posted 05 August 2012 - 07:45 AM

You man, need a cookie cookie.gif inlove.gif

Michael-Knight1
  • Michael-Knight1

    Never Give UP

  • Members
  • Joined: 08 Jul 2012

#8

Posted 05 August 2012 - 03:48 PM

Finally Finished biggrin.gif , it Awesome

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci Racing
  • Joined: 30 Jan 2011
  • Brazil

#9

Posted 05 August 2012 - 04:24 PM Edited by Link2012, 05 August 2012 - 10:41 PM.

Really cool opcodes.
Any planning to release the source code?

EDIT:
Maybe you can add opcodes to add a stack to SCM? push, pop, set, get...

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#10

Posted 06 August 2012 - 07:03 AM

Awesome job, especially 0D3A. I can make a descent cover system now.

Wesser
  • Wesser

    The complexity simplifier, the efficiency optimizer.

  • Feroci Racing
  • Joined: 19 Aug 2006
  • Unknown

#11

Posted 06 August 2012 - 09:40 AM

Personally, I'd like to code one of these opcodes by myself in my own scripts. Great work, though. tounge.gif

QUOTE (Bad.boy! @ Monday, Aug 6 2012, 08:03)
Awesome job, especially 0D3A. I can make a descent cover system now.

You could already make it. Look here.

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#12

Posted 06 August 2012 - 11:29 AM

I still don't get how {$I forplayercar}[...]{$I forend} is better than a simple loop calling a SCM Function tounge2.gif Doesn't your way require leaving variables 30@+ untouched?

Michael-Knight1
  • Michael-Knight1

    Never Give UP

  • Members
  • Joined: 08 Jul 2012

#13

Posted 07 August 2012 - 03:35 AM

@DK22Pac , You Can Make Opcode To Load Video ??

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#14

Posted 07 August 2012 - 11:41 AM

QUOTE (Michael-Knight1 @ Tuesday, Aug 7 2012, 03:35)
@DK22Pac , You Can Make Opcode To Load Video ??

I explained a method here: http://gtag.gtagamin...24&st=0&start=0

It seems to only work on one game version, however.

Michael-Knight1
  • Michael-Knight1

    Never Give UP

  • Members
  • Joined: 08 Jul 2012

#15

Posted 07 August 2012 - 04:54 PM Edited by Michael-Knight1, 07 August 2012 - 05:07 PM.

QUOTE (Deji @ Tuesday, Aug 7 2012, 11:41)
QUOTE (Michael-Knight1 @ Tuesday, Aug 7 2012, 03:35)
@DK22Pac , You Can Make Opcode To Load Video ??

I explained a method here: http://gtag.gtagamin...24&st=0&start=0

It seems to only work on one game version, however.

He Doesn't Work ! Why ?
Just in 1 Sec Then The Game Crashed

CODE

:START_130
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @START_130
wait 1000
0A8C: write_memory 0xB5F852 size 1 value 1 virtual_protect 0
0A8C: write_memory 0x748BC5 size 2 value 0x13C virtual_protect 1
0AA5: call 0x747660 num_params 2 pop 2 "movies\\KRSTART.mpg" 0
0A8C: write_memory 0xC8D4C0 size 1 value 4 virtual_protect 0
0AA5: call 0x746740 num_params 0 pop 0
0A8C: write_memory 0xBA677B size 1 value 0 virtual_protect 0
0A8C: write_memory 0xB5F852 size 1 value 0 virtual_protect 0

:START_155
wait 0
if
0205:   actor $PLAYER_ACTOR near_car $KITT radius 15.0 15.0 15.0 flag 0
else_jump @START_155
00BB: show_text_lowpriority GXT 'HLOS_1' time 2000 flag 1
wait 2000
00BB: show_text_lowpriority GXT 'HLOS_2' time 2000 flag 1
wait 2000
00BB: show_text_lowpriority GXT 'HLOS_3' time 3000 flag 1
08A6: set_car $KITT componentA 2 rotation_to 0.0
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.05
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.1
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.15
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.2
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.25
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.3
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.35
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.4
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.45
wait 10
08A6: set_car $KITT componentA 2 rotation_to 0.5
end_thread

Wesser
  • Wesser

    The complexity simplifier, the efficiency optimizer.

  • Feroci Racing
  • Joined: 19 Aug 2006
  • Unknown

#16

Posted 07 August 2012 - 06:16 PM

You had to post there instead.

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#17

Posted 08 August 2012 - 08:34 PM

Or just refer to my original post, stating that it only seems to work on one game version (the version I created the code using).

Michael-Knight1
  • Michael-Knight1

    Never Give UP

  • Members
  • Joined: 08 Jul 2012

#18

Posted 08 August 2012 - 08:58 PM

QUOTE (Deji @ Wednesday, Aug 8 2012, 20:34)
Or just refer to my original post, stating that it only seems to work on one game version (the version I created the code using).

Yeah I Just Use The Original Version I .
Ok Can You Write Simple Script With This Code When I Press A Key Load GTA titles video .
i don't thinks my codes was wrong

_DK
  • _DK

    Call me 'The Bald Guy"

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#19

Posted 17 August 2012 - 12:15 PM

Tnx for comments tounge.gif
QUOTE (Deji)
Doesn't your way require leaving variables 30@+ untouched?

Yes. But only inside "{$I } construction".

Grove Street Boy
  • Grove Street Boy

    Maggot for life!

  • Members
  • Joined: 06 Aug 2005

#20

Posted 17 August 2012 - 05:21 PM

OMG man! Dude, are you a genius or what? Einstein just got resur-mother-f*kin-rected man! This sh*ts awesome dawg! biggrin.gif Now I can do so much sh*t I never imagined I could do in CLEO4!

By the way, I noticed you are using those "t" or "s" variables rather than the native 0@ to 33@ ones, does this mean there is no limit to variables now?

Also, could you possibly make try{}catch{} exception handling opcodes?

_DK
  • _DK

    Call me 'The Bald Guy"

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#21

Posted 17 August 2012 - 08:16 PM

They're just constants defined in stdc. Like
CODE

const
   a = 0@
end

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#22

Posted 18 August 2012 - 02:51 AM Edited by Deji, 18 August 2012 - 02:52 AM.

[Ignore this post... if it's past 2AM, just go to sleep tounge2.gif ]

_DK
  • _DK

    Call me 'The Bald Guy"

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#23

Posted 21 August 2012 - 11:54 PM Edited by DK22Pac, 22 August 2012 - 12:00 AM.

Hey guys, I have good news!
Some guy working on new GUI system for SA, and we decided to include his work into newOpcodes.
So you could create beautiful interface (like in SAMP or MTA) for your mods. Forget about default panels and texboxes! colgate.gif
  • MasterHK and Concavax like this

Albreht
  • Albreht

    Player Hater

  • Members
  • Joined: 09 Oct 2011

#24

Posted 29 August 2012 - 11:00 AM

let me caps
GREAT JOB biggrin.gif
I've been waiting for this!

I have an idea,
how about making Live TV Screens code?
it may useful for car back-mirro, TV screen and so on.

and last, thank you and keep it up!

Grove Street Boy
  • Grove Street Boy

    Maggot for life!

  • Members
  • Joined: 06 Aug 2005

#25

Posted 29 August 2012 - 04:02 PM

Hi DK22Pac, I see that you have "draw corona over entity" opcodes, is it possible to use this opcode to increase the number of stars in the sky? maybe add nebulae and galaxies as well since you can load a texture and use is as a corona?

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci Racing
  • Joined: 30 Jan 2011
  • Brazil

#26

Posted 03 November 2012 - 04:44 PM

A opcode to create object without adding it to the save game will be very useful

Tanvir_Rafi
  • Tanvir_Rafi

    Player Hater

  • Members
  • Joined: 04 May 2012

#27

Posted 04 November 2012 - 03:21 PM

i am using CLEO4 but where do i find SBsa Folder?

Midnightz
  • Midnightz

    Populus vult decipi.

  • Members
  • Joined: 05 Feb 2007
  • United-States

#28

Posted 13 November 2012 - 02:01 AM

Cool. icon14.gif Sounds funny but I wish there was a way to view a PDF file from within SA's main menu. It would be useful for modders who want to provide a complete graphical guide for their TC or heavily modded game. The user would then be able to look up key info to complete tasks etc without having to exit or minimize the game. It would also provide a quick and dirty way to include more content in SA without requiring tons of code or files. The list of possible mods with a PDF feature is endless.

irganc
  • irganc

    Player Hater

  • Members
  • Joined: 20 Dec 2011

#29

Posted 01 December 2012 - 11:48 AM

What about III and VC?

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#30

Posted 17 December 2012 - 05:53 PM

I'm having trouble with this mod. It always says that "msvcr100d.dll" is missing. Since I have Visual Studio installed and everything that comes with it I think this is very strange. I don't feel like downloading the missing dll from a dodgy site. So is there anyway you could use "msvcr100.dll" instead?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users