Quantcast

Jump to content

» «
Photo

[SA|CLEO] CLEO3 MODS (are working also for Cleo4 and higher)

1,824 replies to this topic
Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1711

Posted 24 October 2011 - 07:21 PM

Nice to see you again ZAZ xD

You should hav a look @ the request in the 'Request Mod' thread lol "Driveby in aircraft" lol.gif suicidal.gif

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#1712

Posted 25 October 2011 - 04:48 PM

QUOTE (ZAZ @ Monday, Oct 24 2011, 17:21)
QUOTE (lolleroz @ Sunday, Oct 23 2011, 15:45)
Hello ZAZ,
sorry to bother you, but could you make me a script that adds 500 ammo to the weapon you have in your hand while pressing INSERT key for example?
thanks

Why not, it's simple and makes sense
copy the script below or download the file here:AmmoIncrease
CODE
{$CLEO .cs}
03A4: name_thread 'AMOINCR'
while true
   wait 0  
   if
   Player.Defined($PLAYER_CHAR)
   then
       if and
       8965:   not actor $PLAYER_ACTOR swimming
       0AB0:   key_pressed 45//  insert key
       then
           0470: 0@ = actor $PLAYER_ACTOR current_weapon
           wait 0
           if  and
           0@ > 15
           44 > 0@
           not  0@ == 40
           then
               041A: 1@ = actor $PLAYER_ACTOR weapon 0@ ammo
               1@ += 500
               017B: set_actor $PLAYER_ACTOR weapon 0@ ammo_to 1@

               repeat
               wait 0
               03F0: enable_text_draw 1
               045A: draw_text_1number 440.0 70.0 GXT 'NUMBER' number 1@  // ~1~
               until 8AB0:  not key_pressed 45//  insert key
           
           end
       end
   end
end

thanks ZAZ smile.gif
Is there any way to make a script to reload your weapon at keypress, but without making any animation? I managed to make a script that changes to fist, then back to the weapon you had in your hand orginally (by pressing R), but it's kinda slow and if you press it while aiming the weapon, it doesn't work well. Sorry for bothering you.

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#1713

Posted 28 October 2011 - 07:38 PM

QUOTE (lolleroz @ Tuesday, Oct 25 2011, 16:48)

Is there any way to make a script to reload your weapon at keypress, but without making any animation? I managed to make a script that changes to fist, then back to the weapon you had in your hand orginally (by pressing R), but it's kinda slow and if you press it while aiming the weapon, it doesn't work well. Sorry for bothering you.

i don't know a code to do that

aStiffSausage
  • aStiffSausage

    Formerly Oksu

  • Members
  • Joined: 30 Sep 2010
  • Finland

#1714

Posted 28 October 2011 - 08:12 PM

How about script to make shotgun reload a bit more real? Instead of playing reload-animation and getting magically full magazine, would it be possible to add only one shell in the magazine after each reload-animation?

Sincronismo
  • Sincronismo

    Player Hater

  • Members
  • Joined: 05 Nov 2011

#1715

Posted 05 November 2011 - 03:39 AM Edited by Sincronismo, 06 November 2011 - 01:14 AM.

Hello ZAZ,first of all,i must say you sorry for my bad english typing. tounge.gif
Ok,looking on web about cleo scripts,I fond this page:

http://www.gtaforums...howtopic=422014

And,sure,im impressed about this script,cause I ever wanted a great racing script for gta:sa,and these one is really great at all. wow.gif
But im got a problem,I just see 2 comments about the same AI cars,and yeah,I never liked same AI cars in racing games.. blush.gif
So,I see one of your comment,talking about "how he wants the scripts,what cars,.."worever..
Well,I really need your help,to change the codes of this script,for make random AIs,cause I ever wanted a racing script like these one,but the same AI cars is the only problem,that i really want to change,dont matter if it can spawn bikes as AIs,or something,I really apreciate it! tounge2.gif
I think you say that is possible to make them random,so,please help me,please give me the right code,and where i must put it,I have SannyBuilder,but i cant found the right code for it..please friend,Im hope you can help me with this,i think you are the only one that can solve it,pls! sad.gif
About the version,can be the "simple san-andreas map. smile.gif

