Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,694 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

op9080

SCM Hook for San Andreas

Recommended Posts

Djorn

Hi!

 

Can someone please explain how to convert/rewrite the scm script to work this SCM Hook??

And where/which file so edit/save it too.

 

If anyone can help it would be greatly appreaciated

 

Thanks Djorn

Share this post


Link to post
Share on other sites
Suction Testicle Man

Download mirror added to first post, due to problems with RapidShare.

 

 

Share this post


Link to post
Share on other sites
Hiddenshadow

Awsome mod,love it!

 

altough i do have 2 things:

 

like cerbera said,it would be nicer if you could choose the gta:SA dir.

 

also(just warning people), when you are falling from a height, and you activate the decreased gravity, *splat* your dead, just like you'd hit the ground.

Share this post


Link to post
Share on other sites
SilverGlow
ok maybe i'm just a noob and u guys already know it but when i went to the liberty city area there is a hidden interior at marco bistro's, it even has classical music playing in the background.. looks really cool smile.gif

Share this post


Link to post
Share on other sites

How do I use the GXT hook? I'd like to add some labels of my own, but how should I do that? Or is that impossible, is the only way to use the GXT hook to modify the original GXT labels? Or should I return the string and set *gxtLabel to the name of the label in customStrings?

 

Thank you in advance smile.gif

 

And, btw, the SCM part of the hook works great smile.gif

 

EDIT: Never mind, I think I know how it works now. The SCM (or the game) requests a GXT entry, which is passed through the hook. I thought it was preloaded at the start of the game blush.gif .

Edited by [email protected]

Share this post


Link to post
Share on other sites
teevee

This mod is pure genius.

Share this post


Link to post
Share on other sites
jarjar

Ah good, i have been looking for he download for this, i lost it when my computer crashed. Thank god i found it again. Thakns to STM for the new download mirror, i hate Rapidshare. smile.gif

Share this post


Link to post
Share on other sites
ceedj

Found a bug! But I fixed it. In Scripting.cpp, change:

 

 

void Or(Script& s){Block* b = s.peek(1);if (!b) { s.dwErrors |= ERROR_NESTING; return;}if (!b->addr) { s.dwErrors |= ERROR_CONDITIONAL; return;}BYTE& c = s.bScriptBuffer[b->addr];if (!c) { c = 20U; return;}if (c < 20U || c >= 28) { s.dwErrors |= ERROR_CONDITIONAL; return;}c++;}

 

 

to this

 

 

void Or(Script& s){Block* b = s.peek(1);if (!b) { s.dwErrors |= ERROR_NESTING; return;}if (!b->addr) { s.dwErrors |= ERROR_CONDITIONAL; return;}BYTE& c = s.bScriptBuffer[b->addr];if (!c) { c = 21U; return;}if (c < 21U || c >= 28) { s.dwErrors |= ERROR_CONDITIONAL; return;}c++;}

 

 

