Czy wiesz, że... rejestracja trwa tylko 20 sekund?
Strona główna forum Szukaj Rejestracja
Witaj, nieznajomy!
Postów: 31 Dołączył: 2013-02-05
#
Ok już rozumiem :)

Tylko nie wiem jak napisać tutaj skrawek, aby działał If
jeśli wejdę w marker to zniknie on z mapy i odpali się misja
Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007


{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------

0000: NOP
:NONAME_70 
wait 
0 
if 
$MARKER = Marker.CreateIconAndSphere(56, 1982.534, -2266.046, 4.7609)
0103:   actor $PLAYER_ACTOR in_sphere 1982.534 -2266.046 4.7609 radius 3.0 3.0 3.0 sphere 0 stopped_in_car 
else_jump 
@NONAME_76 

:NONAME_76
wait 

Marker.Disable($MARKER)
if 
else_jump @NONAME_132 
Marker.Disable($MARKER)
0A94: start_custom_mission "MISSIONS\MISJA1"  
wait 
0 
jump 
@NONAME_139 

:NONAME_132
jump 
@NONAME_76 

:NONAME_139 // Note: a jump to this label will crash the game




Przed chwila edytowalem, byl marker ale jak wszedlem to nic,
teraz jeszcze tez inaczej zrobilem ale crash jest po wczytywaniu gry
Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007


{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------

0000: NOP 
:NONAME_70
wait 
0 
if 
and                                                                                                                                               
$MARKER = Marker.CreateIconAndSphere(56, 1982.534, -2266.046, 4.7609)
0103:   actor $PLAYER_ACTOR in_sphere 1982.534 -2266.046 4.7609 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf 
@NONAME_76 
gosub 
@NONAME_76
return

:NONAME_76
wait 
5
jump 
@NONAME_80

:NONAME_80 
Marker.Disable($MARKER)
0A94: start_custom_mission "MISSIONS\MISJA1"  
wait 
0 
jump 
@NONAME_139 

:NONAME_132
jump 
@NONAME_76 

:NONAME_139 // Note: a jump to this label will crash the game



Btw. fajny ten program code generator :),wszystko pod reka ;p.
Przydala by sie aktualizacja z cutscenkami i dialogami audio.

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
TYylko nie do konca to rozumiem bo w poradnich sa zmienne globalne, jezeli mam takie zmienne globalne

Kod:
$PLAYER_CHAR = Player.Create(#NULL, 0.0, 0.0, 0.0)
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)


to zmienic na takie?

Kod:
@PLAYER_CHAR = Player.Create(#NULL, 0.0, 0.0, 0.0)
@PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)


czy

Kod:
@1 = PLAYER_CHAR = Player.Create(#NULL, 0.0, 0.0, 0.0)
@2 = PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Ok poczytam jeszcze raz wszystko dokladnie i bede analizowal, wiesz na razie duzego doswiadczenia w tym nie mam i pisze po prostu tak jak mi na mysl przychodzi :).


Czyli mam tylko uzywac zmiennych lokalnych?
czyli na przyklad:
zamiast
$6011 = 30000
014E: set_timer_to $6011 type 1

to mam pisac
@6011 = 30000
014E: set_timer_to @6011 type 1

bo coś mi chyba to źle wyglada ;x

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Uff, napisalem wreszcie dobry kod...
Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007


{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------

thread 
'MISJA' 
Model.Load(#SHMYCR)
Model.Load(#WMYCLOT)
Model.Load(#GREENWOO)
Model.Load(#MICRO_UZI)
Model.Load(#MP5LNG)
Model.Load(#TEC9)
038B: load_requested_models 
$WOZ = Car.Create(#GREENWOO, 2018.026, -2291.319, 4.7683)
Car.Angle($WOZ) = 358
0229: set_car $WOZ primary_color_to 2 secondary_color_to 1 
$CEL = Marker.CreateIconAndSphere(56, 1982.534, -2266.046, 4.7609)
054C: use_GXT_table 'MISJA' 
00BC: show_text_highpriority GXT 'TXT1' time 3000 flag 1 

:MISJA_148
wait 
0 
if 
0103:   actor $PLAYER_ACTOR in_sphere 1982.534 -2266.046 4.7609 radius 3.0 3.0 3.0 sphere 0 stopped_in_car 
else_jump 
@MISJA_148 
fade 
0 1000 
wait 
1000 
Marker.Disable($CEL)
$OFIARA = Actor.Create(Criminal, #SHMYCR, 1998.506, -2259.342, 4.934)
$KOLEGA = Actor.Create(CivMale, #WMYCLOT, 1996.274, -2261.553, 4.934)
01B2: give_actor $OFIARA weapon 26 ammo 20 // Load the weapon model before using this 

0639: AS_actor $OFIARA rotate_to_actor $KOLEGA 
0639: AS_actor $KOLEGA rotate_to_actor $OFIARA 
0605: actor $OFIARA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA 

0605: actor $KOLEGA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA 

032B: $UZI = create_weapon_pickup #MICRO_UZI group 5 ammo 50 at 2489.812 -1663.398 13.3359 
032B: $MP5 = create_weapon_pickup #MP5LNG group 5 ammo 30 at 2488.254 -1663.246 13.3359 
032B: $TEC9 = create_weapon_pickup #TEC9 group 5 ammo 50 at 2486.949 -1662.613 13.3359 
$CEL2 = Marker.CreateAboveActor($OFIARA)
02A3: enable_widescreen 1 
fade 
1 1000 
Camera.SetPosition(1991.888, -2261.959, 4.934, 0.0, 0.0, 0.0)
Camera.OnVehicle($WOZ, 15, 2)
00BC: show_text_highpriority GXT 'TXT2' time 3000 flag 1 
wait 
3000 
Camera.SetPosition(1992.469, -2257.583, 4.9266, 0.0, 0.0, 0.0)
Camera.OnPed($OFIARA, 15, 2)
00BC: show_text_highpriority GXT 'TXT3' time 5000 flag 1 
wait 
2000 
02A3: enable_widescreen 0 
Camera.Restore

:MISJA_594
wait 
0 
if 
02E0:   actor $PLAYER_ACTOR aggressive 
else_jump 
@MISJA_629 
01B9: set_actor $OFIARA armed_weapon_to 26 
05E2: AS_actor $OFIARA kill_actor $PLAYER_ACTOR 

:MISJA_629
wait 
10 
if 
   
Actor.Dead($PLAYER_ACTOR)
else_jump 
@MISJA_709 
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!

Marker.Disable($CEL)
Marker.Disable($CEL2)
Car.Destroy($WOZ)
Actor.DestroyInstantly($OFIARA)
Actor.DestroyInstantly($KOLEGA)
Pickup.Destroy($UZI)
Pickup.Destroy($MP5)
Pickup.Destroy($TEC9)
start_mission 
0  // Initial 1


:MISJA_709
wait 
10 
if 
   
Actor.Dead($OFIARA)
else_jump 
@MISJA_594 
01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~

Player.Money($PLAYER_CHAR) += 100
0394: play_music 1 
Marker.Disable($CEL2)
end_thread 


Teraz tylko go podrasowac, zrobic cutscenke i dodac dubbing, potem juz jakos sam bede pisac.


Edit

Dobra starter misji tez niby dziala ale lapie crasha po wejsciu w marker
Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007


{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------

0000: NOP 

:NONAME_2
wait 
0 
if 
$MISJA1 = Marker.CreateIconAndSphere(56, 1982.534, -2266.046, 4.7609)
0103:   actor $PLAYER_ACTOR in_sphere 1982.534 -2266.046 4.7609 radius 3.0 3.0 3.0 sphere 0 stopped_in_car 
else_jump 
@NONAME_112 
Marker.Disable($MARKER)
0A94: start_custom_mission "MISSIONS\MISJA1"  
wait 
0 
jump 
@NONAME_119 

:NONAME_112
jump 
@NONAME_2 

:NONAME_119 // Note: a jump to this label will crash the game



Teraz zrobilem tak i niby ruszylo ale chce do ifa wrzucic marker, i ze po wejsciu w marker przechodzi mi do :NONAME_2

Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007


{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------

0000: NOP 
:NONAME_1
wait 
0
if
$MISJA1 = Marker.CreateIconAndSphere(56, 1982.534, -2266.046, 4.7609)
0103:   actor $PLAYER_ACTOR in_sphere 1982.534 -2266.046 4.7609 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jump 
@NONAME_2

:NONAME_2
wait 
0
Marker.Disable($MISJA1) 
if 
else_jump @NONAME_53 
Marker.Disable($MARKER)
0A94: start_custom_mission "MISSIONS\MISJA1"  
wait 
0 
jump 
@NONAME_60 

:NONAME_53
jump 
@NONAME_2 

:NONAME_60 // Note: a jump to this label will crash the game



Hmm tylko jak teraz obcodami audio wrzucic do fragmentu gdzie wlacza sie cutscenka ;x.
018C: play_sound 1052 at 0.0 0.0 0.0
018E: stop_sound 82@

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
No to tak
Marker sie pojawia, ale gdy w niego wejde to nie znika i nie odpala misji

StarterMisji.cs
Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007


{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------

0000: NOP 

:NONAME_2
wait 
0 
if 
00ED:   actor $PLAYER_ACTOR 0 near_point 2043.68 -1635.73 radius 4.0 4.0 on_foot 
$MARKER = Marker.CreateIconAndSphere(56, 2455.115, -1708.752, 13.6119) 
else_jump 
@NONAME_113
Marker.Disable($MARKER)
0A94: start_custom_mission "missions\Misja1"  
wait 
0 
jump 
@NONAME_120 

:NONAME_113
jump 
@NONAME_2 

:NONAME_120 // Note: a jump to this label will crash the game


CLEO/Missions/Misja1.cm
Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007


{$VERSION 3.1.0027}
{$CLEO .cm}

//-------------MAIN---------------

if 
wasted_or_busted 
else_jump 
@MISJA1_20 
gosub 
@MISJA1_216 

:MISJA1_20
gosub 
@MISJA1_195 
end_thread 
thread 'MISJA1' 
$ONMISSION = 1 
Model.Load(#VMAFF1)
Model.Load(#M4)

:MISJA1_56
wait 
0 
if 
and
   Model.Available(#VMAFF1)
   Model.Available(#M4)
else_jump 
@MISJA1_56 
Actor.PutAt($PLAYER_ACTOR, 2515.04, -1718.532, 18.5821)
1@ = Actor.Create(CivMale, #VMAFF1, 2415.04, -1818.542, 18.5821)
01B2: give_actor 1@ weapon 31 ammo 300 // Load the weapon model before using this 

01B9: set_actor 1@ armed_weapon_to 31 
0350: set_actor 1@ maintain_position_when_attacked 1 
05E2: AS_actor 1@ kill_actor $PLAYER_ACTOR 
2@ = Marker.CreateAboveActor(1@)

:MISJA1_164
wait 
0 
if 
   
Actor.Dead(1@)
else_jump 
@MISJA1_164 
gosub 
@MISJA1_234 
return 
return 

:MISJA1_195
Actor.DestroyInstantly(1@)
Marker.Disable(2@)
mission_cleanup 
$ONMISSION = 0 
return 

:MISJA1_216
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!

return 

:MISJA1_234
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~

Player.Money($PLAYER_CHAR) += 5000
0394: play_music 1 
return 


Zapisalem tez misje jako .cs ale to i tak nic w niej nie dało, więc może jest lipna?

Hmmm, usune ten jeden return bo zapomialem i sprwadze czy dziala.

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Ta misja ymmm... dziala ale nie do konca.
Nie ma zadnego celu, samochodu ani tego co zamiescilem w misji, po prostu gralem sobie, wzialem jakas misje z gta united, zginalem i wyswietlila sie tresc, ktora zamiescilem w moim quescie M_FAIL
Moze sanny builder czy zle kordy gta utd czy jak.
NIe wiem czy jeszcze dzisiaj na kompie bede, ale jutro na pewno :P.

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Plik misji nosi nazwe misja_1.cm i misja_1.txt i znajduje sie w folderze glownym cleo, misja/watek nazywa sie szablon
zrobilem StarterMisji.cs
i wrzucilem
Kod:
{$CLEO .cs}

while  
true 
  wait  
0 
  if
     
00ED:   actor $PLAYER_ACTOR sphere 1 near_point 2043.68 -1635.73 radius 4.0 4.0 on_foot 
  then
     
0A94: start_custom_mission "misja_1" 
    wait  
10000
    break 
  end
end

I przy kompilowaniu wyskakuje
A jump to zero offset found.

Wstawilem 0000 przed while true i skompilowalo sie, teraz ciekawe czy zadziala quest.

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Uff, co za ulga :D.
Ja tylko chcę się nauczyć tworzyć misje, skrypty .cs nie są mi potrzebne.
A jeżeli w main nie można nie można zapisywać to oczywiście, że bym w tym nie robił ^^.
Chcę tworzyć, tak aby można było zagrać misję pierwszą, zapisać grę, wczytać, przejść następną.

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Hmm, teraz mam takie zmartwienie, czy robić wszystko na GTA United czy na czystym gta?
Bo jesli nie mozna edytowac pliku main to mi sie nie oplaca w tym grzebac i przejsc na czyste gta?>

Aha i piszesz ze cleo ma tylko do 33 zmiennych, w czym to przeszkadza?

W jedenj misji mozna uzyc tylko do 32 lub 33 celow itp. i wiecej nie da rady?
Wiec dlatego lepiej robic w main.scm ?

Przyznam sie, nie mam orginala GTA, tylko ripa, w ktorym nie ma tylko stacji radiowych i dzwiekow misji rockstar.

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Ok, czyli zostawie main w spokoju.
Teraz probuje zmienic kod, aby od razu wywolac ta misje lub odpalic po wejsciu w marker na mapce.

Q1:
Jezeli w .cm mam teksty
to mam je tworzyc w folderze CLEO_TEXT w rozszerzeniu .fxt ?
NP.
plik: M_FAIL.fxt
a w pliku: M_FAIL Widocznie nie nadzjesz sie do tej misji

Q2:
Czym się różni .cm od .cs ?
Jakis skrypt ma {$CLEO .cs}
A moja misja {$CLEO .cm}

Q3:
Jak stworzyc wywolanie .cs ?
0A94: start_custom_mission "szablon"

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Jak moge to dodac do main.scm?
Bo jak otwieram sanny builderem to jest pusto, nie potrafi chyba tego zdekompilowac, a nie chce podmieniac bo mi crasha rypnie.

Sprobuje wywolac cleo skryptem i dam edita czy zadziala.

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Ok
Zrobilem np. takie cos
Kod:
{$CLEO .cm}0050:  gosub  @Mission_Start  
if 
  
0112:  wasted_or_busted
then
 0050:  gosub  @Mission_Failed  
end
0050:  gosub  @Mission_Cleanup 
end_thread


:Mission_Start 
thread  
'szablon'
$ONMISSION = 1

Model.Load(124)  // Mafia #1

Model.Load(356)  // M4


:LoadModels 
wait  
0 
if  
and
 Model.Available(124)
 Model.Available(356) 
jf  
@LoadModels


00A1: put_actor $PLAYER_ACTOR at 2515.0403 -1718.5321 18.5821

009A: 1@ = create_actor_pedtype 4 model 124 at 2515.0403 -1718.5321 18.5821
 01B2: give_actor 1@ weapon 31 ammo 300
 01B9: set_actor 1@ armed_weapon_to 31
 0350: set_actor 1@ maintain_position_when_attacked 1 

05E2: AS_actor 1@ kill_actor $PLAYER_ACTOR
0187: 2@ = create_marker_above_actor 1@ 
 
:check 
wait  
0 
if
  
0118:   actor 1@ dead  
jf  
@check 

gosub  
@Mission_Passed 
return


return


:Mission_Cleanup
009B: destroy_actor 1@
0164: disable_marker 2@ 
00D8: mission_cleanup 
$ONMISSION = 0 
return

:Mission_Failed
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 
return

:Mission_Passed
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 5000
0394: play_music 1
return


Tam mi jakos te dwa returny zle wygladaja ale jesli tak ma byc to niech bedzie :).
Skompilowalem i w grze nie widze tej misji.
Mam ja w folderze cleo jako .txt i .cm

Czy musze zrobic jeszcze cos aby ta misja wystartowala?
Gre wczytuje z zapisu, jestem w domku ^^.
W tym quescie byly jeszcze interiory ale usunalem je, bo chce po prostu na cala mapke wrzucic tego kolesia/misje.
Sorki ze tak chaotycznie pisze, ale chyba zrozumiecie.


funkcja gosub tak dziala?

If
--wykonalem to zadanie
gosub @nastepnezadanie

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Hmm ;/
W bazie obcodow jest np. tak
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0

poprawiam kod na

016C: restart_if_wasted_at 2027.77, -1420.52, 15.99 angle 137.0 town_number 0

i dalej nie dziala, probuje teraz zrobic na tej misji, ktora dales w podstawach
Kod:
DEFINE OBJECTS 0
DEFINE MISSIONS 1
DEFINE MISSION 0 AT @MISJA
DEFINE EXTERNAL_SCRIPTS -1
DEFINE UNKNOWN_EMPTY_SEGMENT 0
DEFINE UNKNOWN_THREADS_MEMORY 0

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


thread 
'MAIN' 

var
$PLAYER_CHAR : Player 
end

set_weather 3
00C0: set_current_time 21 00
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_CHAR.SetClothes("PLAYER_FACE""HEAD", Head)
$PLAYER_CHAR.SetClothes("JEANSDENIM""JEANS", Legs)
$PLAYER_CHAR.SetClothes("SNEAKERBINCBLK""SNEAKER", Shoes)
$PLAYER_CHAR.SetClothes("VEST""VEST", Torso)
$PLAYER_CHAR.Build
$PLAYER_CHAR.CanMove(True)

016C: restart_if_wasted at 2017.7292, -2293.5635, 4.4997 angle 195.05.05  unknown  0
016D: restart_if_busted at 2017.7292, -2293.5635, 4.4997 angle 38.1827  unknown  0 

fade  
1 (out) 0 ms 

start_mission  
0

end_thread


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



:MISJA 
thread  
'MISJA'

0247: request_model 223 // Ofiara

0247: request_model 217 // Kolega ofiary

0247: request_model #GREENWOO // Samochód Greenwood

0247: request_model #micro_uzi // UZI

0247: request_model #mp5lng // MP5

0247: request_model #tec9 // TEC9

038B: load_requested_models


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



00A5: $WOZ = create_car #GREENWOO at 2017.7292, -2293.5635, 4.4997
0175: set_car $WOZ z_angle_to 86.6531
0229: set_car $WOZ color_to 2 1

072A: put_actor $PLAYER_ACTOR into_car $WOZ driverseat

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



072A: put_actor $PLAYER_ACTOR into_car $WOZ driverseat

02A7: $CEL = create_icon_marker_and_sphere 56 at 1885.6003, -2294.6262, 4.9192 radius 3.0
054C: use_GXT_table 'MISJA'
00BC: show_text_highpriority GXT 'TXT1' time 3000 flag 1       



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



:petla1 
wait  
0 
if
0103: actor $PLAYER_ACTOR in_sphere 1885.6003, -2294.6262, 4.9192 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf  
@petla1
 
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////  


$PLAYER_CHAR.CanMove(False) 

fade  
0 1000 
wait  
1000
Marker.Disable($CEL)
009A: $OFIARA = create_actor_pedtype 20 model 223 at 1838.7719, -2296.5576, 4.9192
009A: $KOLEGA = create_actor_pedtype 4 model 217 at 1841.1627, -2294.1643, 4.9192

01B2: give_actor $OFIARA weapon 26 ammo 20

0639: AS_actor $OFIARA rotate_to_actor $KOLEGA
0639: AS_actor $KOLEGA rotate_to_actor $OFIARA

0605: actor $OFIARA perform_animation_sequence "IDLE_CHAT" from_file "PED" 4.0 loop 1 0 0 0 -1 ms
0605: actor $KOLEGA perform_animation_sequence "IDLE_CHAT" from_file "PED" 4.0 loop 1 0 0 0 -1 ms

032B: $UZI = create_weapon_pickup #micro_uzi group 5 ammo 50 at 1870.3744, -2290.3037, 4.9268
032B: $MP5 = create_weapon_pickup #mp5lng group 5 ammo 30 at 1872.5426, -2290.3362, 4.9192
032B: $TEC9 = create_weapon_pickup #tec9 group 5 ammo 50 at 1876.9941, -2290.49, 4.9192

0187: $CEL2 = create_marker_above_actor $OFIARA

02A3: enable_widescreen 1 
fade  
1 1000


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////   


Camera.SetPosition(1852.7791 -2292.4421 10.9794, 0.0, 0.0, 0.0)
Camera.OnVehicle($WOZ,15,2)
00BC: show_text_highpriority GXT 'TXT2' time 3000 flag 1 
wait  
3000
Camera.SetPosition(1852.7791, -2292.4421, 10.9794, 0.0, 0.0, 0.0)
Camera.OnPed($OFIARA,15,2)
00BC: show_text_highpriority GXT 'TXT3' time 2000 flag 1 
wait  
2000

02A3: enable_widescreen 0
$PLAYER_CHAR.CanMove(True)
015A: restore_camera

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



:petla2 
wait  
0 
if
02E0: actor $PLAYER_ACTOR aggressive 
jf  
@petla3

01B9: set_actor $OFIARA armed_weapon_to 26
05E2: AS_actor $OFIARA kill_actor $PLAYER_ACTOR

:petla3 
wait  
10 
if
0118: actor $PLAYER_ACTOR dead 
jf  
@petla4

00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
Marker.Disable($CEL)
Marker.Disable($CEL2)
00A6: destroy_car $WOZ
009B: destroy_actor $OFIARA
009B: destroy_actor $KOLEGA
0215: destroy_pickup $UZI
0215: destroy_pickup $MP5
0215: destroy_pickup $TEC9 
start_mission  
0

:petla4 
wait  
10 
if
0118: actor $OFIARA dead 
jf  
@petla2

01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1
0109: player $PLAYER_CHAR money += 100
0394: play_music 1
Marker.Disable($CEL2)
end_thread

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


Blad 5 parametrow

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Hmm, nie działa dobrze, staje w tym celu, gdzie stawał, nawet gdy wyjdę z samochodu to nie jedzie dalej.
Ok dzięki, ja teraz lecę spać bo całe dnie przesiaduje teraz przed kompem, jutro też będę z rana cały dzień siedział :), więc trochę Cię jutro pytaniami pomęczę ;p.
Narka.
Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007


{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------

Model.Load(#GREENWOO)
Model.Load(#VBMOCD)
038B: load_requested_models 
0@ = Car.Create(#GREENWOO, 2020.284, -2291.393, 4.504)
00BA: show_text_styled GXT 'AUTO' time 1900 style 2
0161: 30@ = create_marker_above_car 0@ unknown 0 visibility 1 
Car.Angle(0@) = 75.9046                       
0129: 1@ = create_actor_pedtype 24 model #VBMOCD in_car 0@ driverseat 

:NONAME_84                                              
wait 
10 
if 
and
00E1:   player 0 pressed_key 16                                            
00E1:   player 0 pressed_key 15 
0206:   actor $PLAYER_ACTOR near_car 0@ radius 5.0 5.0 3.0 flag 0 on_foot 
0164: disable_marker 30@
else_jump 
@NONAME_165 
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 0 10000 ms 

:NONAME_165
wait 
10 
if 
   
Actor.InCar($PLAYER_ACTOR0@)
else_jump 
@NONAME_84 
05D1: AS_actor 1@ drive_car 0@  to  1950.764 -2431.873 4.3873 speed 50.0 0 model #NULL 0   

:check 
wait  
0 
if  
and
  01AD: car 0@ sphere 0 near_point 1950.764 -2431.873 radius 2.0 2.0
  80DB:  not  actor $PLAYER_ACTOR in_car 0@ 
jf  
@check

05D1: AS_actor 1@ drive_car 0@  to  1929.5352 -2542.6182 4.5855 speed 50.0 0 model #NULL 0

:check2 
wait  
0 
if
   
01AD: car 0@ sphere 0 near_point 1950.764 -2431.873 radius 2.0 2.0 
jf  
@check2

05CD: AS_actor 1@ exit_car 0@


Dlaczego gdy zmienie kordynaty w tej linijce
0@ = Car.Create(#GREENWOO, 2007.147 -2295.314 4.445)
to przy kompilacji wyskakuje "Zbyt malo parametrow. Oczekiwanie 5 parametrow"?

Przydaloby sie jakies FAQ do CLEO na stronie glownej :)

Aha i jeszcze jedno, w czym można zrobić nową mapę/Nowy skrawek mapy?
MapEditor czy da się np. w MTA do sp?

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Postów: 31 Dołączył: 2013-02-05
#
Super :)
Wszystko pięknie działa.

Edit.
Chcę teraz dodać swoją sekwencje w tym skrypciku, że gdy tam dojadę to włączy się If
gdy wyjdę z samochodu to NPC jedzie do
1929.5352, -2542.6182, 4.5855
i wysiada z samochodu
koniec skryptu

Kod:
:NONAME_165
wait 
10 
if 
   
Actor.InCar($PLAYER_ACTOR0@)
else_jump 
@NONAME_84 
05D1: AS_actor 1@ drive_car 0@  to  1950.764 -2431.873 4.3873 speed 50.0 0 model #NULL 0   

:NONAME_267
wait 
10
if
//to tutaj zrobic??


0A93: end_custom_thread 

Sorki że tak o wszystko pytam, ale nie mogę znaleźć w obcodach lub nie wiem jak zedytować 00DB aby powstalo tak jak napisalem.

Edit2
Chyba rozumiem, musze pewnie dodac komende else do 00DB, jesli mnie nie ma to wykonaj akcje ;p Ale jak to zrobic, bo przeciez chyba zeby zrobic else trzeba dodac cos do ifa

Edit3
Napisalem takie cos
Kod:
:NONAME_165
wait 
10 
if 
   
Actor.InCar($PLAYER_ACTOR0@)
else_jump 
@NONAME_84 
05D1: AS_actor 1@ drive_car 0@  to  1950.764 -2431.873 4.3873 speed 50.0 0 model #NULL 0   

:NONAME_267
wait 
10                                 
if
05CA: AS_actor $ACTOR_SMOKE enter_car 0@ passenger_seat 1 10000 ms
then
05D1: AS_actor 1@ drive_car 0@  to  1929.5352, -2542.6182, 4.5855 speed 100.0 0 model #NULL 0

0A93: end_custom_thread 

I pisze ze za malo parametrow

Edit4
Znalazlem 0633: AS_actor 50@ exit_car
:)
Ale dalej brak parametrow "Oczekiwanie 9 parametrow"
Kod:
:NONAME_166
wait 
10                                 
if
0633: AS_actor 1@ exit_car
then
05D1: AS_actor 1@ drive_car 0@  to  1929.5352, -2542.6182, 4.5855 speed 100.0 0 model #NULL 0

0A93: end_custom_thread 

hmm, dalej nic
Kod:
:NONAME_166
wait 
10                                 
if 
and
0633: AS_actor $PLAYER_ACTOR exit_car
05D1: AS_actor 1@ drive_car 0@  to  1929.5352, -2542.6182, 4.5855 speed 100.0 0 model #NULL 0
0633: AS_actor 1@ exit_car
0A93: end_custom_thread 

___________________
http://republika.pl/blog_ws_3465390/4032674/tr/20050510160123
http://dawidsaworski.blogspot.com/
:)
Created & Powered by MakG