[GTAF进口]在main.scm中腾出额外空间(for SA)
原帖地址 http://www.gtaforums.com/index.php?showtopic=319816在main.scm中腾出额外空间(for SA)原帖作者/ Rapier @GTAF 翻译/ kwanz @虚拟世界
未经许可 谢绝转载
本教程将演示如何在游戏主线程中腾出额外的空间,以便你在不删除原版脚本实现的任何内容的前提下添加自己的mod。只需要经过以下步骤(以SB编程为例):
·找到这几行并删掉
...
jump @MAIN_177
$SECOND_PLAYER = Player.Create(#CSPLAY, 2488.562, -1666.865, 12.8757)
:MAIN_177
...
...
jump @MAIN_1969
$MARKER_EMMETS_GUN = Marker.CreateIconWithoutSphere(18, 2447.364, -1974.496, 12.5469)
$MARKER_IDLEWOOD_BARBER = Marker.CreateIconWithoutSphere(7, 2070.27, -1791.092, 17.1484)
$MARKER_IDLEWOOD_PIZZERIA = Marker.CreateIconWithoutSphere(29, 2107.624, -1807.516, 21.2114)
$MARKER_GANTON_CLOTHES_SHOP = Marker.CreateIconWithoutSphere(45, 2243.807, -1668.567, 20.0313)
$439 = Marker.CreateIconAndSphere($ICON_CJ, $X_JOHNSON_HOUSE, $Y_JOHNSON_HOUSE, $Z_JOHNSON_HOUSE)
$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere($ICON_SWEET, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)
$436 = Marker.CreateIconAndSphere($ICON_RYDER, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)
$434 = Marker.CreateIconAndSphere($ICON_BIG_DMOKE, $X_BIG_SMOKE_HOUSE, $Y_BIG_SMOKE_HOUSE, $Z_BIG_SMOKE_HOUSE)
$437 = Marker.CreateIconAndSphere($ICON_OG_LOC, $X_OG_LOC_WORK, $Y_OG_LOC_WORK, $Z_OG_LOC_WORK)
$MARKER_CRASH_LS = Marker.CreateIconAndSphere($ICON_CRASH, $X_CRASH_LS, $Y_CRASH_LS, $Z_CRASH_LS)
$MARKER_CESAR_LS = Marker.CreateIconAndSphere($ICON_CESAR, $X_CESAR_HOUSE, $Y_CESAR_HOUSE, $Z_CESAR_HOUSE)
$484 = Marker.CreateIconAndSphere($ICON_CRASH, $X_ANGEL_PINE, $Y_ANGEL_PINE, $Z_ANGEL_PINE)
$MARKER_CATALINA = Marker.CreateIconAndSphere($ICON_CATALINA, $X_CATALINA_HOUSE, $Y_CATALINA_HOUSE, $Z_CATALINA_HOUSE)
$MARKER_TRUTH_FARM = Marker.CreateIconAndSphere($ICON_TRUTH, $X_TRUTH_FARM, $Y_TRUTH_FARM, $Z_TRUTH_FARM)
$MARKER_CESAR_MONTGOMERY = Marker.CreateIconAndSphere($ICON_CESAR, $X_MONTGOMERY, $Y_MONTGOMERY, $Z_MONTGOMERY)
$532 = Marker.CreateIconAndSphere($ICON_CRASH, $X_SF_GARAGE, $Y_SF_GARAGE, $Z_SF_GARAGE)
$524 = Marker.CreateIconAndSphere($ICON_WOOZIE, $X_WOOZIE_HOUSE, $Y_WOOZIE_HOUSE, $Z_WOOZIE_HOUSE)
$527 = Marker.CreateIconAndSphere($ICON_ZERO, $X_ZERO_RC_SHOP, $Y_ZERO_RC_SHOP, $Z_ZERO_RC_SHOP)
$525 = Marker.CreateIconAndSphere($ICON_CESAR_2, $X_SF_GARAGE_2, $Y_SF_GARAGE_2, $Z_SF_GARAGE_2)
$MARKER_TRIADS_SF_GARAGE = Marker.CreateIconAndSphere($ICON_TRIADS, $X_SF_GARAGE, $Y_SF_GARAGE, $Z_SF_GARAGE)
$526 = Marker.CreateIconAndSphere($ICON_CRASH, $X_JIZZY_CLUB, $Y_JIZZY_CLUB, $Z_JIZZY_CLUB)
$528 = Marker.CreateIconAndSphere($ICON_RACE, $X_DRIVING_SCHOOL, $Y_DRIVING_SCHOOL, $Z_DRIVING_SCHOOL)
$540 = Marker.CreateIconAndSphere($ICON_RACE, $X_DRIVING_SCHOOL, $Y_DRIVING_SCHOOL, $Z_DRIVING_SCHOOL)
$580 = Marker.CreateIconAndSphere($ICON_TORENO, $X_TIERRA_ROBADA_RANCH, $Y_TIERRA_ROBADA_RANCH, $Z_TIERRA_ROBADA_RANCH)
$581 = Marker.CreateIconAndSphere($ICON_AIRYARD, $X_OLD_AIRPORT, $Y_OLD_AIRPORT, $Z_OLD_AIRPORT)
$582 = Marker.CreateIconAndSphere($ICON_TRIADS_CASINO, $X_THE_FOUR_DRAGONS_CASINO, $Y_THE_FOUR_DRAGONS_CASINO, $Z_THE_FOUR_DRAGONS_CASINO)
$595 = Marker.CreateIconAndSphere($ICON_CASH, $X_THE_FOUR_DRAGONS_CASINO_2, $Y_THE_FOUR_DRAGONS_CASINO_2, $Z_THE_FOUR_DRAGONS_CASINO_2)
$584 = Marker.CreateIconAndSphere($ICON_MADDOG, $X_ROYAL_CASINO, $Y_ROYAL_CASINO, $Z_ROYAL_CASINO)
$583 = Marker.CreateIconAndSphere($ICON_CRASH, $X_PRICKLE_PINE_LV, $Y_PRICKLE_PINE_LV, $Z_PRICKLE_PINE_LV)
$585 = Marker.CreateIconAndSphere($ICON_MAFIA_CASINO, $X_CALIGULA_PALACE, $Y_CALIGULA_PALACE, $Z_CALIGULA_PALACE)
$622 = Marker.CreateIconAndSphere($ICON_CJ_2, $X_MADD_DOGG_CRIB, $Y_MADD_DOGG_CRIB, $Z_MADD_DOGG_CRIB)
$623 = Marker.CreateIconAndSphere($ICON_CJ_2, $X_MADD_DOGG_CRIB, $Y_MADD_DOGG_CRIB, $Z_MADD_DOGG_CRIB)
$MARKER_PILOT_SCHOOL = Marker.CreateIconAndSphere($ICON_SCHOOL, $666, $667, $668)
$596 = Marker.CreateIconAndSphere(36, -2031.2, -118.0, 34.3)
0570: $630 = create_asset_radar_marker_with_icon 36 at $2367 $2368 $2369
0570: $632 = create_asset_radar_marker_with_icon 36 at $2367 $2368 $2369
$LSGYM_ICON = Marker.CreateIconAndSphere($ICON_SWEET, 2228.0, -1722.811, 12.5543)
0570: $1722 = create_asset_radar_marker_with_icon 35 at $SAVE_PICKUPS_X $SAVE_PICKUPS_Y $SAVE_PICKUPS_Z
0570: $MARKER_QUARRY_MISSION = create_asset_radar_marker_with_icon 11 at $2352 $2353 $2354
$2588 = Marker.CreateIconWithoutSphere(27, -2728.5, 212.2, 3.4)
$2589 = Marker.CreateIconWithoutSphere(27, -2728.5, 212.2, 3.4)
$MARKER_WANG_CARS = Marker.CreateIconAndSphere(31, $X_PROPERTY_TO_BUY, $Y_PROPERTY_TO_BUY, $Z_PROPERTY_TO_BUY)
$527 = Marker.CreateIconAndSphere(31, $X_PROPERTY_TO_BUY, $Y_PROPERTY_TO_BUY, $Z_PROPERTY_TO_BUY)
$55 = Marker.CreateIconAndSphere(31, $X_PROPERTY_TO_BUY, $Y_PROPERTY_TO_BUY, $Z_PROPERTY_TO_BUY)
$MARKER_TRUCKING_MISSION = Marker.CreateIconWithoutSphere(51, $2373, $2374, $2375)
04A6: $GS_GANG_MONEY_PICKUP = create_asset_money_pickup_at 2508.359 -1676.538 12.579 money 10000 $GS_GANG_CASH
$PICKUP_KEYCARD = Pickup.Create(#KEYCARD, 3, 0.0, 0.0, 0.0)
$1415 = Marker.CreateIconAndSphere($ICON_CASH, 2035.724, 2727.96, 9.8281)
0517: $BUY_ASSET_PICKUPS = create_unavailable_asset_pickup 'PROP_4' at $X_PROPERTY_TO_BUY $Y_PROPERTY_TO_BUY $Z_PROPERTY_TO_BUY// You cannot buy this property yet.
0517: $BUY_ASSET_PICKUPS = create_unavailable_asset_pickup 'PROP_4' at $X_PROPERTY_TO_BUY $Y_PROPERTY_TO_BUY $Z_PROPERTY_TO_BUY// You cannot buy this property yet.
0517: $BUY_ASSET_PICKUPS = create_unavailable_asset_pickup 'PROP_4' at $X_PROPERTY_TO_BUY $Y_PROPERTY_TO_BUY $Z_PROPERTY_TO_BUY// You cannot buy this property yet.
$2706 = Object.Create(#AD_FLATDOOR, 1833.36, -1995.45, 12.5)
$2707 = Object.Create(#AD_FLATDOOR, 1819.81, -1994.66, 12.5)
$2708 = Object.Create(#AD_FLATDOOR, 1827.68, -1980.0, 12.5)
$2709 = Object.Create(#AD_FLATDOOR, 1851.84, -1990.67, 12.5)
$2710 = Object.Create(#AD_FLATDOOR, 1867.29, -1984.96, 12.5)
$2711 = Object.Create(#AD_FLATDOOR, 1866.52, -1998.53, 12.5)
$2712 = Object.Create(#AD_FLATDOOR, 1899.75, -1984.95, 12.5)
$2713 = Object.Create(#AD_FLATDOOR, 1914.39, -1992.82, 12.5)
$2714 = Object.Create(#AD_FLATDOOR, 1899.01, -1998.5, 12.5)
$2715 = Object.Create(#AD_FLATDOOR, 1900.89, -2020.11, 12.5)
$2716 = Object.Create(#AD_FLATDOOR, 1914.4, -2020.91, 12.5)
$2717 = Object.Create(#AD_FLATDOOR, 1906.54, -2035.52, 12.5)
0662: write_debug_message "AAAAAAAAA"
:MAIN_1969
...
·类似这样的线程均可删除
...
create_thread_wb @NONAME_1
...
:NONAME_1
end_thread
...
·永远不会用到的语句
...
end_thread
return// 删掉这行
...
...
return
return // 删掉这行
...
...
return
jump @GFAGNT_1137 // 删掉这行
...
...
jump @APCHECK_1777
end_thread // 删掉这行
...
...
jump @HJ_15
return // 删掉这行
... 额 不懂 好短啊 。。。邪恶了 你得来长的,,,
代码狂怎能搞的啊 LZ目测发力中!!!!!! 这些代码看了下,有些事return,那不是循环么 peace 发表于 2012-4-10 23:09
这些代码看了下,有些事return,那不是循环么
嗯是的
所以紧接着两个的跳转语句后一个就没用了 kwanz 发表于 2012-4-11 00:20 static/image/common/back.gif
嗯是的
所以紧接着两个的跳转语句后一个就没用了
话说这个RETURN到底是做什么用的?很多CLEO里在结尾处都会写这个,是重新回到开头重新执行CLEO的指令
? peace 发表于 2012-4-11 00:37
话说这个RETURN到底是做什么用的?很多CLEO里在结尾处都会写这个,是重新回到开头重新执行CLEO的指令
?
目测是的
SB帮助里说return_if_false基本等于jf
但问题是return是不带参的。。。。
页:
[1]