IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (3) 1 2 [3]   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 The police won't chase me after I hit them

 The police won't chase me
 
Ashwin the new boy  
Posted: Tuesday, May 22 2012, 15:24
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



i am sure Each new Version of Cleo also contain all opcodes of Last version,
Users WebsitePM
  Top
 

 
koragg  
Posted: Tuesday, May 22 2012, 16:36
Quote Post


Knight Rider Forever
Group Icon
Group: Members
Joined: Feb 25, 2012

bu.gif

XXXXX



can someone tell me what am i doing wrong here, because the mp3 file plays, but only when i start a new game and not when pressing Shift (key 16) while in a car.HEELP !!

// 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 'CARJUMP'
0AAC: $HMP3 = load_mp3 "CLEO\PLAYLIST\TURBOBOOST.MP3"

:CARJUMP_46
wait 0
if and
Player.Defined($PLAYER_CHAR)
Actor.Driving($PLAYER_ACTOR)
0AAF: 2@ = get_mp3_length $HMP3
84C8: not actor $PLAYER_ACTOR driving_flying_vehicle
0AB0: key_pressed 16
0AAD: set_mp3 $HMP3 perform_action 1
else_jump @CARJUMP_46
if
8AB0: not key_pressed 88
else_jump @CARJUMP_174
if
8AB0: not key_pressed 67
else_jump @CARJUMP_195
1@ = 0.15
$2657 = 18
04F7: status_text $2657 type 1 line 1 GXT '' // global_variable
059C: enable_status_text $2657 flashing 0 // global_variable
jump @CARJUMP_216

:CARJUMP_174
wait 0
1@ = 0.45
jump @CARJUMP_418

:CARJUMP_195
wait 0
1@ = 0.75
jump @CARJUMP_418

:CARJUMP_216
wait 0
0087: 2@ = 1@ // (float)
2@ *= 133.3333
0090: $2657 = float 2@ to_integer
if
Actor.Driving($PLAYER_ACTOR)
else_jump @CARJUMP_614
if
8AB0: not key_pressed 9
else_jump @CARJUMP_330
if
0AB0: key_pressed 16
else_jump @CARJUMP_387
if
0.75 > 1@
else_jump @CARJUMP_216
1@ += 0.02
jump @CARJUMP_216

:CARJUMP_330
wait 100
if
Actor.Driving($PLAYER_ACTOR)
else_jump @CARJUMP_614
if
0AB0: key_pressed 16
else_jump @CARJUMP_387
if
0AB0: key_pressed 9
else_jump @CARJUMP_330
jump @CARJUMP_216

:CARJUMP_387
wait 0
0151: remove_status_text $2657
if
8AB0: not key_pressed 82
else_jump @CARJUMP_46
jump @CARJUMP_418

:CARJUMP_418
wait 0
03C0: 0@ = actor $PLAYER_ACTOR car
if or
81F3: not car 0@ in_air
04A7: actor $PLAYER_ACTOR driving_boat
else_jump @CARJUMP_46
0407: store_coords_to 11@ 12@ 13@ from_car 0@ with_offset 0.0 0.0 1@
0407: store_coords_to 14@ 15@ 16@ from_car 0@ with_offset 0.0 0.0 0.0
0063: 11@ -= 14@ // (float)
0063: 12@ -= 15@ // (float)
0063: 13@ -= 16@ // (float)
07D5: set_car 0@ velocity_in_direction_XYZ 11@ 12@ 13@ rotation_velocitiesXY 0.0 0.0 unk 0.0
if
04A7: actor $PLAYER_ACTOR driving_boat
else_jump @CARJUMP_46
0087: 3@ = 1@ // (float)
3@ *= 5000.0
0092: 4@ = float 3@ to_integer
wait 4@
jump @CARJUMP_46

:CARJUMP_614
wait 0
0151: remove_status_text $2657
jump @CARJUMP_46
Users WebsitePM
  Top
 

 
Joni2030  
Posted: Tuesday, May 22 2012, 16:45
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



Do you have the TURBOBOOST.mp3 ?
Users WebsitePM
  Top
 

 
koragg  
Posted: Tuesday, May 22 2012, 18:46
Quote Post


Knight Rider Forever
Group Icon
Group: Members
Joined: Feb 25, 2012

bu.gif

XXXXX



yes of course
Users WebsitePM
  Top
 

 
koragg  
Posted: Tuesday, May 22 2012, 19:26
Quote Post


Knight Rider Forever
Group Icon
Group: Members
Joined: Feb 25, 2012

bu.gif

XXXXX



i tried it again and it plays the .mp3 file but the only problem is that it plays it while holding SHIFT and not when only pressing it once and then releasing the SHIFT button.How can I fix this (play sound only when pushed the SHIFT and then let go)
Users WebsitePM
  Top
 

 
koragg  
Posted: Wednesday, May 23 2012, 16:01
Quote Post


