You are not logged in.
Some of these are real useful, especially the Aero Enabler 
But I had to make some changes. For me on Win 7, SA minimises when aero_enabler.cs takes effect, so I did this to fix it:
// This file was decompiled using sascm.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 21.2.2011
{$CLEO .cs}
0AA2: 0@ = load_library "aero.dll" // IF and SET
else_jump @Noname_94
0AA4: 1@ = get_proc_address "aero" library 0@ // IF and SET
else_jump @Noname_89
while true
8AB0: not key_pressed 0x1B // Esc
jf break
8AB0: not key_pressed 0x5B // Windows Key
jf break
if or
8AB0: not key_pressed 0x9 // Alt
8AB0: not key_pressed 0x12 // Tab
jf break
003D:
end
0AA5: call 0x7469A0 0 pop 0
0AA5: call 1@ 0 pop 0
0AA5: call 0x746F70 0 pop 0
:Noname_89
0AA3: free_library 0@
:Noname_94
0A93: end_custom_thread
I believe I wrote that fghtswtch.cs a while back, although I find it often redistributed on Youtube 
That is the plan, I guess the amount could be toned down - but I felt since things like request_model would be used a lot (not everyone like's classes). But I'm still not certain about all aspects.
What's tough is trying to organise opcodes into classes. I still want to experiment with the classes.db file a bit more since I'm still not fully sure how they work.
I've been working hard on GTAG's Opcode Database System, trying to make SCM scripting easier, faster and MUCH more accurate. I decided to list my proposal for the new keywords.txt file, specific to San Andreas (I'll fill in any needed opcodes for VC and III later). I've already worked on the new Opcode Definitions generator, which has fixed many bugs and has a much improved design as well as being more interactive.
I'll probably create a similar topic for classes.db file sometime. I just want to make sure people are happy with the proposal before I send it off to the database, as once it's implemented in people's scripts, changes would result in lack of ability to compile them. After I add the keywords, none will change. Some may be added (especially those which I have commented out in the list below) and alternates may come about, but compatibility with old scripts is a must.
I am also planning on other variants of these files. Such as ones which will use the original Rockstar natives, allowing us to code using such function names, which I think is benaficial - despite the restrictions of the current IDE ("compiler") choices. These variants will be optional, of course.
The options supplied for the Opcode Definitions Generator should allow a lot of customisation to SCM syntax. I will be creating new .ini definitions (".ini v2" - yeah, everything is version two now) with changed parameter orders to suit developments in SCM coding. However, these changes are completely optional. It would be a simple case of choosing between "Original .ini" (perhaps I'll name it "Classic .ini" - lol) or "v2 .ini" - which should suit the needs of everyone.
Some modders will indeed want to stick with the original SCM style and some will prefer an upgrade. Either way, I hope the Opcode Definitions Generator can be made handy for everyone.
One day, I may learn to program well enough to put the potential of the generator to use and create my own IDE ("compiler")... Alas, that probably won't be any time soon. Still, if anyone else was pondering the creation of a new IDE ("compiler"), the generator is more than capable of creating more files (.xml containing parameter info, etc. - perhaps?), which could help.
Anyway, here's the list. You could even try it out 
0001=wait
0002=jump
0002=goto
0003=shake_camera
0003=shake_cam
004D=else_jump
004D=jf
004D=jump_if_false
004D=else_goto
004E=end_thread
004F=create_thread
0050=gosub
0051=return
0094=gabsf
0095=absint
0096=gabsf
0097=absf
0098=random_float
0099=random_int
00BE=clear_prints
00C0=set_time
00D7=create_thread_noparams
00D8=mission_cleanup
//0111
0112=wasted_or_busted
015A=restore_cam
015D=set_game_speed
0169=set_fade_rgb
016A=fade
016B=fading
016B=is_fading
0180=set_mission_flag
01B5=set_next_weather
01B6=set_weather
01B7=release_weather
01BD=get_game_time
01F0=set_max_wanted_level
//01F6
0208=random_float_in_ranges
0209=random_int_in_ranges
0247=load_model
0247=request_model
0248=is_model_available
0248=has_model_loaded
0249=release_model
0253=save_time
0254=restore_time
02A3=set_widescreen
02E7=start_cutscene
//02E4 maybe
02E8=get_cutscene_time
02E9=has_cutscene_finished
02EA=stop_cutscene
02EB=cam_restore_jumpcut
//02ED
//030C
//030D
0317=increment_mission_attempts
//0318=set_last_mission_passed_gxt
031A=remove_script_fires
//032A=set_cam_mode
0335=set_free_resprays
0373=set_cam_behind_player
038B=load_requested_models
0391=release_textures
0394=play_music
0396=freeze_timer
03A4=thread
03A4=name_thread
03AF=enable_streaming
//03B7=stream_cutscene
03C7=set_wanted_multiplier
03C8=set_cam_in_front_of_player
//03CB
//03D5
//03D6
03D8=show_save_screen
03D9=did_save_complete
03DE=set_ped_density_multiplier
03E5=show_text_box
03E6=clear_text_box
//03E7
//03EB
//03F0
040C=is_german_version
0417=start_mission
041D=set_cam_near_clip
041E=set_radio_station
0424=is_system_metric
042C=set_total_missions
0434=start_credits
0435=end_credits
0436=are_credits_finished
//043C
0445=is_handling_cheat_on
0459=end_thread_named
//045C=abort_mission
0485=return_true
//0488
//048A: set_RC_car_detonation 0 // or opcode 04D6
04BB=set_interior
04BB=select_interior
//04C1=
//04D6: enable_RC_car_detonation 0 // or opcode 048A
//04DB: exit_RC_mode // on foot version
//04E4
04ED=load_anims
04ED=request_anims
04EE=are_anims_available
04EE=have_anims_loaded
04EF=release_anims
04F9=set_sky_color
04FA=reset_sky_colors_with_fade
050F=get_max_wanted_level
0512=show_text_box_forever
051E=get_current_radio_station
//054C=set_gxt_table
//056A=
0572=set_all_taxis_have_nitro
057E=set_radar_as_interior
0581=show_radar
0595=set_oddjob_mission_passed
059A=return_false
//059D
//059E
//05B6
//05D6
//05D7
//0615=begin_task_sequence
//0616=end_task_sequence
//061B
//061E
//06B9: cutscene_data_loaded
06C8=enable_riot
06D0=enable_emergency_services
06D7=enable_random_trains
06D9=delete_script_trains
06DA=reset_train_directions
06DB=delete_all_trains
//06E0=set_2player_cam_mode
//06F1=set_2player_distance_limit
//06F2=release_2player_distance
//06F3
//06FA=unknown_2player_flag
//0701
//0707
//0719
072C=enable_police_bikes
0732=suppress_car_model
0733=dont_suppress_car_model
0734=dont_suppress_any_car_models
0754=clear_patrol_route
075B=set_radar_zoom
//075D
//075E
//075F
//076F
//0776
//0777
//0778
//077E
//0790
//0792
0793=save_player_clothes
0794=restore_player_clothes
//079D
//079E
//079F
//07A1=set_walk_speed
//07A8
07D0=get_weekday
//07DE
//07F1
//07F2
//07F9
//07FA
//0800
//0822=enable_bumper_view
0826=show_hud
0828=set_max_fire_generations
//0844
//0845
//0846
//0847
//084D
//0867
//0871
//0872
0879=enable_gang_wars
087A=is_gang_war_active
//087C
088E=set_next_day
//08A3=allow_player_to_gain_respect_during_mission - loonng
08A8=enable_lod_markers
08A9=load_script
08A9=request_script
08AB=has_script_loaded
08AB=is_script_available
//08AC
08B1=enable_night_vision
08B2=enable_thermal_vision
{08B4: test $390 bit 1
08B5: test $GIRLS_GIFTS_BITMASK bit $GIRLFRIEND
08B6: test $383($GIRLFRIEND,6i) bit 3@
08B7: test 54@ bit 5
08B8: test $1044 bit 20
08B9: test 239@ bit 216@
08BA: set $377[0] bit 1
08BB: set $1210 bit $GIRLFRIEND
08BC: set $390 bit 3@
08BD: set 54@ bit 10
08BE: set $377[0] bit 1
08BF: set 54@ bit 49@
08C0: clear $391 bit 31
08C1: clear $1210 bit $GIRLFRIEND
08C2: clear $391 bit 3@
08C3: clear 54@ bit 11
08C4: clear $377[0] bit 31
08C5: clear 54@ bit 49@}
//08CA=reset_zones
//08D0:
//08D1=store_cutscene_pos
08DD=lose_weapons_when_wasted
08DE=lose_weapons_when_busted
08E1=get_tags_sprayed
08E2=get_percent_of_territories_owned
08E7=disable_entrance_markers
08EA=enable_gang_members
08F4=set_gang_size_limit
08F5=save_player_gang
08F5=restore_player_gang
08F5=hide_player_gang
08F5=show_player_gang
08F8=show_stat_update
08FD=enable_heat_haze
08FE=is_text_box_displayed
//090C: highlight_inactive_gang_zone "GLN1" as_available_for_gangwars
//090D: highlight_all_inactive_gang_zones_as_available_for_gangwars
090F=end_script
0910=release_script
0913=run_script
0915=sync_time_and_weather
0992=enable_air_traffic
0925=restore_cam_to_user_defined
//0926
092F=lock_cam_target
0930=lock_cam_pos
0931=lock_cam_zoom
0933=is_cam_moving
0934=is_cam_rotating
093D=set_cam_cinematic
//0942: item_with_textureCRC $SELECTED_MENU_ITEM is_clothing
//0944: manipulate_weapon_camera $ACTOR_SMOKE
0951=disable_trip_skip
0952=load_soundtrack
0953=get_soundtrack_status
0954=play_soundtrack
0955=stop_soundtrack
//0956=get_respect
//096A=enable_police_helis
//096B: set_present_mod_apply
//096C: set_present_mod_remove
//0970: teleport_in_override_restart // 016Eh
0971=sync_water
//0974=emulate_wasted_busted
//0983: unknown_disable_gang_wars 1
0986=remove_references_to_all_fires
0989=set_text_box_width
//098A: set_gunshot_sense_range_for_riot2 15.0 // pretty pointless, really
098B=concat
//098C == 098B
0991=pause_soundtrack
//0994: unknown_create_escape_at 76.6 -1527.6 4.1 // add_convoy_point
//0995: unknown_remove_escapes // clear_convoy_points
0997=set_total_respect
0998=award_respect
099D=is_night_vision_on
099E=enable_random_cops
//09A3=
//09A6
09AC=hide_map_icons
09AD=set_vehicle_camera_mode
09B9=show_entered_car_text
09BA=show_entered_area_text
//09BD
//09BE
//09BF=set_random_car_model
09C1=add_next_message_to_brief_history
//09C2: cancel_rampage
09C8=are_subtitles_on
//09D2: unknown_flag 0
09D4=suspend_wanted_level
09D9=detonate_satchel_charges
//09DD: unknown_player_group 1
//09E4
//09E6: set_burglary_houses_accessible 1
//09EC: set_garages_leave_camera_alone 0
//09EE=keep_status_text_on_screen
//09F0: restore_behind_camera_autoposition_mode_for_all_car_models
//09F5: disable_player_mutal_activities 1
//09F8: give_player2_weapons_of_player1
//09FA: is_menu_closed // pretty damn useless
09FB=get_language
//0A0B: set_rendering_origin_at_3D_coord 2493.362 -1734.295 12.3828 angle 258.7583
0A0E=clear_text_now_style
0A0F=is_new_language_set
//0A13: unknown_sync_player_camera
0A14=disable_respray_garages
0A19=display_area_name
//0A1E=take_snapshot
//0A24=enable_military_zones_wanted_level
//0A25=set_cam_angles_on_player
0A26=set_radio_station_as_favourite
0A2A=is_this_text_box_displayed
0A2B=is_widescreen_option_on
0A2C=hide_priority_text_during_fade
0A2D=hide_styled_text_during_fade
0A2F=display_sniper_scope_this_frame
0A2F=display_camera_viewfinder_this_frame
//0A36=is_trip_skip_ready_for_fadein
0A37=disable_vehicle_light_rendering
0A3D=enable_prostitutes_pay_player
0A43=get_rid_of_player_prostitute
//0A44: unknown_override_09BD 1
0A45=set_railtrack_friction_multiplier
//0A46: set_external_scripts_triggers_type 1 enabled 0
//0A47=set_dialgogue_mode_enabled_no_gxt
0A48=enable_menu_during_widescreen
0A4A=get_mouse_input
0A4A=get_joystick_input
0A4B=are_controls_set_to_joystick
0A4C=is_look_inverted"Where's the rest of the opcodes?" - Opcodes related to chars, vehicles, objects etc. aren't suitable to be keywords. Imagine this line:
perform_anim 0@ "M_SMKLEAN_LOOP" "LOWRIDER" 4.0 1 0 0 0 -1
These will be part of classes.db - just like most of the opcodes in this list won't be in classes.db..
I might as well say that I tried the Missile script. No crashes, although there appear to be no actual effects of it (I think prolonged missile flight, that's it).
On one of my unreleased mods, I had a crash here:
:isMouseButtonPressed 000A: 0@ += 1 0AA7: call_function 0x52EF30 num_params 1 pop 1 0@ 1@ 0B10: 1@ = 1@ AND 0xFF 0039: 1@ == 1 0AB2: ret 0
Solved by doing this:
:isMouseButtonPressed 000A: 0@ += 1 0AA7: call_function 0x52EF30 num_params 1 pop 0 0@ 1@ 0B10: 1@ = 1@ AND 0xFF 0039: 1@ == 1 0AB2: ret 0
My script is built for CLEO 4.
Just in case this info is of any use.
I've found a few bugs with CLEO 4 (which definitely can be considered bugs) since upgrading my computer (including updating to Windows 7).
Problem 1
0AE5: create_directory "CLEO\TEST\FOLDER"
The expected result is for all folders to be created, if they didn't exist. However, if "TEST" doesn't exist, "FOLDER" will not be created. So it is necessary to evade this by creating "TEST" before creating "FOLDER" in order to prevent crashes later on.
Problem 2
0AB0: key_pressed 0x1
Always returns false, despite the state of the key (LMB). To get past this, I use GTA's functions.
Again, these problems only occur after updating to Windows 7. On XP, these things seemed to work fine (or maybe it was another factor of my old system). Hope a fix can be made for these issues.
CLEO scripts are reloaded every time a new/loaded game is started, just like the main.scm
However, most IMG files are kept open as streams, so script.img can't be tested without exiting the game before compiling.
Well CLEO has no control over how well the latest bass.dll will work. It's possible for the new one to have bugs or something. It is okay to update, but I doubt it is even necessary.
Well.. revert back to the older version of bass.dll then.
bass.dll doesn't come with SA. It comes with CLEO 4. Which is why removing cleo.asi fixes the problem, because bass.dll is no longer actually in use.
Hmm.. that would unfortunately mean it wouldn't be easy to determine which thread created the SCM Function to create more advanced capabilities for SCM Functions.
The idea behind create thread links to my plan of doing "callback" style scripting. Interesting to see how well it works in CLEO and if it makes creating advanced stuff any easier.
Pretty soon I'll try to have Windows 7 ported to San Andreas 
[center][size=3]Fixed create_thread For CLEO Scripts[/size][/center]
My function to create threads within a CLEO Script worked well, but for one flaw.
It's actually a problem with Sanny Builder not expecting a new thread within a CLEO Script. The label pointers are relative to the file and not to the new thread like they are supposed to be. I'm able to fix this by patching the base IP of the new thread to match the one that created it, so that jumps are processed relative to the file and not the thread.
This doesn't affect the thread which created it at all. I've found out that [opcode]0A93[/opcode] simply does nothing when used in this thread (still use end_thread to end this thread). I was hoping that CLEO would end the whole script, providing a pretty useful feature, but I guess it might work by patching the thread name.
Anyway, all end_custom_thread will do is return the script to the game, like [opcode]003D[/opcode] or any other invalid opcode does, as I explained in another post.
So here's the fixed version, where you can actually jump to labels properly.
{$CLEO}
0000:
while true
wait 0
if
0ADC: test_cheat "NEWTHREAD"
then
0AB1: call_scm_func @CreateThread 3 @MyNewThread 1 6
end
end
:MyNewThread
wait 0
0ACD: show_text_highpriority "I'm running continuously! I'm tired." time 1
jump @MyNewThread // before, this would have jumped to code below - now it jumps correctly
:CreateThread
0A9F: 32@ = current_thread_pointer
000A: 32@ += 0x10
0A8D: 32@ = read_memory 32@ size 4 virtual_protect 0
0062: 32@ -= 0@
0AA7: call_function 0x464C20 num_params 1 pop 1 32@ 33@
005A: 32@ += 0@
000A: 33@ += 0x10
0A8C: write_memory 33@ size 4 value 32@ virtual_protect 0
000A: 33@ += 0x2C
for 32@ = 0 to 30
0A8C: write_memory 33@ size 4 value 1@(32@,30i) virtual_protect 0
000A: 33@ += 4
end
0AB2: ret 0The new code:
005A: 32@ += 0@ // just restores the thread pointer, because we changed it before. 000A: 33@ += 0x10 // go to the thread base IP 0A8C: write_memory 33@ size 4 value 32@ virtual_protect 0 // write the base IP of the current thread to the new thread
Hope you like. I was lazy and copy'n'pasted.
Just to get a thought in.. It'd be great to have new opcodes introducing DirectX capabilities such as 3D drawing of basic lines, text etc. MTA scripts manage some pretty great things with it.
That was the original plan. Instead, I let the original 0662 function get the string and then made a jump to my ASM, which passed the pointer to _printf, but it didn't work (crash to desktop).
Guess this isn't going to be as hard as restoring the debug file logging functions, though.
I should really get going with C++, then it would be much easier.
Ah, I understand much better how CLEO works now.
I'm not sure why, but it's crashing when 0662 is run
0A8D: 2@ = read_memory 0x8A61D4 size 4 virtual_protect 0 000A: 2@ += 0x7 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 1 000A: 2@ += 0x2B28 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0 0A8C: write_memory 0x495E80 size 4 value 2@ virtual_protect 0
The value written to the 0662 pointer must be correct. The ASM at that memory location matches what's shown in the disassembler. Crashes at 0x2059F9F, for some reason. Seems totally irrelevant since no written value points there..
Yeah, I'd considered that method before. But where would CLEO be positioned in the memory? Is the position absolute or would I have to read a pointer to get there?
Unfortunately, I also just messed up my IDB (I'd spent so long adding structures) and have to redownload. 
I've found all handlers for CLEO 4, but it's updated quite a lot and it'd be nice for the script to work with CLEO 3 until everyone can use CLEO 4 without compatibility errors etc.
I believe 0662 might have originally called the _printf function. I believe listener made an .asi to log what was passed to that file, but it causes huge log files.
I've tried to call on _showTextBox and then jump back to the opcode handler, but it didn't work:
0A8F: 1@ = 0@ - @_printf
000E: 1@ -= 0x49481B
0A8C: write_memory 0x49480B size 1 value 0x44 virtual_protect 1
0A8C: write_memory 0x494816 size 1 value 0xE9 virtual_protect 1
0A8C: write_memory 0x494817 size 4 value 1@ virtual_protect 1
0A8F: 1@ = 0@ - @_printf_jmp
0A8F: 2@ = 0x495DDF - 1@
0A8C: write_memory 1@ size 4 value 2@ virtual_protect 1
0A93: end_custom_thread
:_isKeyPressed
hex
FF742404 // push [esp+04]
B8B0DD5200 // mov eax, 0052DDB0
FFD0 // call eax
C20C00 // ret 000C
end
:_isKeyJustPressed
hex
FF742404 // push [esp+04]
B850E45200 // mov eax, 0052E450
FFD0 // call eax
C20C00 // ret 000C
end
:_printf
hex
{6A00 // push 00
6A00 // push 00
6A00 // push 00
8D4C247C // lea ecx, [esp+7Ch]
51 // push ecx
B8E08B5800 // mov eax,00588BE0
FFD0 // call eax}
30C0 // xor al, al
E9 // jmp 00495DE3
end
:_printf_jmp
hex
00000000
endEven with no functional code, jumping back causes a crash to desktop. Not sure why.
Just tried to do it with CLEO 4's API, but my .cleo failed to launch. Also, despite removing loads of code from one of the examples, it compiles at over 25kb.. which is much more than the original .cleo file. Dunno if my compiler is screwing up there or something, but at least I finally managed to compile something!
For me to use 0ACA to do this, for the time being, how would it work? In IDA, I see the address as being 10003E50, but I'm not sure where it would start in SA.
There was also a key which automatically aimed at the "best available ball" in pool (not always so accurate, but pretty good) 
I made a start on restoring Rockstars original opcodes which were NOP'd out. I don't think I'll get too much further than I have so far (struggling on 0662 at the moment) as my ASM skills aren't the best.
It'd probably be easier if I knew C++, but ASM is still mostly easier for me at the moment and I want to practise writing it.
Thanks, I had fun writing it.
It also seems that driver behaviour flags are actually used during car paths, but the value set by the SCM is overwritten at 0x45AAB0. It might be interesting to see whether NOP'ing this brings any advantages when playing recorded paths...
Posted this and thought it might be of interest to people here.
Just to confirm, this doesn't replace existing .rrr files. If you do this:
0AB1: call_scm_func @LoadCustomPathFromFile num_params 2 file 0@ pathID 899 store_path_data_to 1@
0811: 2@ = actor $PLAYER_ACTOR car_nosave
05EB: assign_car 2@ to_path 899
repeat
0ACD: show_text_highpriority "Playing recorded path" time 1
003D:
until 860E: not car 2@ assigned_to_path
0AC9: free_allocated_memory 1@
0873: release_path 899
07C0: load_path 899The path 899 from the IMG will be loaded. The SCM Function merely sets the path data that is used by a slot (SA is dumb and assigns a separate slot for each .rrr file), which makes the game think the path is already loaded and uses the data read from the file.
This means no limits on using .rrr files (you can also add more slots for paths, but I don't think it's needed), no IMG editing and what's more.. loading paths is now instant.
NOP'ing the call at 0x53E1B4 seems to do the trick pretty well.. I noticed an lag decrease when flying in a hydra without the clouds. They were ugly and too opaque, anyway.
Added "noclouds" and "notargetblip" (the health indicator above aimed peds heads) so far. Tryna find some more values to do with lighting/shading...
EDIT
Forgot to mention here that Stream Ini Extender 0.4b is out and brings 4 new options.
* Disable Clouds
* Disable Target Blip
* Disable Specular Vehicle Lighting
* Disable Vehicle Lighting
Have you installed ASI Loader properly?
Seems an odd way to disable clouds, but I'll probably implement it for the next release. I believe I have pretty much everything there related to streaming/graphics etc... can't believe I forgot the health indicator, though 
[center]Sky Ink
The ape-headed moron engineers (lets pretend I'm not talking about Rockstar developers) of San Andreas' Stuntplane could only manage to fit one tank to write in the sky with... Then, a genius engineer (lets pretend I'm not talking about myself) made a discovery and managed to give skywriters some more colours to play with by modifying the original model made by Rockstar the A.S.S (Aircraft Skywriting Specialists).
See the instruction manual that comes with this aircraft modification for usage.
Enjoy!
CLEO 3 and CLEO 4 compatible!
GTAG Mirror[/center]
SAMP doesn't support CLEO mods. SAMP also doesn't support the compact gta_sa.exe.