I will back here all day for see your answer! biggrin.gif
Sorry if im inconvenient,or something..Its just anxiety. blush.gif

icon14.gif Anyway,your scripts are very well done,I have a lot of them,and they are really good. icon14.gif
I wanna say you grats,and thanks a lot for these mods! Keep up the damn good work! biggrin.gif icon14.gif

EDIT: Another simple questions,there is a way to increase the AIs difficult? and set the AIs pre-definied cars? and set how much AIs in an race? can add traffic?

Thanks! biggrin.gif

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#1716

Posted 05 November 2011 - 06:34 PM

QUOTE (ZAZ @ Friday, Oct 28 2011, 19:38)
QUOTE (lolleroz @ Tuesday, Oct 25 2011, 16:48)

Is there any way to make a script to reload your weapon at keypress, but without making any animation? I managed to make a script that changes to fist, then back to the weapon you had in your hand orginally (by pressing R), but it's kinda slow and if you press it while aiming the weapon, it doesn't work well. Sorry for bothering you.

i don't know a code to do that

ok ZAZ, no problem

i have a question, is it possible to extend sniper rifle scope zoom?? the max zoom I mean.

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1717

Posted 05 November 2011 - 08:57 PM

weapon.dat

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#1718

Posted 06 November 2011 - 01:07 PM

QUOTE (methodunderg @ Saturday, Nov 5 2011, 20:57)
weapon.dat

It is not possible to change sniper max zoom in weapon.dat...only zoom of other weapons

anyways even if it is im looking in a way without changing weapon.dat

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#1719

Posted 06 November 2011 - 03:05 PM

QUOTE (Sincronismo @ Saturday, Nov 5 2011, 03:39)
Hello ZAZ,first of all,i must say you sorry for my bad english typing. tounge.gif
Ok,looking on web about cleo scripts,I fond this page:

http://www.gtaforums...howtopic=422014

And,sure,im impressed about this script,cause I ever wanted a great racing script for gta:sa,and these one is really great at all. wow.gif
But im got a problem,I just see 2 comments about the same AI cars,and yeah,I never liked same AI cars in racing games.. blush.gif
So,I see one of your comment,talking about "how he wants the scripts,what cars,.."worever..
Well,I really need your help,to change the codes of this script,for make random AIs,cause I ever wanted a racing script like these one,but the same AI cars is the only problem,that i really want to change,dont matter if it can spawn bikes as AIs,or something,I really apreciate it! tounge2.gif
I think you say that is possible to make them random,so,please help me,please give me the right code,and where i must put it,I have SannyBuilder,but i cant found the right code for it..please friend,Im hope you can help me with this,i think you are the only one that can solve it,pls! sad.gif
About the version,can be the "simple san-andreas map. smile.gif

I will back here all day for see your answer! biggrin.gif
Sorry if im inconvenient,or something..Its just anxiety. blush.gif

icon14.gif Anyway,your scripts are very well done,I have a lot of them,and they are really good. icon14.gif
I wanna say you grats,and thanks a lot for these mods! Keep up the damn good work! biggrin.gif icon14.gif

EDIT: Another simple questions,there is a way to increase the AIs difficult? and set the AIs pre-definied cars? and set how much AIs in an race? can add traffic?

Thanks! biggrin.gif

I allready made a version (not published) which allows to customize the opponent cars.
Not everything is possible. My solution is to allow choosing one of 7 categories.
Have a look to the screenies
user posted image user posted image user posted image

It works fine so far unless for the races in stadium
Atm I'm busy with with my reallife and i think i can upload the new version in december

Sincronismo
  • Sincronismo

    Player Hater

  • Members
  • Joined: 05 Nov 2011

#1720

Posted 07 November 2011 - 01:54 AM

QUOTE (ZAZ @ Sunday, Nov 6 2011, 15:05)
I allready made a version (not published) which allows to customize the opponent cars.
Not everything is possible. My solution is to allow choosing one of 7 categories.
Have a look to the screenies
user posted image user posted image user posted image

It works fine so far unless for the races in stadium
Atm I'm busy with with my reallife and i think i can upload the new version in december

Friend,thats was SICK! yes, is exactly what Im talking about! Just perfect! wow.gif
No problem about the release,just keep it up man,it will make many people happy biggrin.gif icon14.gif
Grats,and thanks a lot,you're the man! icon14.gif