(you're changing the c = 20U; to c = 21U; and (c < 20U) to (c < 21U) .)

 

If you don't do this, your "Or" commands won't work. Frustrated me for about two hours. smile.gif

 

Hope this helps some peeps.

 

EDIT: According to the ReadMe, it says you can have up to nine conditionals, but according to this post, you can only have up to 8. Unless this changed for San Andreas. Can anyone confirm this (besides my own testing tounge.gif)?

Edited by ceedj

Share this post


Link to post
Share on other sites
oCain

 

# If you don't want to use the supplied classes, you can use your favorite script builder/compiler and stuff raw script bytes with Script::add().

Cool!

But...How?

I ain't find nothing. sad.gif

If someone knows anything about it...Please Post!

Thanx!

 

Oh...

@op9080: Great Stuff! biggrin.gif

Share this post


Link to post
Share on other sites

 

# If you don't want to use the supplied classes, you can use your favorite script builder/compiler and stuff raw script bytes with Script::add().

Cool!

But...How?

I ain't find nothing. sad.gif

If someone knows anything about it...Please Post!

Thanx!

 

Oh...

@op9080: Great Stuff! biggrin.gif

What do you want to do? Creating a script in another editor and putting it in the injector? If yes:

 

Make yourself a script in your favorite editor, and compile it. Use a hexeditor to get the raw script bytes. Be sure not to copy the headers and such! Then you'll need to add them using script::add(). You could either put add(byte1), add(byte2) and so on in buildScript(), but you could also make a little file-handling-thingey, which reads the bytes from a file and adds them.

Share this post


Link to post
Share on other sites
oCain

@[email protected]

Yes, exactly...

... however I thought it would be a simple way, to take over his old script's from the sa builder...

... then I do it how it was thought wink.gif

But, Thanx!

Share this post


Link to post
Share on other sites
oCain

Hello, again!

How can I define new objects?

Or can I use only those from the original / user 'main.scm'? dontgetit.gif

 

Thanx a lot!

 

Oh... Sorry for that double Post, but I thought in the case of a new question, it's Ok.

 

Share this post


Link to post
Share on other sites
BenMillard

There's about two weeks between the previous post and this new one. Since you are moving the discussion forward and not asking the same question again and again, I think what you've done is fine.

 

I had no idea this SCM hook had all these fancy capabilities. I just use it for turning off the aeroplane limits! tounge.gif

Share this post


Link to post
Share on other sites
Y_Less
Hello, again!

How can I define new objects?

Or can I use only those from the original / user 'main.scm'? dontgetit.gif

 

Thanx a lot!

 

Oh... Sorry for that double Post, but I thought in the case of a new question, it's Ok.

A little known fact about the objects used in the SCM is that those defined in it use negative numbers to reference them. If you use positive numbers in the model commands, those numbers are the IDE numbers, so you can use any model in the game without defining them within the SCM. Try doing it that way and see if it works.

 

Cerbera: as it is an engine hook in theory you can do whatever you like.

Share this post


Link to post
Share on other sites
ventolin

The acceleration and altitude stuffs for the hydra seem to not be working.

 

Everything else is top-notch, When I first turned the gravity off I laughed my ass off.

Share this post


Link to post
Share on other sites
ceedj

Been meaning to post this for some time now - some opcode definitions I've using in my mod. Put these in Opcode.h below Spookie's code. Rename them as you like. smile.gif

 

There are a few unkowns in here; I was testing.

 

AS = Action Sequence

AT = Actor Task

 

Everything else should be pretty easy to figure out...

 

 

DEFINE_OPCODE(create_coord, 0x04C4, "vfffvvv");	// PLAYER_ACTOR, x, y, z, var_x, var_y, var_zDEFINE_OPCODE(destroy_actor, 0x009B, "v");	// var_actorDEFINE_OPCODE(actor_look_at_player, 0x020F, "vv");	// var_actor, PLAYER_CHARDEFINE_OPCODE(AT_rotate_to_actor, 0x0639, "vv");	// var_actor, PLAYER_CHARDEFINE_OPCODE(unload_special_actor, 0x0296, "i");	// var_actor,DEFINE_OPCODE(get_car_color, 0x03F3, "vii");  	// var_car col1 col2DEFINE_OPCODE(create_panel, 0x08D4, "sfffiiiiv");	//Create Panel - Title, Left Pos x, Top Pos y, Width w, #of columns, interactive (1 yes, 0 no), background (1 yes 0 no), align (0 = center, 1 = left, 2 = right), var_panel (handle)DEFINE_OPCODE(delete_panel, 0x08DA, "v");  //Remove Panel (var_panel)DEFINE_OPCODE(set_panel_column_data, 0x08DB, "visssssssssssss"); // var_panel, #of column, text stringsDEFINE_OPCODE(set_panel_data_text1, 0x08EE, "viisi");DEFINE_OPCODE(set_panel_data_text2, 0x08EF, "viisii");DEFINE_OPCODE(set_panel_column_width, 0x09DB, "vii");DEFINE_OPCODE(set_panel_column_align, 0x08D6, "vii");DEFINE_OPCODE(set_panel_row_enable, 0x08D9, "vii"); //var_panel, #of row, enable 1, disable 0DEFINE_OPCODE(text_draw, 0x033E, "ffs");DEFINE_OPCODE(remove_text, 0x03D5, "s");DEFINE_OPCODE(clear_all_text, 0x00BE, "");DEFINE_OPCODE(text_draw_toggle, 0x03F0, "i");DEFINE_OPCODE(get_time, 0x00BF, "ii");DEFINE_OPCODE(set_time, 0x00C0, "ii");DEFINE_OPCODE(text_draw_1number, 0x045A, "ffsi");DEFINE_OPCODE(release_weather, 0x01B7, "");DEFINE_OPCODE(cleanup_actor, 0x01C2, "v");DEFINE_OPCODE(mission_cleanup, 0x00D8, "");DEFINE_OPCODE(change_stat_int, 0x0629, "ii");DEFINE_OPCODE(change_stat_float, 0x062A, "if");DEFINE_OPCODE(set_total_missions, 0x042C, "i");DEFINE_OPCODE(set_total_mission_points, 0x030D, "i");DEFINE_OPCODE(interior_access, 0x07FB, "si");DEFINE_OPCODE(activate_garage, 0x0299, "s");DEFINE_OPCODE(init_object_in_obgroup, 0x0776, "s");DEFINE_OPCODE(destroy_object_in_obgroup, 0x0777, "s");DEFINE_OPCODE(set_burglar_houses_open, 0x09E6, "i");DEFINE_OPCODE(reset_interior_colors, 0x04FA, "i");DEFINE_OPCODE(set_entrance_on, 0x08E7, "i");DEFINE_OPCODE(AT_jump, 0x05BC, "vi");DEFINE_OPCODE(AT_finger, 0x05C2, "v");DEFINE_OPCODE(AT_hands_cower, 0x05C3, "v");DEFINE_OPCODE(AT_hands_up, 0x05C4, "vi");DEFINE_OPCODE(request_animation, 0x04ED, "s");DEFINE_OPCODE(release_animation, 0x04EF, "s");DEFINE_OPCODE(AT_tired, 0x05BD, "vi");DEFINE_OPCODE(AT_move_mouth, 0x0967, "vi");DEFINE_OPCODE(AT_roll_sideways, 0x06E3, "vi");DEFINE_OPCODE(AT_stop_mouth, 0x0968, "vi");DEFINE_OPCODE(toggle_radar, 0x0581, "i");DEFINE_OPCODE(toggle_hud, 0x0826, "i");DEFINE_OPCODE(toggle_riot, 0x06C8, "i");DEFINE_OPCODE(display_zone_text, 0x0A19, "s");DEFINE_OPCODE(set_actor_health, 0x0223, "vi");DEFINE_OPCODE(cellphone, 0x0729, "vi");DEFINE_OPCODE(car_psycho, 0x00A8, "v");DEFINE_OPCODE(car_normal, 0x00A9, "v");DEFINE_OPCODE(car_immunities, 0x2AC, "viiiii");DEFINE_OPCODE(car_max_speed, 0x00AD, "vf");DEFINE_OPCODE(car_behav, 0x00AF, "vf");DEFINE_OPCODE(AT_car_driver, 0x05CB, "vvi");DEFINE_OPCODE(AT_car_pass, 0x05CA, "vvii");DEFINE_OPCODE(car_drive_to, 0x02C2, "vfff");DEFINE_OPCODE(AT_leave_car, 0x05CD, "vv");DEFINE_OPCODE(AT_drive_to, 0x05D1, "vvffffiii");DEFINE_OPCODE(AT_stay_put, 0x0638, "vi");DEFINE_OPCODE(car_follow_car, 0x07F8, "vvf");DEFINE_OPCODE(explode_car, 0x020B, "v");DEFINE_OPCODE(AT_clear_AT, 0x0687, "v");DEFINE_OPCODE(AT_go_to, 0x05D3, "vfffii");DEFINE_OPCODE(AT_set_walk_speed, 0x07A1, "i");DEFINE_OPCODE(actor_in_group, 0x0631, "vv");DEFINE_OPCODE(release_group, 0x0632, "v");DEFINE_OPCODE(create_player_group, 0x07AF, "vv");DEFINE_OPCODE(create_group, 0x062F, "iv");DEFINE_OPCODE(actor_group_leader, 0x0630, "vv");DEFINE_OPCODE(UNK1, 0x07CB, "vi");DEFINE_OPCODE(group_flag, 0x09DD, "i");DEFINE_OPCODE(AT_chat, 0x0677, "vvii");DEFINE_OPCODE(AT_animation, 0x0605, "vssfiiiii");DEFINE_OPCODE(remove_actor_from_group, 0x06C9, "v");DEFINE_OPCODE(text_box, 0x03E5, "s");DEFINE_OPCODE(UNK_flag, 0x0816, "vi");DEFINE_OPCODE(UNK_flag2, 0x074E, "vfi");DEFINE_OPCODE(change_player_skin, 0x09C7, "vi");DEFINE_OPCODE(max_wanted_level, 0x01F0, "i");DEFINE_OPCODE(set_wanted_level, 0x010D, "i");DEFINE_OPCODE(clear_wanted_level, 0x0110, "v");DEFINE_OPCODE(AT_kill_actor, 0x05E2, "vv");DEFINE_OPCODE(camera_on_ped, 0x0159, "vii");DEFINE_OPCODE(actor_swim_ability, 0x04D8, "vi");DEFINE_OPCODE(AT_bail_from_car, 0x0633, "v");DEFINE_OPCODE(AT_sit_down, 0x06B0, "vi");DEFINE_OPCODE(AT_perform_driveby, 0x0713, "vvvffffiii");DEFINE_OPCODE(AT_look_around, 0x05C8, "v");DEFINE_OPCODE(AT_cower, 0x05C5, "vi");DEFINE_OPCODE(start_AS, 0x0615, "v");DEFINE_OPCODE(end_AS, 0x0616, "v");DEFINE_OPCODE(assign_AS, 0x0618, "vv");DEFINE_OPCODE(AS_loop_flag, 0x0643, "vi");DEFINE_OPCODE(AS_remove_ref, 0x061B, "v");DEFINE_OPCODE(AT_kill, 0x05BE, "v");DEFINE_OPCODE(car_door_status, 0x020A, "vi");DEFINE_OPCODE(create_weapon_pickup, 0x032B, "iiifffv"); 

 

Share this post


Link to post
Share on other sites
ceedj

Here's some more. Please take note that these opcode param orders do NOT follow any of the ini's out there (classic or otherwise), so keep that in mind when coding with this (object, actor, car, particle etc handles go LAST).

 

Have fun!

 

 

DEFINE_OPCODE(create_pickup, 0x0213, "iifffv"); DEFINE_OPCODE(create_object, 0x0107, "ifffv"); DEFINE_OPCODE(attach_obj_to_actor, 0x070A, "vvfffiissi"); DEFINE_OPCODE(attach_particle_to_actor, 0x0669, "svfffiv");DEFINE_OPCODE(destroy_object, 0x0108, "v");DEFINE_OPCODE(set_rubbish, 0x03AD, "i");DEFINE_OPCODE(heat_wave, 0x08FD, "i");DEFINE_OPCODE(create_cash_pickup, 0x02E1, "fffiiv");  DEFINE_OPCODE(object_solid_in_area, 0x0985, "ffffiiv"); 

 

Share this post


Link to post
Share on other sites
John-Johnson

Hi all!Tell me please how instelled tgis program,and how use it?

Share this post


Link to post
Share on other sites
drumthrasher109

does this remove the speed limit on all vehicles or just the hydra? and does this remove the altitude limit on all vehicles or what...i like to fly cars around, but idk.

Share this post


Link to post
Share on other sites
ceedj

Speed limit fix is just for the Hyrda. The height thing is for AIRCRAFT only.

Share this post


Link to post
Share on other sites
drumthrasher109

oh wait it is for cars and aircraft for both altitude and speed. TIGHT!

Share this post


Link to post
Share on other sites
markiij

can someone tell me how to install this?

Share this post


Link to post
Share on other sites
Y_Less

Just complie it (if you don't know how to do that you need to go waay back to basics) and put the produced d3d9.dll file in your SA directory.

Share this post


Link to post
Share on other sites
ceedj

Close. Compile it (becomes an exe) and launch it from anywhere (it will find your GTA SA installation). You WILL need the DX SDK to make this work.

 

Or is there a d3d9 variant I'm not aware of? mercie_blink.gif

 

EDIT: See Cerebra's post on page 2 about multiple GTA SA installs. Also see CYQ's post that fixes the text string limit and my post further down the page that fixes the OR commands.

Edited by ceedj

Share this post


Link to post
Share on other sites
Leonidas I

I know this thread isn't what it once was, but there isn't any other place I've found where this particular mod has been worked on. I downloaded the file that has the source code and the pre-made exe. All I want to do is have an exe that has the unlimited speed and unlimited height turned on by default(no pressing ALT-F9 or ALT-F8) and leave the gravity mod off by default. I downloaded the dot net, some new version of Visual C++ which I haven't got to work, yet. I also have Visual C++ version 6 and I downloaded the latest DX9 SDK as well as the 2005 version. I keep getting errors when I try to compile with the version 6 C++. I'm not programming king, though I can tell some of you are very good at it. Can someone please help me get in the right direction with this? I've gotten pretty good at editing the main.scm, but I'm very new to C++ compiling and I just don't know what I'm doing wrong. Like I said, all I want to do is make the unlimited speed and height on by default, leaving the rest as it is. Thanks and have a nice day.

Share this post


Link to post
Share on other sites
ceedj

There were a number of "little" changes I needed to make to get this to run with VS 2005 (you MIGHT get it to compile with v6, though I've never tried with this). The trouble is, I forgot to write down WHAT I changed. This is really something I've been meaning to get around to, so if I can find some time over the next few days, I'll try to setup a new project and see if I can remember WHAT I did.

 

Make sense? wow.gif Anyway, I'll try to give it a looking over.

 

EDIT: Try this - download the souce for San An Studios 3.1

 

http://www.pawfectfilms.com/mods/SanAnStudios3_1_SRC.zip

 

I've included my project files with this; apparently I DID get it to work with Version 6; I think I had SP5 installed too. Anyway, try loading my project and seeing if it compiles. You might get a warning or two, but that should be all. If that works, save the project, shut down VC++ 6 and replace Custom.cpp and Opodes.h from op9080's original archive. Then re-open the project and try to compile that. That should give you the same basic exe that came with the program. If all that works, I'll post the bit about having speed and height hacks on automatically (I disabled it in my mod, so I have to figure it our from the originals).

Edited by ceedj

Share this post


Link to post
Share on other sites
Leonidas I

Hey, thanks a lot ceedj! I'll give this stuff a try and check back on this thread in case I still can't get it. Yeah, I have v6 and SP5 installed as well. The error I keep getting is in regards to a link that has to do with an external resource.

 

 

 

Update:

I actually got an .EXE to compile and it works. But, I still don't know how to get the limiters off by default. They still require the ALT-F8/F9 keys pushed to work. But at least I got it to compile.

 

A couple questions about these mods. Can the Hydra speed and aircarft height mods be alterantively done in the main.scm using SAMB? See, here's my four 'golden' changes I'd like to get in SA full time; unlimited hydra speed, unlimited aircraft height, no motion blur, and no heat haze. Those four things just urk me.

 

The good news is, I have a D3D9.DLL that I found(somewhere, I have no idea where) that eliminates the motion blur and heat haze, so that's 2 down. The aircraft limits seem to be just within grasp if I could just get them turned on by default. But I've always wondered if any of these four things could be done using nothing more than SAMB. Ceedj, do you know, or does anyone else know for sure?

 

Thanks for helping on this. I think the one thing that was stopping me from compiling was I didn't have the Base set high. The 0x48320000 worked great. LMK about the speed and height hacks whenever you can.

Edited by Leonidas I

Share this post


Link to post
Share on other sites
SmokingCookie

Nice work, but I recently updated my SA to 1.01, will the SA Loader work with the 1.01 EU version of SA?

Share this post


Link to post
Share on other sites
boofhead_racer

this rocks, its exactly what iv been looking for (a way to make missions using a common programing language).

 

only problem is that im a total noob when it comes to programing, and reading the other post from other people total blew me away.

 

if someone could right a tutorial on something simple (like how to spawn a gun) just so noobs like me have somewhere as a starting point to learn.

 

 

ages ago my brother gave me a "teach yourself C++ in 24 hours" and it came with some really old software (Bloodshed Dev-C++) and i know that heaps of people use visual C++ , so should i download that?

 

iv done the "hello world" project from the c++ book (took me ages and i found it confusing)

 

so what should i do?

what should i download?

can some1 make a tut (that is written in noobish)?

 

this kicks asss btw cookie.gif

 

<SK> | Aussie Adam

Share this post


Link to post
Share on other sites
grovespaz

 

this rocks, its exactly what iv been looking for (a way to make missions using a common programing language).

 

only problem is that im a total noob when it comes to programing, and reading the other post from other people total blew me away.

So.. You have been wanting for a tool to code mission scripts in a good prgogramming language, but then you know sh*t about programming languages? smile.gif

 

 

if someone could right a tutorial on something simple (like how to spawn a gun) just so noobs like me have somewhere as a starting point to learn.

 

ages ago my brother gave me a "teach yourself C++ in 24 hours" and it came with some really old software (Bloodshed Dev-C++) and i know that heaps of people use visual C++ , so should i download that?

Bloodshed Dev-C++ isn't old.. The version that came with your book might be, but its available for free online..

MSVC is not(Except for the 2005 express edition, which might just be your league). Suggesting to download it is suggesting something illegal.. Be carefull with that..

 

iv done the "hello world" project from the c++ book (took me ages and i found it confusing)

If you found hello world confusing, I am sorry but you will have to learn waaay more before you can start on engine hooking..

 

so what should i do?

what should i download?

can some1 make a tut (that is written in noobish)?

 

Read that book, complete it, understand it.

DevCPP, alternatively MSVC 2005 Express, alternatively buy MSVC..

Since a tut wouldn't exactly provide you with more knowledge than you have now, it wouldn't be a rewarding thing to do. Most people just cut and paste anyway..

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

Important Information

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