#1 02-06-2009 09:14

JNikc
From: SPB
Registered: 27-05-2009
Posts: 22

Ещё несколько несложных скриптов ;-)

Этот скрипт позволяет открывать/закрывать парочку гаражей в SF - рядом с домом Wusi, где были "китайские" миссии и гараж на стройке - тот самый главный гараж в СФ, где было много роликов. Достаточно подойти/подьехать нажать Y/N... Правда внутри главного гаража не загружены текстуры, но где-то был мод (мааленький), который это делает.

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 

:CH
wait 0 
if
   Player.Defined($PLAYER_CHAR)
jf @CH 

:CJ
wait 0 
if
  00EC: actor $PLAYER_ACTOR 0 near_point -2033.3815 178.6355 28.8429 radius 10.0 10.0
jf @WUSI 

jump @CJPRESS1

:WUSI
wait 0 
if
  00EC: actor $PLAYER_ACTOR 0 near_point -2161.6111 654.6792 52.3672 radius 10.0 10.0
jf @CH 

jump @WUSIPRESS1

:CJPRESS1
wait 0 
if 
   0AB0:   key_pressed 89       // Y
jf @CJPRESS2 
jump @CJOPEN

:CJPRESS2
wait 0 
if 
   0AB0:   key_pressed 78       // N
jf @CH 
jump @CJCLOSE

:CJOPEN
wait 0 
garage.Activate('HBGDSFS')
garage.Open('HBGDSFS')
jump @CH

:CJCLOSE
wait 0 
garage.Close('HBGDSFS')
garage.Deactivate('HBGDSFS') 
jump @CH

:WUSIPRESS1
wait 0 
if 
   0AB0:   key_pressed 89       // Y
jf @WUSIPRESS2 
jump @WUSIOPEN

:WUSIPRESS2
wait 0 
if 
   0AB0:   key_pressed 78       // N
jf @CH 
jump @WUSICLOSE

:WUSIOPEN
wait 0 
garage.Activate('FDORSFE')// - Активирует гараж
garage.Open('FDORSFE')// - Открывает гараж
jump @CH

:WUSICLOSE
wait 0 
garage.Close('FDORSFE') //- Закрывает
garage.Deactivate('FDORSFE') // - Деактивирует
jump @CH

Offline

#2 02-06-2009 09:17

JNikc
From: SPB
Registered: 27-05-2009
Posts: 22

Re: Ещё несколько несложных скриптов ;-)

По нажатию F-клавишь, превращаемся, не хватает только дыма и огня...

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
thread 'REVOLVE' 

:CH
wait 0 
if AND
   Player.Defined($PLAYER_CHAR)
   not Actor.Driving($PLAYER_ACTOR)
jf @CH 

:REVOLVE1
wait 0 
if 
0AB0:   key_pressed 116   //f5
jf @REVOLVE2 

jump @FAM1

:REVOLVE2
wait 0 
if 
0AB0:   key_pressed 117    //f6
jf @REVOLVE3 

jump @FAM2

:REVOLVE3
wait 0 
if 
0AB0:   key_pressed 118    //f7
jf @REVOLVE4 

jump @FAM3

:REVOLVE4
wait 0 
if 
0AB0:   key_pressed 119    //f8
jf @REVOLVE5 

jump @SOM

:REVOLVE5
wait 0 
if 
0AB0:   key_pressed 115    //f4
jf @REVOLVE6 

jump @CJM

:REVOLVE6
wait 0 
if 
0AB0:   key_pressed 120    //f9
jf @REVOLVE7 

jump @MADDOG

:REVOLVE7
wait 0 
if 
0AB0:   key_pressed 121    //f10
jf @REVOLVE1 

jump @WUZI

