Jump to content

Gta sa Main.Scm


LOLtwentynight

Recommended Posts

LOLtwentynight

Can anynone help me to change the coordinate spawn of THREAD:INT_MAN and external script Barb for gta sa stripped main !PLEASE!

Link to comment
Share on other sites

  • 3 weeks later...
Hamzeol Murf

Rephrase. I Couldn't Understand Anything You've Written

Link to comment
Share on other sites

LOLtwentynight

The Barb external script in MAIN file , I want to change the coordinate X Y Z

Link to comment
Share on other sites

ArmanCan
On 6/25/2024 at 4:00 PM, LOLtwentynight said:

The Barb external script in MAIN file , I want to change the coordinate X Y Z

Well.. "Stripped Main" means there is no initial, mission scripts and external scripts.. anyway.. in a normal main.scm all you have to do is download/install the Sanny Builder, open your scm with it (Create a backup of your main.scm and script.img first) and do your changes.. after that compile it and please test it.. 🙂

Link to comment
Share on other sites

LOLtwentynight

Well i have script with externals and i want to change the external script barber 62 . i mean the intrance of the interrior and i want to delete the interrior and i place it by exterrior and sphere . and  you can see the thread INTMAN in main file

Link to comment
Share on other sites

ArmanCan
13 hours ago, LOLtwentynight said:

Well i have script with externals and i want to change the external script barber 62 . i mean the intrance of the interrior and i want to delete the interrior and i place it by exterrior and sphere . and  you can see the thread INTMAN in main file

ok.. than install Sanny Builder and do these changes for yourself.. it's too simple.. you just need to type "." after the whole number.. (i mean not "," in some numerical system people are typing commas instead of points.. like 1000.01 not 1000,01)

 

But off course you can post your main.scm and script.img via.. hmmm.. mediafire.com or your google drive 🙂

Link to comment
Share on other sites

LOLtwentynight

This Thread i want to change interrior by sphere or PNJ

:INTMAN_2221
if or
  is_var_text_label16_equal_to_text_label v$ACTIVE_INTERIOR_NAME == "BARBERS"
  is_var_text_label16_equal_to_text_label v$ACTIVE_INTERIOR_NAME == "BARBER2"
  is_var_text_label16_equal_to_text_label v$ACTIVE_INTERIOR_NAME == "BARBER3"
goto_if_false @INTMAN_2339
get_number_of_instances_of_streamed_script 1@ = external_script_status 62 (BARBER)
if 
  1@ == 0
goto_if_false @INTMAN_2339
stream_script 62 (BARBER)
load_all_models_now 
if 
  has_streamed_script_loaded 62 (BARBER)
goto_if_false @INTMAN_2339
start_new_streamed_script 62 (BARBER) 
$1261 = 1
0@ += 1

Link to comment
Share on other sites

ArmanCan
4 hours ago, LOLtwentynight said:

This Thread i want to change interrior by sphere or PNJ

:INTMAN_2221
if or
  is_var_text_label16_equal_to_text_label v$ACTIVE_INTERIOR_NAME == "BARBERS"
  is_var_text_label16_equal_to_text_label v$ACTIVE_INTERIOR_NAME == "BARBER2"
  is_var_text_label16_equal_to_text_label v$ACTIVE_INTERIOR_NAME == "BARBER3"
goto_if_false @INTMAN_2339
get_number_of_instances_of_streamed_script 1@ = external_script_status 62 (BARBER)
if 
  1@ == 0
goto_if_false @INTMAN_2339
stream_script 62 (BARBER)
load_all_models_now 
if 
  has_streamed_script_loaded 62 (BARBER)
goto_if_false @INTMAN_2339
start_new_streamed_script 62 (BARBER) 
$1261 = 1
0@ += 1

Let me get this straight.. You just ask for an interior's (Entrance/Exit) coordinate change.. right?? If yes you can change them under data>maps folder.. off course some exact or close coords are written for mission purposes but i don't think you will find your desired coords on your external script..

Link to comment
Share on other sites

