Czy wiesz, że... rejestracja trwa tylko 20 sekund?
Strona główna forum Szukaj Rejestracja
Witaj, nieznajomy!
Poprzedni 1 Następny
Postów: 14 Dołączył: 2011-01-11
#
Hejka mam takie pytanie jaki wpisac kod żeby podczas misji jak wyjdzie się z auta pokazywał sie znacznik nad autem i na radarze i tekst na dole ekranu żeby wrócic do auta?
Postów: 1004 Dołączył: 2009-01-20
#
To trzeba stworzyć pętle która sprawdza czy postać nie jest poza pojazdem. Po niżej masz mały przykład.
Kod:
{$VERSION 3.1.0027}
{$CLEO .cs}

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

0247: load_model #ADMIRAL

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

0@= Car.Create(#ADMIRAL, -2122.8486, -2494.0718, 30.625)
Car.Angle(0@) = 226.7219

:a2
wait 0
if
Actor.InCar($PLAYER_ACTOR, 0@)
jf @a2

:a3
wait 0
if
 not Actor.InCar($PLAYER_ACTOR, 0@)
jf @a3
00BC: show_text_highpriority GXT 'TXT1' time 4000 flag 1
jump @a2

0A93: end_custom_thread 
Postów: 878 Dołączył: 2009-01-20
#
Kod:
0186: 10@ = create_marker_above_car 0@

a tym tworzysz marker nad samochodem.

Jeśli chcesz, żeby był koloru niebieskiego, to dopisz:
Kod:
07E0: set_marker 10@ type_to 1

___________________
Administrator
Postów: 14 Dołączył: 2011-01-11
#
nie moge sobie z tym poradzic (jestem początkujący)Może ktoś za mnie wprowadzic ten kod? żeby po wyjściu z auta pokazywał się napis żeby wrocic i żeby znacznik pokazywał się nad autem i żeby wtedy na radarze też pokazywała się lokalizacja auta. Bardzo o to proszę

Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
DEFINE OBJECTS 1
DEFINE OBJECT SANNY BUILDER 3.04      

DEFINE MISSIONS 1
DEFINE MISSION 0 AT @MISJA             // Initial 1

DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script

DEFINE UNKNOWN_EMPTY_SEGMENT 0

DEFINE UNKNOWN_THREADS_MEMORY 0

{$VERSION 3.1.0027}

//-------------MAIN---------------
thread 'MAIN' 
set_weather 3 
00C0: set_current_time_hours_to 2 minutes_to 0 
01F0: set_max_wanted_level_to 6 
$PLAYER_CHAR = Player.Create(#NULL, 0.0, 0.0, 0.0)
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)
Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)
Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)
Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)
Player.Build($PLAYER_CHAR)
Player.CanMove($PLAYER_CHAR) = True
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 
016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 
fade 1 0 
start_mission 0  // Initial 1
end_thread 

//-------------Mission 0---------------
// Originally: Initial 1

