Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

My script is crashing!


Kriskers
 Share

Recommended Posts

Hello!

 

I am making a CLEO script which makes your phone ringing, CJ picks it up and he asks "who is it?" and the caller says "help me" but my script is crashing and I dont know why? (I just got into CLEO scripting tounge.gif )

My code is this :

 thread 'SKELETON_THREAD' :SKELETON_THREAD_19wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @SKELETON_THREAD_19 if  $ONMISSION == 0 else_jump @SKELETON_THREAD_19 if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -1317.184 2525.606 87.5162 radius 50.0 50.0 50.0 else_jump @SKELETON_THREAD_19 if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes  [email protected] >= 2  20 > [email protected] else_jump @SKELETON_THREAD_145 jump @SKELETON_THREAD_19 :SKELETON_THREAD_145Model.Load(#CELLPHONE)038B: load_requested_models :SKELETON_THREAD_152wait 0 if   Model.Available(#CELLPHONE)else_jump @SKELETON_THREAD_152 0729: AS_actor $PLAYER_ACTOR hold_cellphone 1 wait 2200 00BB: show_text_lowpriority GXT 'SKE1' time 2200 flag 1 wait 2400 00BB: show_text_lowpriority GXT 'SKE2' time 3000 flag 1 wait 3200 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 Model.Destroy(#CELLPHONE)

 

 

Please tell me why is my mod crashing whenever I quit the call? Oh and how to put selfmade sounds into my script so you can actually hear CJ asking who is it and then you will hear static!

I hope im not asking you to do impossible!

Link to comment
Share on other sites

 

Hello!

 

I am making a CLEO script which makes your phone ringing, CJ picks it up and he asks "who is it?" and the caller says "help me" but my script is crashing and I dont know why? (I just got into CLEO scripting tounge.gif )

My code is this :

 thread 'SKELETON_THREAD' :SKELETON_THREAD_19wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @SKELETON_THREAD_19 if  $ONMISSION == 0 else_jump @SKELETON_THREAD_19 if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -1317.184 2525.606 87.5162 radius 50.0 50.0 50.0 else_jump @SKELETON_THREAD_19 if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes  [email protected] >= 2  20 > [email protected] else_jump @SKELETON_THREAD_145 jump @SKELETON_THREAD_19 :SKELETON_THREAD_145Model.Load(#CELLPHONE)038B: load_requested_models :SKELETON_THREAD_152wait 0 if   Model.Available(#CELLPHONE)else_jump @SKELETON_THREAD_152 0729: AS_actor $PLAYER_ACTOR hold_cellphone 1 wait 2200 00BB: show_text_lowpriority GXT 'SKE1' time 2200 flag 1 wait 2400 00BB: show_text_lowpriority GXT 'SKE2' time 3000 flag 1 wait 3200 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 Model.Destroy(#CELLPHONE)

 

 

Please tell me why is my mod crashing whenever I quit the call? Oh and how to put selfmade sounds into my script so you can actually hear CJ asking who is it and then you will hear static!

I hope im not asking you to do impossible!

If it should be a cleo script you must add the cleo directive at script beginn:

 

{$CLEO .cs}

 

 

Compiling+copy this script without cleo directive creates a main.scm which let your game crash

Backup first your main.scm and script.img

 

 

Then close your thread at the script end

either add 0A93: end_custom_thread or a jump to the script beginn(Loop-adress), jump @SKELETON_THREAD_19

 

Fourthermore, opcode 00BF: is no question code

remove it from the conditional check and place it before the conditional check

 

{$CLEO .cs}thread 'SKELETON_THREAD':SKELETON_THREAD_19wait 0if Player.Defined($PLAYER_CHAR)else_jump @SKELETON_THREAD_19if$ONMISSION == 0else_jump @SKELETON_THREAD_19if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -1317.184 2525.606 87.5162 radius 50.0 50.0 50.0else_jump @SKELETON_THREAD_1900BF: [email protected] = current_time_hours, [email protected] = current_time_minutesif [email protected] >= 220 > [email protected]_jump @SKELETON_THREAD_145jump @SKELETON_THREAD_19:SKELETON_THREAD_145Model.Load(#CELLPHONE)038B: load_requested_models:SKELETON_THREAD_152wait 0if Model.Available(#CELLPHONE)else_jump @SKELETON_THREAD_1520729: AS_actor $PLAYER_ACTOR hold_cellphone 1wait 220000BB: show_text_lowpriority GXT 'SKE1' time 2200 flag 1wait 240000BB: show_text_lowpriority GXT 'SKE2' time 3000 flag 1wait 32000729: AS_actor $PLAYER_ACTOR hold_cellphone 0Model.Destroy(#CELLPHONE)wait 1000jump @SKELETON_THREAD_19

 

Link to comment
Share on other sites

Thank you sooooooo much, ZAZ your the best there is but there is just one more thing to do!

I want that actor would pick up the phone ONCE not endlessly when he is at aldea malvada, i know i have to use some end_thread code but how?

Please help me with that part!

Link to comment
Share on other sites

Sorry for the double post but I figured the end_thread thing out but how to change it so that the player will receive a call at exactly 3:33 at night (AM)?

Please tell me , I couldnt figure that out!

Link to comment
Share on other sites

Nope, that didnt work! When I enter the cheat XJVSNAJ (which changes the clock to 0:00) I still get the phonecall, not 3:33!

Link to comment
Share on other sites

{$CLEO .cs}thead 'PHONECALLZ':1wait 0if   Player.Defined($PLAYER_CHAR)jf @100BF: [email protected] = current_time_hours, [email protected] = [email protected] == [email protected] == 33jf @1Model.Load(#CELLPHONE):2wait 0if   Model.Available(#CELLPHONE)jf @20729: AS_actor $PLAYER_ACTOR hold_cellphone 1wait 220000BB: show_text_lowpriority GXT 'SKE1' time 2200 flag 1wait 240000BB: show_text_lowpriority GXT 'SKE2' time 3000 flag 1wait 32000729: AS_actor $PLAYER_ACTOR hold_cellphone 0wait 2000Model.Destroy(#CELLPHONE)wait 100jump @1

Link to comment
Share on other sites

Sorry to say it but even that didnt help, i am now receiving calls at 0:33 and 2:33 and 17:33 but I want that I will get the call

ONLY at 3:33 not any other time but exactly that time!

Link to comment
Share on other sites

Sorry to say it but even that didnt help, i am now receiving calls at 0:33 and 2:33 and 17:33 but I want that I will get the call

ONLY at 3:33 not any other time but exactly that time!

james227uk forgot an and and made a misstake in thread 'PHONECALLZ'

 

if  [email protected] == [email protected] == 33jf @1

 

 

I recomand to check with "if bigger" for a tiny period of time

Bigger scripts with long loops can have a delay and miss the right moment

 

 

{$CLEO .cs}thread 'PHONECALLZ'00C0: set_current_time_hours_to 3 minutes_to 20 :1wait 0if  Player.Defined($PLAYER_CHAR)jf @100BF: [email protected] = current_time_hours, [email protected] = current_time_minutes03F0: enable_text_draw 1  045A: draw_text_1number 200.0 60.0 GXT 'NUMBER' number [email protected]  // ~1~ 045A: draw_text_1number 240.0 60.0 GXT 'NUMBER' number [email protected]  // ~1~if  [email protected] == [email protected] > 3235 > [email protected] @1Model.Load(#CELLPHONE):2wait 0if  Model.Available(#CELLPHONE)jf @20729: AS_actor $PLAYER_ACTOR hold_cellphone 1wait 220000BB: show_text_lowpriority GXT 'SKE1' time 2200 flag 1wait 240000BB: show_text_lowpriority GXT 'SKE2' time 3000 flag 1wait 32000729: AS_actor $PLAYER_ACTOR hold_cellphone 0wait 2000Model.Destroy(#CELLPHONE)wait 100jump @1

 

Link to comment
Share on other sites

As again ZAZ you are the best!!!! biggrin.gifbiggrin.gifbiggrin.gif

Here comes the final question ( to perfect my CLEO script for downloading)!

How to make the game ask "Press TAB to pick up the phone" and you can hear the phone ringing?

And how to make a sound play in the background when CJ is talking! (I want to put CJ saying "Who is this?" sound to the background of the text saying "Who is this?".

 

I hope I dont make CLEO scripters life hard with my question! :S

Atleast tell me the opcode for it!

Link to comment
Share on other sites

 

Here comes the final question ( to perfect my CLEO script for downloading)!

How to make the game ask "Press TAB to pick up the phone" and you can hear the phone ringing?

And how to make a sound play in the background when CJ is talking! (I want to put CJ saying "Who is this?" sound to the background of the text saying "Who is this?".

lol, final question, you mean we should do the work for you?

look in audioevents.txt for soundnumbers

read in my cleo script tut for more infos

opcodes can be found in main.scm, opcode search tool, sascm.ini, in Dejis topic

let the phone ring then let the code run in a loop which check if action-key is pressed

Edited by ZAZ
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.