LOLtwentynight

Can you play with this script 

//-------------External script 62 (BARBER)---------------

:BARB
$9758 = 0.0
$9759 = 0.0
$9760 = 0.0
$9761 = 0.0
$9762 = 0.0
$9763 = 0.0
$9764 = 0.0
$9765 = 0.0
$9766 = 0.0
$9767 = 0.0
$9768 = 0.0
$9769 = 0.0
$9770 = 0.0
$9771 = 0.0
$9772 = 0.0
$9773 = 0.0
$9774 = 0.0
$9775 = 0.0
$9776 = 0.0
$9777 = 0.0
$9778 = 0.0
$9779 = 0.0
$9780 = 0.0
$9781 = 0.0
$9782 = 0.0
$9783 = 0.0
$9784 = 0.0
$9785 = 0.0
$9786 = 0.0
$9787 = 0.0
$9753 = 0.0
$9752 = 0
$9788 = 0.0
$9789 = 0.0
$9790 = 0.0
$9791 = 0.0
$9792 = 0.0
$9793 = 0.0
$9750 = 0
$9734 = 0
$9738 = 0.0
$9739 = 0
$9744 = 0
$9745 = 0.0
$9746 = 0.0
$9747 = 0.0
$9748 = 0.0
$9749 = 0
$2751 = 0
$2545 = 0
$2544 = 0
$9797 = 0
$9800 = 0
$9801 = 0
$9802 = 0
$9804 = 0
$9805 = 0
if 
  is_var_text_label_equal_to_text_label s$CURRENT_SHOP_GXT_NAME == 'BARBERS' // Œapœk¯axepcka¬
goto_if_false @BARB_558
set_var_int_to_constant $SELLER_MODEL = 156

:BARB_558
if 
  is_var_text_label_equal_to_text_label s$CURRENT_SHOP_GXT_NAME == 'BARBER2' // Œapœk¯axepcka¬
goto_if_false @BARB_591
set_var_int_to_constant $SELLER_MODEL = 177

:BARB_591
if 
  is_var_text_label_equal_to_text_label s$CURRENT_SHOP_GXT_NAME == 'BARBER3' // Œapœk¯axepcka¬
goto_if_false @BARB_624
set_var_int_to_constant $SELLER_MODEL = 176

:BARB_624
Model.Load($SELLER_MODEL)
load_mission_audio 4400 as 4
load_all_models_now 
set_deatharrest_state 0
script_name 'BARB'

:BARB_653
wait 0
if 
  Player.Defined($PLAYER_CHAR)
goto_if_false @BARB_7278
if 
  not is_var_text_label_empty s$CURRENT_SHOP_GXT_NAME
goto_if_false @BARB_7264
if 
  $9744 > 0
goto_if_false @BARB_751
if 
  has_language_changed 
goto_if_false @BARB_751
clear_help 
delete_menu $2417
delete_menu $2419
$2418 = 0
$2420 = 0
get_current_language $CURRENT_LANGUAGE

:BARB_751
if 
  $9744 == 0
goto_if_false @BARB_1015
if 
  is_var_text_label_equal_to_text_label s$CURRENT_SHOP_GXT_NAME == 'BARBERS' // Œapœk¯axepcka¬
goto_if_false @BARB_851
$9794 = 0.0
$9795 = 0.0
$9796 = 0.0
set_var_text_label s$9740 = s$CURRENT_SHOP_GXT_NAME
get_number_of_items_in_shop $9729
$9797 = 0
$9744 = 1

:BARB_851
if 
  is_var_text_label_equal_to_text_label s$CURRENT_SHOP_GXT_NAME == 'BARBER2' // Œapœk¯axepcka¬
goto_if_false @BARB_933
$9794 = 6.987
$9795 = -61.401
$9796 = 0.0
set_var_text_label s$9740 = s$CURRENT_SHOP_GXT_NAME
get_number_of_items_in_shop $9729
$9797 = 0
$9744 = 1