:MISJA
thread 'MISJA' 
Model.Load(#GREENWOO)
038B: load_requested_models 
$WOZ = Car.Create(#GREENWOO, 2795.809, -2344.057, 13.37836)
Car.Angle($WOZ) = 178.2751
0229: set_car $WOZ primary_color_to 0 secondary_color_to 0 
072A: put_actor $PLAYER_ACTOR into_car $WOZ driverseat 
0376: 1@ = create_random_actor_at 0.0 0.0 0.0 
0430: put_actor 1@ into_car $WOZ passenger_seat 0 
$CEL = Marker.CreateIconAndSphere(56, 2488.346, -1680.503, 13.08055)
054C: use_GXT_table 'MISJA1' 
00BC: show_text_highpriority GXT 'TXT1' time 3000 flag 1  // Udaj sie do domu
:MISJA_220
wait 10 
if 
0103:   actor $PLAYER_ACTOR in_sphere 2488.346 -1680.503 13.08055 radius 3.0 3.0 3.0 sphere 0 stopped_in_car 
else_jump @MISJA_220 
Player.CanMove($PLAYER_CHAR) = False
fade 0 1000 
wait 1000 
Marker.Disable($CEL)
Actor.DestroyInstantly(1@)
fade 1 1000 
02A3: enable_widescreen 1 
Camera.SetPosition(2467.004, -1658.647, 21.32385, 0.0, 0.0, 0.0)
Camera.OnVehicle($WOZ, 15, 2)
054C: use_GXT_table 'MISJA1' 
00BC: show_text_highpriority GXT 'TXT2' time 3000 flag 1  // To jest ten twoj apartament?
wait 3000 
054C: use_GXT_table 'MISJA1' 
00BC: show_text_highpriority GXT 'TXT3' time 3000 flag 1  // To jest dzielnica Ganton. Apartament jest w srodu. Choc.
wait 3000 
02A3: enable_widescreen 0 
Player.CanMove($PLAYER_CHAR) = True
Camera.Restore
01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 25
0394: play_music 1 
end_thread 
Postów: 248 Dołączył: 2009-06-27
#
Takie 2 sugestie
1.Jeśli już musisz udostępniać cały kod to nie używaj tego z dekompilacji, a tego który sam napisałeś.
2.Popraw GXT - pisze się 'chodź', a nie 'choc'.
Aktualnie nie mam na stanie w 100% bezbłędnej pętli na to co chcesz.

___________________
http://www.gta-mods.pl/public/images/userbar
Postów: 878 Dołączył: 2009-01-20
#
Poza tym, zanim zaczniesz brać się za takie rzeczy, najpierw opanuj podstawy, jest mnóstwo poradników na stronie. Ostatni raz podaję gotowy kod:

Kod:
:MISJA
thread 'MISJA'
Model.Load(#GREENWOO)
038B: load_requested_models
$WOZ = Car.Create(#GREENWOO, 2795.809, -2344.057, 13.37836)
Car.Angle($WOZ) = 178.2751
0229: set_car $WOZ primary_color_to 0 secondary_color_to 0
072A: put_actor $PLAYER_ACTOR into_car $WOZ driverseat
0376: 1@ = create_random_actor_at 0.0 0.0 0.0
0430: put_actor 1@ into_car $WOZ passenger_seat 0
$CEL = Marker.CreateIconAndSphere(56, 2488.346, -1680.503, 13.08055)
054C: use_GXT_table 'MISJA1'
00BC: show_text_highpriority GXT 'TXT1' time 3000 flag 1 // Udaj sie do domu

0186: 10@ = create_marker_above_car $WOZ


:check1
wait 0
if
Actor.InCar($PLAYER_ACTOR, $WOZ)
jf @check2

0164: disable_marker 10@

:check2
wait 0
if
not Actor.InCar($PLAYER_ACTOR, 0@)
jf @arriveCheck

00BC: show_text_highpriority GXT 'TXT1' time 4000 flag 1

:arriveCheck
wait 10
if
0103: actor $PLAYER_ACTOR in_sphere 2488.346 -1680.503 13.08055 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
else_jump @check1


Player.CanMove($PLAYER_CHAR) = False
fade 0 1000
wait 1000
Marker.Disable($CEL)
Actor.DestroyInstantly(1@)
fade 1 1000
02A3: enable_widescreen 1
Camera.SetPosition(2467.004, -1658.647, 21.32385, 0.0, 0.0, 0.0)
Camera.OnVehicle($WOZ, 15, 2)
054C: use_GXT_table 'MISJA1'
00BC: show_text_highpriority GXT 'TXT2' time 3000 flag 1 // To jest ten twoj apartament?
wait 3000
054C: use_GXT_table 'MISJA1'
00BC: show_text_highpriority GXT 'TXT3' time 3000 flag 1 // To jest dzielnica Ganton. Apartament jest w srodu. Choc.
wait 3000
02A3: enable_widescreen 0
Player.CanMove($PLAYER_CHAR) = True
Camera.Restore
01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 25
0394: play_music 1
end_thread


Musisz sam rozwiązywać takie banalne problemy, bo inaczej nic z tego nie będzie.

___________________
Administrator
Poprzedni 1 Następny
Zaloguj się lub zarejestruj się, żeby pisać na forum.
Created & Powered by MakG