:FAM1
wait 0
Model.Load(#FAM1)
038B: load_requested_models
:FAM1_1
wait 0 
if 
   Model.Available(#FAM1)
jf @FAM1_1 
09C7: change_player $PLAYER_CHAR model_to #FAM1 
Model.Destroy(#FAM1)
jump @CH   

:FAM2
wait 0
Model.Load(#FAM2)
038B: load_requested_models
:FAM2_1
wait 0 
if 
   Model.Available(#FAM2)
jf @FAM2_1 
09C7: change_player $PLAYER_CHAR model_to #FAM2
Model.Destroy(#FAM2)
jump @CH   

:FAM3
wait 0
Model.Load(#FAM3)
038B: load_requested_models
:FAM3_1
wait 0 
if 
   Model.Available(#FAM3)
jf @FAM3_1 
09C7: change_player $PLAYER_CHAR model_to #FAM3 
Model.Destroy(#FAM3)
jump @CH   

:SOM
wait 0
Model.Load(#SOMYRI)
038B: load_requested_models
:SOM_1
wait 0 
if 
   Model.Available(#SOMYRI)
jf @SOM_1 
09C7: change_player $PLAYER_CHAR model_to #SOMYRI 
player.ClearWantedLevel($PLAYER_CHAR)
Model.Destroy(#SOMYRI)
jump @CH   

:CJM
wait 0
Model.Load(#null)
038B: load_requested_models
:CJM_1
wait 0 
if 
   Model.Available(#null)
jf @CJM_1 
09C7: change_player $PLAYER_CHAR model_to #null 
Model.Destroy(#null)
jump @CH    

:MADDOG 
wait 0  
023c: request_special_actor 'maddogg' as 1 
038b: load requested models 
:MADDOG1 
wait 0  
if 
  023d:  special_actor 1 loaded 
jf @MADDOG1
09C7: change_player $PLAYER_CHAR model_to #special01
0296: unload_special_actor 1 
jump @CH 

:WUZI 
wait 0  
023c: request_special_actor 'wuzimu' as 1
038b: load requested models  
:WUZI1 
wait 0  
if 
  023d:  special_actor 1 loaded 
jf @WUZI1 
09C7: change_player $PLAYER_CHAR model_to #special01
0296: unload_special_actor 1 
jump @CH

Еслиб это работал под MP:..

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 

:CH
wait 0 
if
   Player.Defined($PLAYER_CHAR)
jf @CH 

:PRESS
wait 0 
if 
   0AB0:   key_pressed 49       // 1
jf @PRESS 

04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 30.0 0.0 
0948: create_explosion_at 1@ 2@ 3@ type 6 camera_shake 1
0565: create_soundless_explosion_at 1@ 2@ 3@ type 6
wait 100
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 30.0 0.0 0.0 
0948: create_explosion_at 1@ 2@ 3@ type 6 camera_shake 1
0565: create_soundless_explosion_at 1@ 2@ 3@ type 6
wait 100
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset -30.0 0.0 0.0 
0948: create_explosion_at 1@ 2@ 3@ type 6 camera_shake 1
0565: create_soundless_explosion_at 1@ 2@ 3@ type 6
wait 100
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 -30.0 0.0 
0948: create_explosion_at 1@ 2@ 3@ type 6 camera_shake 1
0565: create_soundless_explosion_at 1@ 2@ 3@ type 6
wait 100
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 25.0 25.0 0.0 
0948: create_explosion_at 1@ 2@ 3@ type 6 camera_shake 1
0565: create_soundless_explosion_at 1@ 2@ 3@ type 6
wait 100
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset -25.0 -25.0 0.0 
0948: create_explosion_at 1@ 2@ 3@ type 6 camera_shake 1
0565: create_soundless_explosion_at 1@ 2@ 3@ type 6
wait 100
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 25.0 -25.0 0.0 
0948: create_explosion_at 1@ 2@ 3@ type 6 camera_shake 1
0565: create_soundless_explosion_at 1@ 2@ 3@ type 6
wait 100
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset -25.0 25.0 0.0 
0948: create_explosion_at 1@ 2@ 3@ type 6 camera_shake 1
0565: create_soundless_explosion_at 1@ 2@ 3@ type 6
jump @CH

Last edited by JNikc (02-06-2009 09:19)

Offline

Board footer

Powered by FluxBB