:BARB_933
if 
  is_var_text_label_equal_to_text_label s$CURRENT_SHOP_GXT_NAME == 'BARBER3' // Œapœk¯axepcka¬
goto_if_false @BARB_1015
$9794 = 0.371
$9795 = -31.421
$9796 = 0.0
set_var_text_label s$9740 = s$CURRENT_SHOP_GXT_NAME
get_number_of_items_in_shop $9729
$9797 = 0
$9744 = 1

:BARB_1015
if 
  $9744 == 1
goto_if_false @BARB_2030
use_text_commands 1
show_update_stats 0
store_clothes_state 
$X_BUY_MARKER = 414.3
add_float_var_to_float_var $X_BUY_MARKER += $9794
$Y_BUY_MARKER = -19.9
add_float_var_to_float_var $Y_BUY_MARKER += $9795
$Z_BUY_MARKER = 1000.806
add_float_var_to_float_var $Z_BUY_MARKER += $9796
$9753 = 90.0
$9745 = 414.3
$9745 -= 0.027
add_float_var_to_float_var $9745 += $9794
$9746 = -19.9
$9746 += 1.898
add_float_var_to_float_var $9746 += $9795
$9747 = 1000.86
$9748 = 180.0
$9758 = 412.0009
add_float_var_to_float_var $9758 += $9794
$9759 = -19.8018
add_float_var_to_float_var $9759 += $9795
$9760 = 1001.765
add_float_var_to_float_var $9760 += $9796
$9761 = 412.8502
add_float_var_to_float_var $9761 += $9794
$9762 = -19.2749
add_float_var_to_float_var $9762 += $9795
$9763 = 1001.797
add_float_var_to_float_var $9763 += $9796
$9764 = 414.9329
add_float_var_to_float_var $9764 += $9794
$9765 = -18.4475
add_float_var_to_float_var $9765 += $9795
$9766 = 1002.286
add_float_var_to_float_var $9766 += $9796
$9767 = 414.0564
add_float_var_to_float_var $9767 += $9794
$9768 = -18.7965
add_float_var_to_float_var $9768 += $9795
$9769 = 1001.955
add_float_var_to_float_var $9769 += $9796
$9770 = 412.649
add_float_var_to_float_var $9770 += $9794
$9771 = -19.7078
add_float_var_to_float_var $9771 += $9795
$9772 = 1001.992
add_float_var_to_float_var $9772 += $9796
$9773 = 413.3581
add_float_var_to_float_var $9773 += $9794
$9774 = -19.0046
add_float_var_to_float_var $9774 += $9795
$9775 = 1002.043
add_float_var_to_float_var $9775 += $9796
$9776 = 414.5509
add_float_var_to_float_var $9776 += $9794
$9777 = -20.8773
add_float_var_to_float_var $9777 += $9795
$9778 = 1001.405
add_float_var_to_float_var $9778 += $9796
$9779 = 414.0572
add_float_var_to_float_var $9779 += $9794
$9780 = -20.025
add_float_var_to_float_var $9780 += $9795
$9781 = 1001.578
add_float_var_to_float_var $9781 += $9796
$9782 = 412.5159
add_float_var_to_float_var $9782 += $9794
$9783 = -21.7447
add_float_var_to_float_var $9783 += $9795
$9784 = 1001.946
add_float_var_to_float_var $9784 += $9796
$9785 = 412.9438
add_float_var_to_float_var $9785 += $9794
$9786 = -20.8411
add_float_var_to_float_var $9786 += $9795
$9787 = 1001.963
add_float_var_to_float_var $9787 += $9796
$9788 = 411.957
add_float_var_to_float_var $9788 += $9794
$9789 = -19.779
add_float_var_to_float_var $9789 += $9795
$9790 = 1000.836
add_float_var_to_float_var $9790 += $9796
$9791 = 411.795
add_float_var_to_float_var $9791 += $9794
$9792 = -23.3
add_float_var_to_float_var $9792 += $9795
$9793 = 1000.836
add_float_var_to_float_var $9793 += $9796
Actor.Create($9731, PedType.CivMale, $SELLER_MODEL, $9745, $9746, $9747)
Actor.Angle($9731) = $9748
set_char_decision_maker $9731 decision_maker_to 65542
set_char_only_damaged_by_player $9731 immune_to_nonplayer 1
open_sequence_task $9737
task_play_anim_non_interruptable -1 perform_animation "BRB_IN" IFP "HAIRCUTS" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1
task_play_anim_non_interruptable -1 perform_animation "BRB_LOOP" IFP "HAIRCUTS" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1
close_sequence_task $9737
open_sequence_task $9751
task_go_straight_to_coord -1 goto_point $9788 $9789 $9790 mode 4 time 8000
task_go_straight_to_coord -1 goto_point $9791 $9792 $9793 mode 4 time 8000
task_achieve_heading -1 rotate_angle 180.0
close_sequence_task $9751
$9797 = 0
$9744 = 2

