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

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Danikov

_DK's newOpcodes issue

Recommended Posts

Danikov

As the title reads,I have an issue with _DK's newOpcodes,the thing is when I am trying to compile a script that uses one of the new opcodes,Sanny Builder displays an error window reading that the Opcode is unknown.

 

The NEW_SASCM.ini and SASCM.ini along with the New Opcodes and stdc file are placed in my game's directory.

 

Maybe I have placed the newOpcodes' files in the wrong places or I am just doing it wrong?

Edited by Danikov

Share this post


Link to post
Share on other sites
fastman92

In order to make Sanny Builder aware of new opcodes, you need to put new SASCM.ini in "Sanny Builder\data\SA" directory.

Share this post


Link to post
Share on other sites
Danikov

In order to make Sanny Builder aware of new opcodes, you need to put new SASCM.ini in "Sanny Builder\data\SA" directory.

 

Thank you very much,it now compiles.

 

But I am having an other issue with my script,it appears to be that my script is done incorrectly.

 

I don't know how to work with the new directives,I copied what _DK had posted in the newopcodes topic and altered it by adding a condition which would trigger the texture on the vehicle,the condition is:

0119: is_car_dead veh 

The part of the script is from _DK's topic:

{$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}

Where do I need to put the if and the then directives along with the other directives in the script?

Edited by Danikov

Share this post


Link to post
Share on other sites
fastman92

Where you need it

if .. then .. end construct executes a code only if condition is true.

 

Probably you should put it within{$I forplayercar} block.

There's where you have a vehicle loop.

Edited by fastman92

Share this post


Link to post
Share on other sites
Danikov

Thank you very much,the game is running with the script.

 

It appears to be that I am still doing something wrong,the texture I want to use isn't working,instead,I have a white circle and suqare on the screen which could mean I am doing something wrong with the textures?,the texture is in .bmp format.

And exploded cars only turn white because of opcode 0D63.

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 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       end   {$I CLEO\for_end}{$I CLEO\end}{$I CLEO\drawtexturedcircle.scmf}{$I CLEO\drawtexturedquad.scmf}
Edited by Danikov

Share this post


Link to post
Share on other sites
fastman92

I won't be able to help with new opcodes, i never used it.

If you don't figure it out yourself, then wait for DK22, an author of new opcodes plugin.

Share this post


Link to post
Share on other sites
Danikov

I am now having problems with the opcode(Example taken from the New Opcodes.txt file):

0D0E: set_car [email protected] component "bump_front_dummy" state STATE_DAM // IF and SET

When trying to compile,I get an error message reading : " Not enough actual parameters. Expected 3 params. "

It has car handle,component name and the state of that component,here's the list of the new opcodes explained in his blog post:

0D0E=3,set_car %1d% component %2s% state %3d% // IF and SET Sets component state. Param 1: car handle Param 2: component name Param 3: state, see Component states in stdc 

Share this post


Link to post
Share on other sites
DK22Pac

You didn't include constants file, don't you see STATE_DAM is a constant?

 

{$I stdc}

Share this post


Link to post
Share on other sites
Danikov

You didn't include constants file, don't you see STATE_DAM is a constant?

{$I stdc}

 

Oh,crap,how did I miss that,thanks!

 

also,I am having a problem with another opcode of yours,I am sort of trying to subtract floats stored from opcode 0D5F and floats stored from opcode 00AA in order to achieve offset values.

 

Here's the code :

    {$I CLEO\forallcars}    {$I stdc}    00AA: store_car veh position_to [email protected] [email protected] [email protected]    0D5F: get_vehicle veh dummy_element DUMMY_EXHAUST position WORLD to [email protected] [email protected] [email protected] invert_x false     0063: [email protected] -= [email protected]    0063: [email protected] -= [email protected]    0063: [email protected] -= [email protected]

Whenever Opcode 0D5F is present in the script,the game crashes,what am I doing wrong this time?

Edited by Danikov

Share this post


Link to post
Share on other sites
DK22Pac

Try do delete SCMlog if it is installed. Plugins made with CLEO SDK have some problems with it...

Share this post


Link to post
Share on other sites
Danikov

Try do delete SCMlog if it is installed. Plugins made with CLEO SDK have some problems with it...

 

 

Removed SCMLog folder which was in this path : Sanny Builder 3\Tools\CLEO 3\

 

Unfortunately,Game still crashing.

Share this post


Link to post
Share on other sites
MasterHK

Remove SCMLog from game\cleo. : |

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

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