Napisano dnia: 2010-12-22 16:19:38
Zacząłem sobie robić taki pomocnik skryptera gdzie po wciśnięciu jakiegoś klawisza pojawia się menu i z niego można wybrać np. że spawnuje się postać w pojeździe tam gdzie stoi. Na razie mam coś takiego.
Problem jest w tym że do tego menu można dodać tyko siedem pozycji. Więc jak zrobić żeby można było dodać ich więcej?
Kod:
:Klawisz
wait 0
if
00E1: player 0 pressed_key 4
jf @Klawisz
08D4: $Panel = create_panel_with_title 'TXT1' position 29.0 145.0 width 200.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $Panel column 0 header 'DUMMY' data 'TXT2' 'TXT3' 'TXT4' 'TXT5' 'TXT6' 'TXT7' 'TXT8' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
Player.CanMove($PLAYER_CHAR) = False
:czekaj_na_wybor
wait 0
if
00E1: player $PLAYER_CHAR pressed_key 15
jf @czekaj_na_wybor_test2
:wyjdz
00E1: player $PLAYER_CHAR pressed_key 15
08DA: remove_panel $Panel
03E6: remove_text_box
Player.CanMove($PLAYER_CHAR) = True
jump @Klawisz
:czekaj_na_wybor_test2
if
00E1: player $PLAYER_CHAR pressed_key 16
jf @czekaj_na_wybor
00E1: player $PLAYER_CHAR pressed_key 15
08D7: $Wybrane = panel $Panel active_row
08DA: remove_panel $Panel
03E6: remove_text_box
0871: init_jump_table $Wybrane total_jumps 7 1 @wyjdz jumps 0 @wybrane1 1 @wybrane2 2 @wybrane3 3 @wybrane4 4 @wybrane5 5 @wybrane6 6 @wybrane7
//==================================================
:wybrane1
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
3@ += 80.0
0@ = Car.Create(#hydra, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane2
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#peren, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane3
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#sentinel, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane4
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#stretch, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane5
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#moonbeam, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane6
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#taxi, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane7
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#washing, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
wait 0
if
00E1: player 0 pressed_key 4
jf @Klawisz
08D4: $Panel = create_panel_with_title 'TXT1' position 29.0 145.0 width 200.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $Panel column 0 header 'DUMMY' data 'TXT2' 'TXT3' 'TXT4' 'TXT5' 'TXT6' 'TXT7' 'TXT8' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
Player.CanMove($PLAYER_CHAR) = False
:czekaj_na_wybor
wait 0
if
00E1: player $PLAYER_CHAR pressed_key 15
jf @czekaj_na_wybor_test2
:wyjdz
00E1: player $PLAYER_CHAR pressed_key 15
08DA: remove_panel $Panel
03E6: remove_text_box
Player.CanMove($PLAYER_CHAR) = True
jump @Klawisz
:czekaj_na_wybor_test2
if
00E1: player $PLAYER_CHAR pressed_key 16
jf @czekaj_na_wybor
00E1: player $PLAYER_CHAR pressed_key 15
08D7: $Wybrane = panel $Panel active_row
08DA: remove_panel $Panel
03E6: remove_text_box
0871: init_jump_table $Wybrane total_jumps 7 1 @wyjdz jumps 0 @wybrane1 1 @wybrane2 2 @wybrane3 3 @wybrane4 4 @wybrane5 5 @wybrane6 6 @wybrane7
//==================================================
:wybrane1
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
3@ += 80.0
0@ = Car.Create(#hydra, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane2
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#peren, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane3
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#sentinel, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane4
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#stretch, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane5
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#moonbeam, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane6
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#taxi, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
//==================================================
:wybrane7
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
1@ += 0.0
2@ += 0.0
0@ = Car.Create(#washing, 1@, 2@, 3@)
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
02EB: restore_camera_with_jumpcut
jump @wyjdz
Problem jest w tym że do tego menu można dodać tyko siedem pozycji. Więc jak zrobić żeby można było dodać ich więcej?