:BARB_2030
if 
  $9744 == 2
goto_if_false @BARB_2439
get_loaded_shop s$CURRENT_SHOP_GXT_NAME
if 
  not is_var_text_label_equal_to_text_label s$CURRENT_SHOP_GXT_NAME == s$9740
goto_if_false @BARB_2079
gosub @BARB_7498

 

 

AND else....

 

Bump

I wanna delete the yellow entrance by OPENED door ! Thanks !

Link to comment
Share on other sites

ArmanCan
11 hours ago, LOLtwentynight said:

Can you play with this script 

i can't but i can give you some hints..

The numbers which start with "$" are GLOBAL VARIABLES and thanks to OrionSR he prepared a sreadsheet to find out which variable represents a value or a function.. i'm copying his content below..

variables.thumb.JPG.c1c246e56c1b80d25f0b4e3f0ed2799b.JPG

 

11 hours ago, LOLtwentynight said:

set_var_int_to_constant $SELLER_MODEL = 156

"156" is a Model Number/ID..  You can find more information in this website below..

https://wiki.multitheftauto.com/wiki/All_Skins_Page

 

11 hours ago, LOLtwentynight said:

I wanna delete the yellow entrance by OPENED door ! Thanks !

Like i said you above "the yellow entrance"s.. more precisely the "Enex"s are in the maps folder.. For further explanations please check out these URLs below..

 

https://gtamods.com/wiki/ENEX

 

I would also like you to say that you should put your codes by clicking the "<>" button..🙂

Link to comment
Share on other sites

Posted (edited)

The Entrances with yellow triangle are done by Enex lines in the IPL files
read here about that method:

 

at gtamods.com/wiki
https://gtamods.com/wiki/ENEX

 

enex-documentation
https://gtaforums.com/topic/331835-san-andreas-enex-documentation/

 

example about enex modification

https://gtaforums.com/topic/996545-invisible-enex-inside-interior/


To modify or add or delete Enex entries requires to start a new game otherwise you will get buggy interior accesses


Note:
1.) The Enex's have names and these names are used to give the interior name to the game


2.) The "shopping" -Externscripts (Barber, Tattoo, Ammunation, Pizza, Burgershop, Bar, Disco, Stripclub..etc..)
only work when CJ comes by Enex to interior, so that the right interior name will be allocated

 

Here the INTMAN script checks the interior_name

:INTMAN_184
09E8: $1250 = actor $PLAYER_ACTOR active_interior
00D6: if
8038:   not $1250 == 0
004D: jump_if_false @INTMAN_2974
094B: v$Active_Interior_Name = get_active_interior_name_from_actor $PLAYER_ACTOR // 16-byte string

 

 

And here, the INTMAN script checks if CJ visits any of the barber shpos
and if yes, then it starts the external_script 62 (BARBER)

