JohnPro Posted September 17, 2010 Share Posted September 17, 2010 Hi guys Im having problems with this script. It works on my friends machine but not on mine. Im so confused. When health reaches below 30 percent SuitAlarm.mp3 should play but on my system it plays but crashes while playing. // 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 'SPARTANHEALTH' Audiostream.Load(5@, "CLEO\SUITALARM.MP3"):SPARTANHEALTH_44wait 0 1@ = Actor.Health($PLAYER_ACTOR)0085: 2@ = 1@ // (int) if 30 >= 1@ else_jump @SPARTANHEALTH_44 0169: set_fade_color_RGB 255 0 0 Audiostream.PerformAction(5@, STOP)Audiostream.PerformAction(5@, PLAY)fade 0 2000 wait 1000 fade 1 2000 wait 1000 2@ += 1 Actor.Health(1@) = 2@jump @SPARTANHEALTH_44 Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/ Share on other sites More sharing options...
yair1221 Posted September 17, 2010 Share Posted September 17, 2010 dude i told you to make sure the name of the file is "SuitAlarm.mp3" and to put it in CLEO folder it should work it works for me but the sound itself is a little odd Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060128637 Share on other sites More sharing options...
JohnPro Posted September 17, 2010 Author Share Posted September 17, 2010 (edited) Hi yair1221 I believe you have made the script for LordNiti, I am JohnPro and LordNiti has provided me with your script. The script works on Lordniti's machine however on mine it crashes. All my other cleo scripts work without problems, including a death script which plays an MP3 when health reaches 0. I am using Cleo 4 Edited September 17, 2010 by JohnPro Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060128671 Share on other sites More sharing options...
jtr007 Posted September 17, 2010 Share Posted September 17, 2010 (edited) This script fails HARD CORE! Lol, jks. 0AAE: release_mp3 $HMP30 0AAC: $HMP30 = load_mp3 "CLEO\SUITALARM.MP3" 0AAD: set_mp3 $HMP30 perform_action 1 Try and use them opcodes Edited September 17, 2010 by jtr007 Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060128810 Share on other sites More sharing options...
Deji Posted September 17, 2010 Share Posted September 17, 2010 Your code fails more.. don't use global variables The script looks fine to me, although the MP3 doesn't need to be loaded all the time. I'm confused by the use of the Actor.Health class thing as both a get and set command, though. Does that work properly? Bahh.. pointless using classes when there are over 1,600 unclassed opcodes. But since bass.dll uses system functions to play audio, it is easily possible that it can work on one machine and not on another. Some have said they have problems with playing audiostreams with CLEO 4. Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060128963 Share on other sites More sharing options...
yair1221 Posted September 17, 2010 Share Posted September 17, 2010 actor.health can be used both as condition and command depends on where the value lies 1@ = actor.health($player_actor) actor.health($player_actor) = 1@ Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060129025 Share on other sites More sharing options...
BnB Posted September 17, 2010 Share Posted September 17, 2010 The audio will play when health is 30 not 30%. 0226: 10@ = actor $PLAYER_ACTOR health //put it in the top of the code 10@ /= 3,33330226: 11@ = actor $PLAYER_ACTOR health if10@ == 11@thenblablah end Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060129039 Share on other sites More sharing options...
Anurag_Anmol Posted September 17, 2010 Share Posted September 17, 2010 or try mine P.S. Didn't test and probably still not gunna work {$CLEO .cs}//-------------MAIN---------------thread 'SPARTANHEALTH':SPARTANHEALTH_44wait 0Audiostream.Load(5@, "CLEO\SUITALARM.MP3")1@ = Actor.Health($PLAYER_ACTOR)0085: 2@ = 1@ // (int)if1@ <= 30jf @SPARTANHEALTH_440169: set_fade_color_RGB 255 0 0Audiostream.PerformAction(5@, STOP)Audiostream.PerformAction(5@, PLAY)fade 0 2000wait 1000fade 1 2000wait 10002@ += 1Actor.Health(1@) = 2@jump @SPARTANHEALTH_44 Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060129122 Share on other sites More sharing options...
yair1221 Posted September 17, 2010 Share Posted September 17, 2010 its okay i re-writed the script it works now with many improvements Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060129127 Share on other sites More sharing options...
james227uk Posted September 19, 2010 Share Posted September 19, 2010 Who wrote this script:? // 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 'SPARTANHEALTH'Audiostream.Load(5@, "CLEO\SUITALARM.MP3"):SPARTANHEALTH_44wait 01@ = Actor.Health($PLAYER_ACTOR) 0085: 2@ = 1@ // (int)if30 >= 1@else_jump @SPARTANHEALTH_440169: set_fade_color_RGB 255 0 0Audiostream.PerformAction(5@, STOP)Audiostream.PerformAction(5@, PLAY)fade 0 2000wait 1000fade 1 2000wait 10002@ += 1Actor.Health(1@) = 2@jump @SPARTANHEALTH_44 It fails in too many ways Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060131362 Share on other sites More sharing options...
yair1221 Posted September 19, 2010 Share Posted September 19, 2010 it was something i wrote without the GTA only with sanny builder couldnt know if there were bugs but now i made some improvements and it works Link to comment https://gtaforums.com/topic/459348-mp3-script-at-30-percent-health/#findComment-1060131467 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now