scc208
  • scc208

    Crackhead

  • Members
  • Joined: 15 Jan 2006

#1721

Posted 19 November 2011 - 01:23 PM

YEAH That's wt i long for !!!!!!

ZAZ you are simply legend !!

From now on, we no longer need to race with the same AI car smile.gif

hope u optimize it and release it soon !! biggrin.gif

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1722

Posted 26 November 2011 - 07:50 AM

QUOTE (ZAZ @ Monday, Apr 18 2011, 18:46)
First script blows up the nearest car of CJ. This can also be an allready wrecked car.
CODE
{$CLEO .cs}
:GETNearCar_0
03A4: name_thread 'GETNCAR'
0@ = -1

:GETNearCar_11
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @GETNearCar_11
if
0AB0:   key_pressed 8//-----------------------------press backspace
004D: jump_if_false @GETNearCar_11
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
8039:  not 0@ ==  -1  // integer values
004D: jump_if_false @GETNearCar_11
020B: explode_car 0@ // versionA
01C3: remove_references_to_car 0@
wait 500
0@ = -1
jump @GETNearCar_11


Hey ZAZ; finally got round to testing this mod ..

Only problem I have with this one, is that if you are in a car, the nearest car to the player is the one that you are in tounge.gif And you instantly die if you press 'backspace' Can you fix this issue?

I guess just make a check to see if player is in a vehicle or not, and get the nearest vehicle to that vehicle?

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#1723

Posted 26 November 2011 - 10:57 AM

QUOTE (methodunderg @ Saturday, Nov 26 2011, 07:50)
QUOTE (ZAZ @ Monday, Apr 18 2011, 18:46)
First script blows up the nearest car of CJ. This can also be an allready wrecked car.
CODE
{$CLEO .cs}
:GETNearCar_0
03A4: name_thread 'GETNCAR'
0@ = -1

:GETNearCar_11
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @GETNearCar_11
if
0AB0:   key_pressed 8//-----------------------------press backspace
004D: jump_if_false @GETNearCar_11
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
8039:  not 0@ ==  -1  // integer values
004D: jump_if_false @GETNearCar_11
020B: explode_car 0@ // versionA
01C3: remove_references_to_car 0@
wait 500
0@ = -1
jump @GETNearCar_11


Hey ZAZ; finally got round to testing this mod ..

Only problem I have with this one, is that if you are in a car, the nearest car to the player is the one that you are in tounge.gif And you instantly die if you press 'backspace' Can you fix this issue?

I guess just make a check to see if player is in a vehicle or not, and get the nearest vehicle to that vehicle?

CODE
{$CLEO .cs}
:GETNearCar_0
03A4: name_thread 'GETNCAR'
0@ = -1

:GETNearCar_11
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @GETNearCar_11
if
80DF:  not actor $PLAYER_ACTOR driving
004D: jump_if_false @GETNearCar_12
if
0AB0:   key_pressed 8//-----------------------------press backspace
004D: jump_if_false @GETNearCar_11
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
8039:  not 0@ ==  -1  // integer values
004D: jump_if_false @GETNearCar_11
020B: explode_car 0@ // versionA
01C3: remove_references_to_car 0@
wait 500
0@ = -1
jump @GETNearCar_11

:GETNearCar_12
03C0: 5@ = actor $PLAYER_ACTOR car

:GETNearCar_13
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @GETNearCar_13
if
00DF:  actor $PLAYER_ACTOR driving
004D: jump_if_false @GETNearCar_11
if
0AB0:   key_pressed 8//-----------------------------press backspace
004D: jump_if_false @GETNearCar_13
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
8039:  not 0@ ==  -1  // integer values
004D: jump_if_false @GETNearCar_13
if
803B:  not 0@ == 5@ // (int)
004D: jump_if_false @GETNearCar_13
020B: explode_car 0@ // versionA
01C3: remove_references_to_car 0@
wait 500
0@ = -1
jump @GETNearCar_13

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1724

Posted 26 November 2011 - 09:46 PM

Thanks for trying ZAZ. But now no car explodes when I'm in a car ..

I was just after the car that I was in, didn't explode; but still the nearest car to the player (other than the one he is driving) will explode on keypress.

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci Racing
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [GTA] 2013
    Most Helpful [Modding] 2013
    Most Talented [Modding] 2013
    Best Map 2013 "ViceCityStories PC Edition"
    Best Vehicle 2013 "III Aircraft"
    Most Helpful [Modding] 2012
    Modder of the Year 2012

#1725

Posted 26 November 2011 - 10:15 PM

You might try to change 0AB5 $PLAYER_ACTOR param to last found nearest ped in 2nd check (@GETNearCar_13). If it doesn't help, try to mess with that CLEO4 "get_random_car" opcode.

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1726

Posted 27 November 2011 - 03:18 AM

Yeah, that last one doesn't work for me either confused.gif But the first one did; but just exploded my car if player was driving.

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#1727

Posted 27 November 2011 - 07:20 AM

QUOTE (methodunderg @ Saturday, Nov 26 2011, 21:46)
Thanks for trying ZAZ. But now no car explodes when I'm in a car ..

Yes, i know biggrin.gif
get_random_car scripts are more complicate and dificult to understand for non-coders

i will explain:
as you can see, the opcode 0AB5: can only do the job if CJ doesn't drive any vehicle

another way would be a cleo4 opcode as SilentPL mentoined
but let's stay at cleo3

so another opcode can be
053E: 0@ = get_random_car_with_actors -1 in_area 1@ 2@ 11@ 12@
with this, in praxis, it happens that the game often get the same car again , also if it is wrecked
the only way to fix would be to remove the wrecked car complete from game, which means thet the wrecked cars diappear imediately


one more method is a strange method to get every ped or actor and check if he drives a vehicle
so it can only get cars with driver

you must decide:
cleo4 code
or
wrecked cars diappear imediately
or
only get cars with driver

I made a script by method 3, only get cars with driver
CODE
{$CLEO .cs}
:BLOW_UP_NEAREST_CAR
03A4: name_thread 'NCAREXP'

:NCAREXP_11
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @NCAREXP_11
00D6: if
0AB0:   key_pressed 8//-----------------------------press backspace
//0AB0:   key_pressed 66//  b key  
004D: jump_if_false @NCAREXP_11
0006: 0@ = -1
0006: 1@ = -1
0006: 2@ = -1
0006: 3@ = -1
0006: 4@ = -1
0006: 5@ = -1
0006: 6@ = -1
0006: 7@ = -1
0006: 8@ = -1
0006: 9@ = -1
0006: 10@ = -1
0006: 11@ = -1
0006: 12@ = -1
0006: 13@ = -1
0006: 14@ = -1
0006: 15@ = -1
0006: 16@ = -1
0006: 17@ = -1
0006: 18@ = -1
0006: 19@ = -1
0006: 20@ = -1
0006: 21@ = -1
0006: 22@ = -1
0006: 23@ = -1
0006: 24@ = 0
0050: gosub @NCAREXP_275
00D6: if
0039:   23@ == -1
004D: jump_if_false @NCAREXP_257
0001: wait 0 ms
0050: gosub @NCAREXP_558

:NCAREXP_257
0001: wait 0 ms
0050: gosub @NCAREXP_1364
0002: jump @NCAREXP_11

:NCAREXP_275
0006: 31@ = 0
0006: 27@ = 0

:NCAREXP_289
0085: 30@ = 31@ // (int)
0006: 29@ = 0

:NCAREXP_304
00D6: if and
056D:   actor 30@ defined
803C:   not  $PLAYER_ACTOR == 30@ // (int)
004D: jump_if_false @NCAREXP_485
0085: 0@(27@,32i) = 30@ // (int)
00D6: if
8118:   not actor 30@ dead
004D: jump_if_false @NCAREXP_471
00D6: if
00DF:   actor 30@ driving
004D: jump_if_false @NCAREXP_471
00A0: store_actor 30@ position_to 25@ 26@ 28@
00D6: if
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 12.0 12.0 12.0
004D: jump_if_false @NCAREXP_471
03C0: 23@ = actor 30@ car
00D6: if
8119:   not car 23@ wrecked
004D: jump_if_false @NCAREXP_471
020B: explode_car 23@ // versionA
0085: 24@ = 27@ // (int)
0051: return

:NCAREXP_471
000A: 27@ += 1
0002: jump @NCAREXP_513

:NCAREXP_485
000A: 30@ += 1
000A: 29@ += 1
0019:   29@ > 127
004D: jump_if_false @NCAREXP_304

:NCAREXP_513
000A: 31@ += 256
00D6: if or
0019:   27@ > 21
0019:   31@ > 35584
004D: jump_if_false @NCAREXP_289
0006: 24@ = 21
0051: return

:NCAREXP_558
0006: 27@ = 0

:NCAREXP_565
0001: wait 0 ms
00D6: if
001D:   24@ > 27@ // (int)
004D: jump_if_false @NCAREXP_759
00D6: if
8039:   not  0@(27@,32i) == -1
004D: jump_if_false @NCAREXP_745
00D6: if
8118:   not actor 0@(27@,32i) dead
004D: jump_if_false @NCAREXP_745
00D6: if
00DF:   actor 0@(27@,32i) driving
004D: jump_if_false @NCAREXP_745
00A0: store_actor 0@(27@,32i) position_to 25@ 26@ 28@
00D6: if
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 24.0 24.0 24.0
004D: jump_if_false @NCAREXP_745
03C0: 23@ = actor 0@(27@,32i) car
00D6: if
8119:   not car 23@ wrecked
004D: jump_if_false @NCAREXP_745
020B: explode_car 23@ // versionA
0051: return

:NCAREXP_745
000A: 27@ += 1
0002: jump @NCAREXP_565

:NCAREXP_759
0006: 27@ = 0

:NCAREXP_766
0001: wait 0 ms
00D6: if
001D:   24@ > 27@ // (int)
004D: jump_if_false @NCAREXP_960
00D6: if
8039:   not  0@(27@,32i) == -1
004D: jump_if_false @NCAREXP_946
00D6: if
8118:   not actor 0@(27@,32i) dead
004D: jump_if_false @NCAREXP_946
00D6: if
00DF:   actor 0@(27@,32i) driving
004D: jump_if_false @NCAREXP_946
00A0: store_actor 0@(27@,32i) position_to 25@ 26@ 28@
00D6: if
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 36.0 36.0 36.0
004D: jump_if_false @NCAREXP_946
03C0: 23@ = actor 0@(27@,32i) car
00D6: if
8119:   not car 23@ wrecked
004D: jump_if_false @NCAREXP_946
020B: explode_car 23@ // versionA
0051: return

:NCAREXP_946
000A: 27@ += 1
0002: jump @NCAREXP_766

:NCAREXP_960
0006: 27@ = 0

:NCAREXP_967
0001: wait 0 ms
00D6: if
001D:   24@ > 27@ // (int)
004D: jump_if_false @NCAREXP_1161
00D6: if
8039:   not  0@(27@,32i) == -1
004D: jump_if_false @NCAREXP_1147
00D6: if
8118:   not actor 0@(27@,32i) dead
004D: jump_if_false @NCAREXP_1147
00D6: if
00DF:   actor 0@(27@,32i) driving
004D: jump_if_false @NCAREXP_1147
00A0: store_actor 0@(27@,32i) position_to 25@ 26@ 28@
00D6: if
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 50.0 50.0 50.0
004D: jump_if_false @NCAREXP_1147
03C0: 23@ = actor 0@(27@,32i) car
00D6: if
8119:   not car 23@ wrecked
004D: jump_if_false @NCAREXP_1147
020B: explode_car 23@ // versionA
0051: return

:NCAREXP_1147
000A: 27@ += 1
0002: jump @NCAREXP_967

:NCAREXP_1161
0006: 27@ = 0

:NCAREXP_1168
0001: wait 0 ms
00D6: if
001D:   24@ > 27@ // (int)
004D: jump_if_false @NCAREXP_1362
00D6: if
8039:   not  0@(27@,32i) == -1
004D: jump_if_false @NCAREXP_1348
00D6: if
8118:   not actor 0@(27@,32i) dead
004D: jump_if_false @NCAREXP_1348
00D6: if
00DF:   actor 0@(27@,32i) driving
004D: jump_if_false @NCAREXP_1348
00A0: store_actor 0@(27@,32i) position_to 25@ 26@ 28@
00D6: if
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 70.0 70.0 70.0
004D: jump_if_false @NCAREXP_1348
03C0: 23@ = actor 0@(27@,32i) car
00D6: if
8119:   not car 23@ wrecked
004D: jump_if_false @NCAREXP_1348
020B: explode_car 23@ // versionA
0051: return

:NCAREXP_1348
000A: 27@ += 1
0002: jump @NCAREXP_1168

:NCAREXP_1362
0051: return

:NCAREXP_1364
0006: 27@ = 0

:NCAREXP_1371
0001: wait 0 ms
00D6: if
001D:   24@ > 27@ // (int)
004D: jump_if_false @NCAREXP_1439
00D6: if
8039:   not  0@(27@,32i) == -1
004D: jump_if_false @NCAREXP_1425
01C2: remove_references_to_actor 0@(27@,32i) // Like turning an actor into a random pedestrian

:NCAREXP_1425
000A: 27@ += 1
0002: jump @NCAREXP_1371

:NCAREXP_1439
0051: return



QUOTE (SilentPL @ Saturday, Nov 26 2011, 22:15)
You might try to change 0AB5 $PLAYER_ACTOR param to last found nearest ped in 2nd check (@GETNearCar_13). If it doesn't help, try to mess with that CLEO4 "get_random_car" opcode.

i tried cleo4 opcode, took the script from previous post and replaced 0AB5: with
00A0: store_actor $PLAYER_ACTOR position_to 11@ 12@ 13@
0AE2: 0@ = random_vehicle_near_point 11@ 12@ 13@ in_radius 12.0 find_next 0 0// - cleo 4 -
it worked but let wrecked cars explode
so i changed last param to 1
0AE2: 0@ = random_vehicle_near_point 11@ 12@ 13@ in_radius 12.0 find_next 0 1// - cleo 4 -
it worked for 2 trails then it crashed

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1728

Posted 27 November 2011 - 07:22 AM

I don't mind if it is CLEO4 xD icon14.gif

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci Racing
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [GTA] 2013
    Most Helpful [Modding] 2013
    Most Talented [Modding] 2013
    Best Map 2013 "ViceCityStories PC Edition"
    Best Vehicle 2013 "III Aircraft"
    Most Helpful [Modding] 2012
    Modder of the Year 2012

#1729

Posted 27 November 2011 - 12:28 PM

Try this then (untested):

CODE
{$CLEO}
0000: GETNEARCAR

while true
   0001: wait 0 ms
   if
       0AB0:   key_pressed 8       // Backspace
   then
       if
           80DF:  not actor $PLAYER_ACTOR driving
       then
           0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
           if
               0019:   0@ > 0
           then
               020B: explode_car 0@
               01C3: remove_references_to_car 0@    
           end
       else
           03C0: 1@ = actor $PLAYER_ACTOR car
           00AA: store_car 1@ position_to 2@ 3@ 4@
           if
               0AE2: 0@ = random_vehicle_near_point 2@ 3@ 4@ in_radius 50.0 find_next 0 pass_wrecked 1
           then
               0006: 5@ = 0
               
               while 003B:   0@ == 1@
                   if
                       8AE2: not 0@ = random_vehicle_near_point 2@ 3@ 4@ in_radius 50.0 find_next 1 pass_wrecked 1
                   then
                       0006: 5@ = 1
                       break
                   end
               end
               
               if
                   0039:   5@ == 0
               then
                   020B: explode_car 0@
                   01C3: remove_references_to_car 0@
               end
           end
       end
             
       while 0AB0:   key_pressed 8       // Backspace
           0001: wait 0 ms
       end
   end
end


Note that it might not catch the nearest car, but it's the only way to do that without some advanced maths (comparing distances etc. etc.).


ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#1730

Posted 28 November 2011 - 05:25 AM

Nice script, SilentPL, works fine. My script works also, ok it'smuch longer and only for cars with driver but without cleo4 codes.
I'm just disappointed that methodunderg ignored it.

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1731

Posted 28 November 2011 - 05:29 AM Edited by methodunderg, 01 December 2011 - 10:31 PM.

Haha, never ignored. Just didn't get around to testing. Been busy packing up the house last few days, moving @ the weekend.