:INTMAN_2221
00D6: if or
08F9:   v$Active_Interior_Name == "BARBERS"
08F9:   v$Active_Interior_Name == "BARBER2"
08F9:   v$Active_Interior_Name == "BARBER3"
004D: jump_if_false @INTMAN_2339
0926: 1@ = external_script_status 62 (BARBER)
00D6: if 
0039: 1@ == 0
004D: jump_if_false @INTMAN_2339
08A9: load_external_script 62 (BARBER)
038B: load_requested_models
00D6: if 
08AB:   external_script 62 (BARBER) loaded
004D: jump_if_false @INTMAN_2339
0913: run_external_script 62 (BARBER)

 

 

And here the external_script 62 (BARBER) checks again for the interior_name
and only if CJ comes by Enex to interior, so that the right interior name will be allocated
can these checks be passed

:BARB_751
00D6: if 
0038: $9744 == 0
004D: jump_if_false @BARB_1015
00D6: if 
05AD:   s$Current_Shop_GXT_Name == 'BARBERS' // s$ == short // Friseur
004D: jump_if_false @BARB_851
0005: $9794 = 0.0
0005: $9795 = 0.0
0005: $9796 = 0.0
05A9: s$9740 = s$Current_Shop_GXT_Name // s$
075F: store_shopping_data_entries_number_to $9729
0004: $9797 = 0
0004: $9744 = 1

:BARB_851
00D6: if 
05AD:   s$Current_Shop_GXT_Name == 'BARBER2' // s$ == short // Friseur
004D: jump_if_false @BARB_933
0005: $9794 = 6.987
0005: $9795 = -61.401
0005: $9796 = 0.0
05A9: s$9740 = s$Current_Shop_GXT_Name // s$
075F: store_shopping_data_entries_number_to $9729
0004: $9797 = 0
0004: $9744 = 1

:BARB_933
00D6: if 
05AD:   s$Current_Shop_GXT_Name == 'BARBER3' // s$ == short // Friseur
004D: jump_if_false @BARB_1015
0005: $9794 = 0.371
0005: $9795 = -31.421
0005: $9796 = 0.0
05A9: s$9740 = s$Current_Shop_GXT_Name // s$
075F: store_shopping_data_entries_number_to $9729
0004: $9797 = 0
0004: $9744 = 1

:BARB_1015
00D6: if 
0038: $9744 == 1
004D: jump_if_false @BARB_2030

///
///

:BARB_2030
00D6: if 
0038: $9744 == 2
004D: jump_if_false @BARB_2439
07B0: get_active_shop_name_to s$Current_Shop_GXT_Name // s$
00D6: if 
85AD:   not s$Current_Shop_GXT_Name == s$9740 // s$ == short
004D: jump_if_false @BARB_2079
0050: gosub @BARB_7498

:BARB_2079
00D6: if 
8118:   not actor $9731 dead
004D: jump_if_false @BARB_2394
00D6: if 
0038: $2749 == 0
004D: jump_if_false @BARB_2342
00D6: if or
02E0:   actor $PLAYER_ACTOR firing_weapon
0457:   player $PLAYER_CHAR aiming_at_actor $9731
031D:   actor $9731 hit_by_weapon 57
004D: jump_if_false @BARB_2181
0647: AS_actor $9731 clear_look_task
0947: actor $9731 speak_from_audio_table 327 store_spoken_phrase_id_to $10081
05C4: AS_actor $9731 hands_up -2 ms
0004: $2749 = 1
0002: jump @BARB_2335

:BARB_2181
00D6: if 
0038: $9802 == 0
004D: jump_if_false @BARB_2250
077E: get_active_interior_to $9803
00D6: if 
8038:   not $9803 == 0
004D: jump_if_false @BARB_2250
05BF: AS_actor $9731 look_at_actor $PLAYER_ACTOR -2 ms
0947: actor $9731 speak_from_audio_table 330 store_spoken_phrase_id_to $10081
0004: $9802 = 1

