Napisano dnia: 2013-05-20 01:28:27
Siemanko. Ostatnio naszła mnie chęć zagrania w GTA SA. Postanowiłem przejść je, tylko potrzebowałem jakiegoś skryptu na samochód. No i naszła mnie chęć zrobienia go. :D
Na podstawie skryptu "Call homies" zrobiłem tako o to sklejkę:
Kod działa, ale pod koniec jest usuwanie i ono nie działa tak jakbym chciał. Chciałbym, żeby jak gracz siedzi w tym nrg to nie może go usunąć, bo jak go usuwa to go zabija. Pomoże ktoś?
Na podstawie skryptu "Call homies" zrobiłem tako o to sklejkę:
Kod:
{$CLEO .cs}
thread 'NRG'
0005: $Radius_X = 20.0
0005: $Radius_Y = 20.0
:LOAD
04ED: load_animation "CAR_CHAT" // Animacje w samochodzie
0247: load_model #CELLPHONE // Telefon
0247: load_model 105 // Homie #1
0247: load_model 522 // NRG
:LOAD_CHECK
wait 10
if and
04EE: animation "CAR_CHAT" loaded
0248: model #CELLPHONE available
0248: model 105 available
0248: model 522 available
jf @LOAD_CHECK
:NRG_1
wait 10
if
Player.Defined($PLAYER_CHAR)
jf @NRG_1
:NRG_2
wait 10
if
0AB0: key_pressed 0x78
jf @NRG_1
:NRG_3
wait 10
if
0A32: unknown_actor $PLAYER_ACTOR in_car
jf @NRG_6
0107: $phone = create_object #CELLPHONE at 0.0 0.0 0.0
070A: unknown_action_sequence $PLAYER_ACTOR $phone 0.0 0.0 0.0 6 16 "NULL" "NULL" 0
0605: actor $PLAYER_ACTOR perform_animation_sequence "carfone_in" IFP_file "CAR_CHAT" 4.0 loop 0 0 0 0 time -1
:NRG_4
wait 0
if
8611: not actor $PLAYER_ACTOR performing_animation "carfone_in"
jf @NRG_4
0605: actor $PLAYER_ACTOR perform_animation_sequence "carfone_loopA" IFP_file "CAR_CHAT" 4.0 loop 0 0 0 0 time 2000
wait 2000
0605: actor $PLAYER_ACTOR perform_animation_sequence "carfone_out" IFP_file "CAR_CHAT" 4.0 loop 0 0 0 0 time -1
:NRG_5
wait 0
if
8611: not actor $PLAYER_ACTOR performing_animation "carfone_out"
jf @NRG_5
jump @NRG_6
:NRG_6
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
wait 2000
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
00A0: store_actor $PLAYER_ACTOR position_to $Player_X $Player_Y $Player_Z
0009: $Player_X += 2.0
00A5: $NRG_Car = create_car 522 at $Player_X $Player_Y $Player_Z
:NRG_PRESS2
wait 0
if
0AB0: key_pressed 0x7A
jf @NRG_PRESS2
:NRG_CAR
wait 10
if
0A32: unknown_actor $PLAYER_ACTOR in_car
jf @NRG_DEL
jump @NRG_PRESS2
:NRG_DEL
wait 10
if
00A6: destroy_car $NRG_Car
jf jump @NRG_1
jump @NRG_1
:NOP
0000: NOP
0A93: end_custom_thread
thread 'NRG'
0005: $Radius_X = 20.0
0005: $Radius_Y = 20.0
:LOAD
04ED: load_animation "CAR_CHAT" // Animacje w samochodzie
0247: load_model #CELLPHONE // Telefon
0247: load_model 105 // Homie #1
0247: load_model 522 // NRG
:LOAD_CHECK
wait 10
if and
04EE: animation "CAR_CHAT" loaded
0248: model #CELLPHONE available
0248: model 105 available
0248: model 522 available
jf @LOAD_CHECK
:NRG_1
wait 10
if
Player.Defined($PLAYER_CHAR)
jf @NRG_1
:NRG_2
wait 10
if
0AB0: key_pressed 0x78
jf @NRG_1
:NRG_3
wait 10
if
0A32: unknown_actor $PLAYER_ACTOR in_car
jf @NRG_6
0107: $phone = create_object #CELLPHONE at 0.0 0.0 0.0
070A: unknown_action_sequence $PLAYER_ACTOR $phone 0.0 0.0 0.0 6 16 "NULL" "NULL" 0
0605: actor $PLAYER_ACTOR perform_animation_sequence "carfone_in" IFP_file "CAR_CHAT" 4.0 loop 0 0 0 0 time -1
:NRG_4
wait 0
if
8611: not actor $PLAYER_ACTOR performing_animation "carfone_in"
jf @NRG_4
0605: actor $PLAYER_ACTOR perform_animation_sequence "carfone_loopA" IFP_file "CAR_CHAT" 4.0 loop 0 0 0 0 time 2000
wait 2000
0605: actor $PLAYER_ACTOR perform_animation_sequence "carfone_out" IFP_file "CAR_CHAT" 4.0 loop 0 0 0 0 time -1
:NRG_5
wait 0
if
8611: not actor $PLAYER_ACTOR performing_animation "carfone_out"
jf @NRG_5
jump @NRG_6
:NRG_6
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
wait 2000
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
00A0: store_actor $PLAYER_ACTOR position_to $Player_X $Player_Y $Player_Z
0009: $Player_X += 2.0
00A5: $NRG_Car = create_car 522 at $Player_X $Player_Y $Player_Z
:NRG_PRESS2
wait 0
if
0AB0: key_pressed 0x7A
jf @NRG_PRESS2
:NRG_CAR
wait 10
if
0A32: unknown_actor $PLAYER_ACTOR in_car
jf @NRG_DEL
jump @NRG_PRESS2
:NRG_DEL
wait 10
if
00A6: destroy_car $NRG_Car
jf jump @NRG_1
jump @NRG_1
:NOP
0000: NOP
0A93: end_custom_thread
Kod działa, ale pod koniec jest usuwanie i ono nie działa tak jakbym chciał. Chciałbym, żeby jak gracz siedzi w tym nrg to nie może go usunąć, bo jak go usuwa to go zabija. Pomoże ktoś?