|
 |
|
|
|
|
|
GTA Modification Forums
Adding opcodes in Sanny Builder
 |
|
 |
| |
Asepl  |
|
Proud DYOM user

Group: Members
Joined: May 27, 2010

|
Okay, so I've created this code: | CODE | { use macro (Ctrl+J) "headsa" to insert a file header } {$VERSION 3.0.0000} thread 'MAIN' var $PLAYER_CHAR: Player end // var 01F0: set_max_wanted_level_to 6 set_wb_check_to 0 00C0: set_current_time 8 0 04E4: unknown_refresh_game_renderer_at 2488.5601 -1666.84 Camera.SetAtPos(2488.5601, -1666.84, 13.38) $PLAYER_CHAR = Player.Create(#NULL, 2444.9773, -1563.8386, 26.2076) $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR) 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group Camera.SetBehindPlayer set_weather 0 wait 0 ms $PLAYER_CHAR.SetClothes("PLAYER_FACE", "HEAD", Head) $PLAYER_CHAR.SetClothes("JEANSDENIM", "JEANS", Legs) $PLAYER_CHAR.SetClothes("SNEAKERBINCBLK", "SNEAKER", Shoes) $PLAYER_CHAR.SetClothes("VEST", "VEST", Torso) $PLAYER_CHAR.Build $PLAYER_CHAR.CanMove = True fade 1 (out) 0 ms select_interior 0 0629: change_stat 181 (islands unlocked) to 4 016C: restart_if_wasted at 2027.77 -1420.52 15.99 angle 137.0 for_town_number 0 016D: restart_if_busted at 1550.68 -1675.49 14.51 angle 90.0 for_town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here ($ONMISSION) 03E6: remove_text_box // put your create_thread commands here create_thread @MODEL
// put your mods (threads) here
// IDLE LOOP :leeg wait 500 jump @leeg end_thread
:MODEL thread 'MODEL'
// Load Models 0247: load_model #WBDYG2 0247: load_model #COLT45 0247: load_model #TEC9 0247: load_model #FREEWAY 0247: load_model #BURRITO 0247: load_model #WMYCR 0247: load_model #BIKERA 0247: load_model #BIKERB 0247: load_model #WBDYG1 038B: load_requested_models
:MODELS_LOAD if or 8248: not model #WBDYG1 available 8248: not model #COLT45 available 8248: not model #TEC9 available 8248: not model #WBDYG2 available 8248: not model #FREEWAY available 8248: not model #WMYCR available 8248: not model #BURRITO available 8248: not model #BIKERA available 8248: not model #BIKERB available else_jump @MODELS_SPAWN wait 0 ms 0001: jump @MODELS_LOAD
:MODELS_SPAWN fade 0 500 repeat wait 0 until 816B: not fading
02A3: enable_widescreen 1 01B4: set_player $PLAYER_CHAR can_move 0 Camera.SetPosition(2452.1516, -1557.4697, 26.4455, 0.0, 0.0, 0.0) Camera.PointAt(2461.6311, -1551.5996, 24.0015, 1)
fade 1 500 repeat wait 0 until 816B: not fading
1@ = Car.Create(#BURRITO, 2463.8245, -1555.5416, 23.6373) 0229: set_car 1@ primary_color_to 0 secondary_color_to 0 2@ = Car.Create(#FREEWAY, 2458.4707, -1553.1155, 24.0023) 0229: set_car 2@ primary_color_to 0 secondary_color_to 1 Car.Angle(2@) = 302.0
3@ = Actor.Create(CRIMINAL, #WMYCR, 2465.7693, -1550.2465, 24.0009) Actor.Angle(3@) = 92.0 Actor.Health(3@) = 50 02E2: set_actor 3@ weapon_accuracy_to 80
4@ = Actor.Create(CIVMALE, #BIKERA, 2463.9341, -1550.4586, 24.001) Actor.Angle(4@) = 272.0 Actor.Health(4@) = 50 02E2: set_actor 4@ weapon_accuracy_to 80
5@ = Actor.Create(CIVMALE, #BIKERB, 2462.0205, -1555.2186, 24.0033) Actor.Angle(5@) = 92.0 Actor.Health(5@) = 50 02E2: set_actor 5@ weapon_accuracy_to 70
04ED: load_animation "GANGS"
repeat wait 0 ms until 04EE: animation "GANGS" loaded
0605: actor 3@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA 0605: actor 4@ perform_animation_sequence "PRTIAL_GNGTLKB" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA 0605: actor 5@ perform_animation_sequence "SMKCIG_PRTL" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
fade 1 500 repeat wait 0 until 816B: not fading
|
However, I've got two problems with it. 1st: It won't unfade 2nd: Actors haven't got the animations -_- Could anyone check this script and tell me what's wrong?
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Asepl  |
|
Proud DYOM user

Group: Members
Joined: May 27, 2010

|
Erm. I'm not sure If you're speaking trustfully... Here's a part of Dutchy's code. | CODE | :load_check wait 0 if and model.available(#army) model.available(#patriot) model.available(#m4) 023D: special_actor 1 loaded 023D: special_actor 2 loaded 023D: special_actor 3 loaded else_jump @load_check
//--------------------- //Spawn everything in fade //---------------------
[COLOR=red]fade 0 500 repeat wait 0 until 816B: not fading[/COLOR] 02A3: enable_widescreen 1 03BD: destroy_sphere $begin
Car.Create($car, #patriot, 2503.0217, -1672.2841, 13.3594) Car.Angle($car) = 82.3844
0129: 1@ = create_actor_pedtype 23 model #army in_car $car driverseat 01C8: 2@ = create_actor_pedtype 23 model #army in_car $car passenger_seat 0 01C8: 3@ = create_actor_pedtype 23 model #army in_car $car passenger_seat 1 01C8: 4@ = create_actor_pedtype 23 model #army in_car $car passenger_seat 2 |
The fading has to occur BEFORE models' spawn, and AFTER checking if the models are loaded. At least I think so. Also, What do you mean ... Part of Dutchy's script again: | CODE | // Load models 0247: load_model #BFYST 038B: load_requested_models |
And what is the | CODE | | 038B: load_requested_models // <-- here |
supposed to mean the heck? You want to add a comment? In general, I found the main problem. It seems that none of my "until" commands work  I have no idea why, as I am doing everything like in the tutorials... And the tuts examples work just fine. Here is the part of my until script. | CODE | repeat wait 0 ms until 04EE: animation "GANGS" loaded |
And because the "until" command doesn't work, animations don't work as well, so does the unfade. The script just won't continue further, because it bugs somehow on the "until" Any ideas?
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(2) [1] 2
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|