:BARB_2250
0004: $Show_Shop_Sphere = 1
00D6: if 
0102:   actor $PLAYER_ACTOR in_sphere $X_Buy_Marker $Y_Buy_Marker $Z_Buy_Marker radius 1.0 1.0 4.0 sphere $Show_Shop_Sphere stopped_on_foot
004D: jump_if_false @BARB_2335
00D6: if 
03EE:   player $PLAYER_CHAR controllable
004D: jump_if_false @BARB_2335
0647: AS_actor $9731 clear_look_task
0004: $9797 = 0
0004: $9744 = 3

:BARB_2335
0002: jump @BARB_2387

:BARB_2342
0050: gosub @BARB_7292
07B0: get_active_shop_name_to s$Current_Shop_GXT_Name // s$
00D6: if 
85AD:   not s$Current_Shop_GXT_Name == s$9740 // s$ == short
004D: jump_if_false @BARB_2380
0050: gosub @BARB_7498

:BARB_2380
0002: jump @BARB_653

:BARB_2387
0002: jump @BARB_2439

:BARB_2394
0050: gosub @BARB_7292
07B0: get_active_shop_name_to s$Current_Shop_GXT_Name // s$
00D6: if 
85AD:   not s$Current_Shop_GXT_Name == s$9740 // s$ == short
004D: jump_if_false @BARB_2432
0050: gosub @BARB_7498

:BARB_2432
0002: jump @BARB_653

:BARB_2439
00D6: if 
0038: $9744 == 3
004D: jump_if_false @BARB_2537
01B4: set_player $PLAYER_CHAR can_move 0
09BD: allow_other_scripts_to_display_text_boxes 1
0581: enable_radar 0
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0
00A0: store_actor $PLAYER_ACTOR position_to $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord
0792: disembark_instantly_actor $PLAYER_ACTOR
0395: clear_area 1 at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord radius 1.0
0006: TIMERA = 0
0004: $9797 = 0
0004: $9744 = 4

:BARB_2537
00D6: if 
0038: $9744 == 4
004D: jump_if_false @BARB_2925
00D6: if 
0118:   actor $9731 dead
004D: jump_if_false @BARB_2616
0050: gosub @BARB_7292
07B0: get_active_shop_name_to s$Current_Shop_GXT_Name // s$
00D6: if 
85AD:   not s$Current_Shop_GXT_Name == s$9740 // s$ == short
004D: jump_if_false @BARB_2609
0050: gosub @BARB_7498

:BARB_2609
0002: jump @BARB_653

 

 

 

 

Summery:
To make the barber script working for a custom shop by visiting without Enex
requires

1.) to modify the barber script, it needs to change the checks for interior names with location checks for xyz coords

2.) a custom script that starts the barber script

 

 

 

 

 

Edited by ZAZ
Link to comment
Share on other sites

LOLtwentynight

Hello Mr ZAZ 

Can you make this Script ? 

!Thanks!

Link to comment
Share on other sites

3 hours ago, LOLtwentynight said:

I need this script for my Mods

which mods? what should it be?

Link to comment
Share on other sites

14 hours ago, LOLtwentynight said:

By the way your GTASA_Strippedmain_mit_Externscripts doesn't work with cleo plus

I haven't tested with cleo plus, but i know that it is buggy when i load it by modloader

so don't put in in modloader folder, but replace always main.scm inside script folder

 

 

Quote

For me as a beginner modder

help

It can be done as simple thread inside main part of main.scm
This would be the easiest job for me: A total stripped main with only the barber script

 

Or a total stripped main with only barber script as extern script and the starter script

 

Or a stripped main with Extern scripts with barber script that replace the originally barber script

Or a stripped main with Extern scripts with barber script as extension of the originally barber script

 

Or a stripped main with Extern scripts and submissions with barber script that replace the originally barber script

Or a stripped main with Extern scripts and submissions with barber script as extension of the originally barber script

 

Or originally main.scm with barber script that replace the originally barber script
Or originally main.scm with barber script as extension of the originally barber script

 

No matter in which way, existing savegames can't be used anymore

 

 

Link to comment
Share on other sites

LOLtwentynight

I need the stripped main with extern scripts with barber script that replace the originally barber script

Thanks a lot

Can you fix it that it works with cleo plus too

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.