Knight Rider Forever
Group Icon
Group: Members
Joined: Feb 25, 2012

bu.gif

XXXXX



Can anyone tell me how to make the code below :
1. set the game speed to 0.36
2. play the .MP3 file TURBOBOOST.MP3 when the specified buttons are pushed
3. set the game speed to normal (when done playing the mp3)

// 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 'CARJUMP'
0AAC: $HMP3 = load_mp3 "CLEO\PLAYLIST\TURBOBOOST.MP3"

:CARJUMP_46
wait 0
if and
Player.Defined($PLAYER_CHAR)
Actor.Driving($PLAYER_ACTOR)
84C8: not actor $PLAYER_ACTOR driving_flying_vehicle
0AAF: 0@ = get_mp3_length $HMP3
0AB0: key_pressed 16
else_jump @CARJUMP_46
if
8AB0: not key_pressed 88
0AAD: set_mp3 $HMP3 perform_action 1
else_jump @CARJUMP_181
if
8AB0: not key_pressed 67
0AAD: set_mp3 $HMP3 perform_action 1
else_jump @CARJUMP_202
1@ = 0.15
$2657 = 18
04F7: status_text $2657 type 1 line 1 GXT '' // global_variable
059C: enable_status_text $2657 flashing 0 // global_variable
jump @CARJUMP_223

:CARJUMP_181
wait 0
1@ = 0.45
jump @CARJUMP_460

:CARJUMP_202
wait 0
1@ = 0.75
jump @CARJUMP_460

:CARJUMP_223
wait 0
0087: 2@ = 1@ // (float)
2@ *= 133.3333
0090: $2657 = float 2@ to_integer
if
Actor.Driving($PLAYER_ACTOR)
else_jump @CARJUMP_656
if
8AB0: not key_pressed 9
0AAD: set_mp3 $HMP3 perform_action 1
else_jump @CARJUMP_351
if
0AB0: key_pressed 16
0AAD: set_mp3 $HMP3 perform_action 1
else_jump @CARJUMP_422
if
0.75 > 1@
else_jump @CARJUMP_223
1@ += 0.02
jump @CARJUMP_223

:CARJUMP_351
wait 100
if
Actor.Driving($PLAYER_ACTOR)
else_jump @CARJUMP_656
if
0AB0: key_pressed 16
0AAD: set_mp3 $HMP3 perform_action 1
else_jump @CARJUMP_422
if
0AB0: key_pressed 9
0AAD: set_mp3 $HMP3 perform_action 1
else_jump @CARJUMP_351
jump @CARJUMP_223

:CARJUMP_422
wait 0
0151: remove_status_text $2657
if
8AB0: not key_pressed 82
0AAD: set_mp3 $HMP3 perform_action 1
else_jump @CARJUMP_46
jump @CARJUMP_460

:CARJUMP_460
wait 0
03C0: 0@ = actor $PLAYER_ACTOR car
if or
81F3: not car 0@ in_air
04A7: actor $PLAYER_ACTOR driving_boat
else_jump @CARJUMP_46
0407: store_coords_to 11@ 12@ 13@ from_car 0@ with_offset 0.0 0.0 1@
0407: store_coords_to 14@ 15@ 16@ from_car 0@ with_offset 0.0 0.0 0.0
0063: 11@ -= 14@ // (float)
0063: 12@ -= 15@ // (float)
0063: 13@ -= 16@ // (float)
07D5: set_car 0@ velocity_in_direction_XYZ 11@ 12@ 13@ rotation_velocitiesXY 0.0 0.0 unk 0.0
if
04A7: actor $PLAYER_ACTOR driving_boat
else_jump @CARJUMP_46
0087: 3@ = 1@ // (float)
3@ *= 5000.0
0092: 4@ = float 3@ to_integer
wait 4@
jump @CARJUMP_46

:CARJUMP_656
wait 0
0151: remove_status_text $2657
jump @CARJUMP_46
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Wednesday, May 23 2012, 16:38
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



These opcodes:
CODE
0AAF: 2@ = get_mp3_length $HMP3
0AAD: set_mp3 $HMP3 perform_action 1
are not conditional checks and you shouldn't put them in a loop.
Also avoid using global variables (with $ sign) in CLEO scrypts - for example instead of $0 use 0@ (local variable). The other thing is that your CLEO scrypt is not ended. Use this to end your scrypt:
CODE
0A93: end_custom_thread

Here's how should I try to make this happen (it's just a quick reply):
CODE
{$CLEO .cs}

:Start
0AAC: 0@ = load_mp3 "CLEO\PLAYLIST\TURBOBOOST.MP3"