Last thing to pack will be the computer lol happy.gif

Will test out yours, and SilentPL's scripts soon icon14.gif

EDIT:
Sorry; had no time to test, and won't be able to till the 14th till my new house gets the internet.

gtaXbat
  • gtaXbat

    Player Hater

  • Members
  • Joined: 02 Jan 2012

#1732

Posted 04 January 2012 - 09:48 AM

these mod for cleo in fact plz dont get angry is sux there is awesome mod in gtagarage and gtagamming and gtainside

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1733

Posted 04 January 2012 - 09:52 AM

GTFO of here ..

ZAZ is one of the 'masters' of CLEO scripting ..

user posted image

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#1734

Posted 14 January 2012 - 08:22 PM

Back from hollidays,
Happy New Year methodunderg and SilentPL and to all the others who know my mods
I don't know what gtaXbat means but it doesn't look important
Last month i published 3 map mods , look in map showroom
current cleo projects are the NRace scripts and a plane traffic mod

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1735

Posted 14 January 2012 - 09:00 PM

Happy New Year to you to bro ! icon14.gif

Hope you had a good Christmas, NY's and holidays. icon14.gif icon14.gif

JoWie
  • JoWie

    Snitch

  • Members
  • Joined: 27 Nov 2008

#1736

Posted 15 January 2012 - 03:04 AM

Hi ZAZ, could you please help me on a simple one?

I need these cars (Packer, Towtruck) to always spawn at this location:
user posted image

and a Green Sabre in this location but just after you complete "End of the Line":
user posted image

thanks in advance!

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1737

Posted 15 January 2012 - 03:09 AM

You could at least provide him with the exact co-ordinates instead of images icon14.gif

JoWie
  • JoWie

    Snitch

  • Members
  • Joined: 27 Nov 2008

#1738

Posted 15 January 2012 - 03:31 AM

QUOTE (methodunderg @ Sunday, Jan 15 2012, 03:09)
You could at least provide him with the exact co-ordinates instead of images icon14.gif

thanks for the suggestion.

Packer:

X: -2052.32690429688
Y: 139.712463378906
Z: 29.4703559875488
Angle: 180.246

Towtruck:

X: -2046.955078125
Y: 145.967071533203
Z: 28.7182884216309
Angle: 179.484

Green Sabre:

X: 2491.22485351563
Y: -1682.78308105469
Z: 13.075798034668
Angle: 89.467

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#1739

Posted 15 January 2012 - 08:53 AM

take that script below, JoWie
are you able to compile it yourself with sannybuilder?
CODE
{$CLEO .cs}
:Paked_Car_generator_for_JoWie
03A4: name_thread 'PACR'

:Paked_Car_1
0001: wait  0 ms
00D6: if
0018:   $RIOT_TOTAL_PASSED_MISSIONS > 4
004D: jump_if_false @Paked_Car_1
0A95: enable_thread_saving
014B: 0@ = init_parked_car_generator #TOWTRUCK -1 -1  1 alarm  0 door_lock  0  0  10000 at  -2047.5 144.967 28.8 angle  179.484
014C: set_parked_car_generator 0@ cars_to_generate_to 101
014B: 1@ = init_parked_car_generator #PACKER -1 -1  1 alarm  0 door_lock  0  0  10000 at  -2057.32 137.71 29.5 angle  180.246
014C: set_parked_car_generator 1@ cars_to_generate_to 101
014B: 2@ = init_parked_car_generator #SABRE 86 6  1 alarm  0 door_lock  0  0  10000 at  2491.224 -1682.78 13.1 angle  89.467
014C: set_parked_car_generator 2@ cars_to_generate_to 101
0A93: end_custom_thread

note: TOWTRUCK and PACKER don't appear together at same time
it's a random decinding of the engine to spawn either towtruck or packer

Methical
  • Methical

    Gramps

  • Members
  • Joined: 23 May 2008
  • New-Zealand

#1740

Posted 15 January 2012 - 08:56 AM

QUOTE (ZAZ @ Saturday, Jan 14 2012, 20:22)
current cleo projects are the NRace scripts and a plane traffic mod

Told ya he was a fricken genius ! inlove.gif

I would like some more information on your new projex ZAZ xD icon14.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users