:Check
wait 0
if and
Player.Defined($PLAYER_CHAR)
0449:   actor $PLAYER_ACTOR in_a_car
Actor.Driving($PLAYER_ACTOR)
84C8: not actor $PLAYER_ACTOR driving_flying_vehicle
0AB0: key_pressed 16
else_jump @Check
0AAF: 1@ = get_mp3_length 0@
0AAD: set_mp3 0@ perform_action 1
015D: set_gamespeed 0.36

:Music
wait 0
if
0019:   1@ > 60 // integer values (for example if mp3 lenght is 61 sec then put 60)
else_jump @Music
0AAE: release_mp3 0@
015D: set_gamespeed 1.0
jump @Start
0A93: end_custom_thread

I didn't test this but when you enter a car and press key 16 it should play an mp3 and set a game speed to 0.36. If an mp3 is over then the speed is normal again.
I'm not sure about 0019 - maybe I should have done a float check.

This post has been edited by JACK JONES on Wednesday, May 23 2012, 17:28
PM
  Top
 

 
koragg  
Posted: Wednesday, May 23 2012, 17:30
Quote Post


Knight Rider Forever
Group Icon
Group: Members
Joined: Feb 25, 2012

bu.gif

XXXXX



it plays the mp3 when i press key 16 and it sets the speed to 0.36 but it doesn't set the speed back to normal when the mp3 is over
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Wednesday, May 23 2012, 17:33
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



Put this:
CODE
0021:   1@ > 60.0
instead of 0019.
And did you put your own mp3 lenght value - mine is 61 seconds so I put 61-1=60.
PM
  Top
 

 
koragg  
Posted: Wednesday, May 23 2012, 17:40
Quote Post


Knight Rider Forever
Group Icon
Group: Members
Joined: Feb 25, 2012

bu.gif

XXXXX



it says : "a jump to zero offset found" and i can't compile the script sad.gif
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Wednesday, May 23 2012, 17:47
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



Try jump @Check instead of jump @Start.
PM
  Top
 

 
koragg  
Posted: Wednesday, May 23 2012, 17:59
Quote Post


Knight Rider Forever
Group Icon
Group: Members
Joined: Feb 25, 2012

bu.gif

XXXXX



now it loads only the mp3 and does nothing else
Users WebsitePM
  Top
 

 
Bad.boy!  
Posted: Wednesday, May 23 2012, 18:36
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



QUOTE (koragg @ May 23 2012, 17:40)
it says : "a jump to zero offset found" and i can't compile the script  sad.gif


QUOTE (JACK JONES @ May 23 2012, 17:47)
Try jump @Check instead of jump @Start.


The mp3 will only be played once if you do that, add "name_thread" or "0000:" at the start.
PM
  Top
 

 
Ashwin the new boy  
Posted: Thursday, May 24 2012, 02:44
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



@Korrag

QUOTE
Can anyone tell me how to make the code below :
1. set the game speed to 0.36
2. play the .MP3 file TURBOBOOST.MP3 when the specified buttons are pushed
3. set the game speed to normal (when done playing the mp3)

if you wrote some code it doesn't mean it's not a a request now

By the way here is your Requested Script, Hope it works

CODE

{$cleo}
thread 'Ashwin'
0AAC: 0@ = load_mp3 "CLEO\PLAYLIST\TURBOBOOST.MP3"

:0
wait 0
if and
Actor.Driving($3)
84C8: not actor $3 driving_flying_vehicle
0AB0: key_pressed 16
jf @0
0AAD: set_mp3 0@ perform_action 1
015D: set_gamespeed 0.36
wait 500

:1
wait 0
0AB9: get_mp3 0@ state_to 1@
if or
1@ == 0
not Actor.Driving($3)
8256:   not player $PLAYER_CHAR defined
0AB0: key_pressed 8
jf @1
0AAD: set_mp3 0@ perform_action 0
015D: set_gamespeed 1.0
wait 500
jump @0


As the Script is not tested, It may contain some small Bugs.
Fix it yourself (if any)

You still need to know some basics
My advise is > you should take Dutchy's Tutorial first

@jj
QUOTE
The other thing is that your CLEO scrypt is not ended. Use this to end your scrypt:

He wants to play that File again & again,
Its not necessary that every script should END or to put That opcode in all scripts,

@Error
QUOTE
it says : "a jump to zero offset found" and i can't compile the script
Sounds like its your First Cleo script
QUOTE
Try jump @Check instead of jump @Start.
What a Joke lol.gif
QUOTE
The mp3 will only be played once if you do that, add "name_thread" or "0000:" at the start.
This will work

In this case all you have to do is
The Next thing after {$cleo} must be an opcode instead of label or something else
Thats all

This post has been edited by Ashwin the new boy on Thursday, May 24 2012, 02:55
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Thursday, May 24 2012, 07:35
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



QUOTE
Try jump @Check instead of jump @Start.
What a Joke lol.gif
Yeah I know - very stupid - I realise myself - thanks for not puting those facepalm images.
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Pages: (3) 1 2 [3] 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG