Police Media 0 Posted March 5, 2012 Hi guys i have the code of cleo but i dont know how to make it .cs file any1 can ? the code :: :0wait 0if0AB0: key_pressed 48 //------ use '96' for numpad 0jf @00729: AS_actor $PLAYER_ACTOR hold_cellphone 1 wait 1930000729: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @0 and how i add mp4 to listen the calling > please replllllllllllllyyyy !! Quote Share this post Link to post Share on other sites
Ashwin.Star 35 Posted March 5, 2012 just use {$cleo} at the top & compile, {$cleo .cs}thread 'Ashwin' // you can use NOP also:0wait 0if0AB0: key_pressed 48 //------ use '96' for numpad 0jf @00729: AS_actor $PLAYER_ACTOR hold_cellphone 1 wait 1930000729: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @0 press F6 to compile, & SB will create a .cs file, Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 5, 2012 thanks alooot but where i put the mp3 ? Quote Share this post Link to post Share on other sites
Ashwin.Star 35 Posted March 5, 2012 put .mp3 file where ever you want, then load & use it like this, i am not sure but may be this works! {$cleo .cs}thread 'Ashwin'0AAC: [email protected] = load_mp3 "audio\Phone.mp3" //<-- the address of your mp3 file:0wait 0if0AB0: key_pressed 48jf @00729: AS_actor $PLAYER_ACTOR hold_cellphone 1 0AAD: set_mp3 [email protected] perform_action 1 //<--------------- i hope this opcode plays the mp3 file0AAF: [email protected] = get_mp3_length [email protected] [email protected] //<--------- if you use this then you don't have to calculate for length0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @0 good luck! Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 5, 2012 (edited) the mp3 in cleo > mp3 so its will be like this? {$cleo .cs}thread 'Ashwin'0AAC: [email protected] = load_mp3 "cleo\mp3\1.mp3" //<-- the address of your mp3 file:0wait 0if0AB0: key_pressed 48jf @00729: AS_actor $PLAYER_ACTOR hold_cellphone 1 0AAD: set_mp3 [email protected] perform_action 1 //<--------------- i hope this opcode plays the mp3 file0AAF: [email protected] = get_mp3_length [email protected] [email protected] //<--------- if you use this then you don't have to calculate for length0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @0 and the phone not showing up in the game Edited March 5, 2012 by Police Media Quote Share this post Link to post Share on other sites
Ashwin.Star 35 Posted March 5, 2012 (edited) yes! load model 330 before it, #CELLPHONE i thought you know how to load models, but na.. i hope you know how to get the address of any file,,, {$cleo .cs}thread 'Ashwin'0AAC: [email protected] = load_mp3 "phone.mp3" //<-- the address of your mp3 file should be in " "model.load(330)038B: load_requested_models :0wait 0if andmodel.available(330)0AB0: key_pressed 48jf @00729: AS_actor $PLAYER_ACTOR hold_cellphone 1 0AAD: set_mp3 [email protected] perform_action 10AAF: [email protected] = get_mp3_length [email protected] [email protected]: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @0 Edited March 6, 2012 by Ashwin the new boy Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 5, 2012 i cant understand you >>> how to load it ? and i try it the mp3 not working Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 6, 2012 reply please Quote Share this post Link to post Share on other sites
Michael.Knight1 0 Posted March 7, 2012 (edited) USE 0729 To Play and Stop perform_action 1 To Start use 1 or 2 or 3 to load Repeatedly perform_action 0 To Stop Use 0 That's My Own Script {$CLEO .cs}thread 'Michael' 0AAC: [email protected] = load_audiostream "CLEO\playlist\PHONE1.mp3" 0AAC: [email protected] = load_audiostream "CLEO\playlist\PHONE2.mp3" Model.Load(#CELLPHONE):Michael_100001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined jf @Michael_10 if $ONMISSION == 0 jf @Michael_100001: wait 0 ms if and0AB0: key_pressed 50 // Press 1 in your keyboardjf @Michael_10 :Michael_2110001: wait 0 ms if and Model.Available(#CELLPHONE)jf @Michael_211 0AAD: set_audiostream [email protected] perform_action 10001: wait 100 ms 0729: AS_actor $PLAYER_ACTOR hold_cellphone 1 0AAD: set_audiostream [email protected] perform_action 00001: wait 100 ms 0AAD: set_audiostream [email protected] perform_action 1wait 5000 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @Michael_10 man what's you from Edited March 7, 2012 by Michael.Knight1 Quote Share this post Link to post Share on other sites
Joni2030 4 Posted March 7, 2012 Always before I start coding I put these to SB {$VERSION 3.1.0027} {$CLEO .cs} //-------------MAIN---------------- every time after that I start coding but this is my way Quote Share this post Link to post Share on other sites
Node 221 Posted March 7, 2012 (edited) Always before I start coding I put these to SB {$VERSION 3.1.0027}{$CLEO .cs} //-------------MAIN---------------- every time after that I start coding but this is my way If anybody is wanting to create a CLEO file (.cs) they must start there script with: {$CLEO} It is mandatory. EDIT: Please, Police Media Don't double post, use the edit button instead Edited March 7, 2012 by The_Sorrow Quote Share this post Link to post Share on other sites
Ashwin.Star 35 Posted March 8, 2012 (edited) {$VERSION} is not necessary & used in decompiling purpose only! it's is to know what is the version of our .ini by which we have decompiled the script, so, you can start scripting after putting {$cleo} at head, {$CLEO} is to tell it is cleo, we can use it like {$CLEO .cs}, {$CLEO .cm}, etc. to compile our script in different extension, otherwise SB will compile only in .scm @joni all the text start with "//' are for comments or massage only, they are not used for compiling, @M.K1 man what's you from do you want to say Where are you from ? Edited March 8, 2012 by Ashwin the new boy Quote Share this post Link to post Share on other sites
Node 221 Posted March 8, 2012 (edited) {$CLEO} is to tell it is cleo,we can use it like {$CLEO .cs}, {$CLEO .cm}, etc. to compile our script in different extension, otherwise SB will compile only in .scm Ashwin, remember that {$CLEO.cm} is only to be used for custom missions in San Andreas, It isn't actually an extension for a newly made script. Edited March 8, 2012 by The_Sorrow Quote Share this post Link to post Share on other sites
Deji 789 Posted March 8, 2012 And if you've already compiled without the {$CLEO} directive, you've overwritten your main.scm and script.img and your game will probably fail to run until you restore the originals. Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 8, 2012 so ? witch 1 i use please give me a right code my mp3 in cleo>mp3>1.mp3 Quote Share this post Link to post Share on other sites
Node 221 Posted March 8, 2012 Use Michael.Knight1's code that he provided just change the location of the sound files So: 0AAC: [email protected] = load_audiostream "CLEO\playlist\PHONE2.mp3" Would be: 0AAC: [email protected] = load_audiostream "CLEO\MP3\1.mp3" Etc. Etc. Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 8, 2012 whats the code for num0 because i wont delete my WeatherMenu.cs ^_^ Quote Share this post Link to post Share on other sites
Ashwin.Star 35 Posted March 8, 2012 remember that {$CLEO.cm} is only to be used for custom missions in San Andreas, oh! Really ? Actually I join today! @P Media Do you want this ? 0 (numpad with Num Lock on) = 96 use it as 0AB0: key_pressed 96 for more press 'F12' while using SB & open cleo 3 code library, Quote Share this post Link to post Share on other sites
Node 221 Posted March 8, 2012 (edited) whats the code for num0 because i wont delete my WeatherMenu.cs ^_^ So you want to press number 0 on your keyboard instead of 1? Use this: {$CLEO .cs}thread 'Michael' 0AAC: [email protected] = load_audiostream "CLEO\playlist\PHONE1.mp3" 0AAC: [email protected] = load_audiostream "CLEO\playlist\PHONE2.mp3" Model.Load(#CELLPHONE):Michael_100001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined jf @Michael_10 if $ONMISSION == 0 jf @Michael_100001: wait 0 ms if and0AB0: key_pressed 48 //Press 0 in your keyboardjf @Michael_10 :Michael_2110001: wait 0 ms if and Model.Available(#CELLPHONE)jf @Michael_211 0AAD: set_audiostream [email protected] perform_action 10001: wait 100 ms 0729: AS_actor $PLAYER_ACTOR hold_cellphone 1 0AAD: set_audiostream [email protected] perform_action 00001: wait 100 ms 0AAD: set_audiostream [email protected] perform_action 1wait 5000 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @Michael_10 Don't forget to change your sound files location oh! Really ?Actually I join today! Yep, it is true Edited March 8, 2012 by The_Sorrow Quote Share this post Link to post Share on other sites
Ashwin.Star 35 Posted March 8, 2012 @sorrow thanks for make me correct, because i was reading "Joined: Nov 14, 2010" near my Avatar by mistake, ha ha anyway, Why don't you use if and instead of using so much conditions ? Quote Share this post Link to post Share on other sites
Node 221 Posted March 8, 2012 (edited) @sorrowthanks for make me correct, because i was reading "Joined: Nov 14, 2010" near my Avatar by mistake, ha ha anyway, Why don't you use if and instead of using so much conditions ? Its fine, I wasn't writing the script from scratch, If the code already works and a small change is needed I wasn't going to mess with it anymore Edited March 8, 2012 by The_Sorrow Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 8, 2012 The_Sorrow your code not working Ashwin the new boy your code working without sounds xD Quote Share this post Link to post Share on other sites
Node 221 Posted March 8, 2012 (edited) This code should work now, just make sure to correctly define your MP3 file location! {$CLEO}0000:0AAC: [email protected] = load_audiostream "CLEO\playlist\01.mp3"model.load(330)038B: load_requested_models :0wait 0if andmodel.available(330)0AB0: key_pressed 0x30 // Press 0 on your keyboardjf @00729: AS_actor $PLAYER_ACTOR hold_cellphone 1 0AAD: set_mp3 [email protected] perform_action 10AAF: [email protected] = get_mp3_length [email protected] [email protected]: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @0 Edited March 8, 2012 by The_Sorrow Quote Share this post Link to post Share on other sites
Ashwin.Star 35 Posted March 8, 2012 you may put the file in root dir & just write the name of mp3 file, Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 8, 2012 works but only 5 secs calling ! i need it 3 minutes and 13 secounds Quote Share this post Link to post Share on other sites
Node 221 Posted March 8, 2012 works but only 5 secs calling ! i need it 3 minutes and 13 secounds My code? Thats because the sound file is only 5 seconds long. Quote Share this post Link to post Share on other sites
Police Media 0 Posted March 8, 2012 no , the sound still on but the phone only 5 secs Quote Share this post Link to post Share on other sites
LINK/2012 1,547 Posted March 8, 2012 get_mp3_length returns seconds, the wait wants miliseconds. Quote Share this post Link to post Share on other sites
Node 221 Posted March 8, 2012 no , the sound still on but the phone only 5 secs {$CLEO}0000:0AAC: [email protected] = load_audiostream "CLEO\playlist\01.mp3"model.load(330)038B: load_requested_models :0wait 0if andmodel.available(330)0AB0: key_pressed 0x30 // Press 0 on your keyboardjf @00729: AS_actor $PLAYER_ACTOR hold_cellphone 1 0AAD: set_mp3 [email protected] perform_action 10AAF: [email protected] = get_mp3_length [email protected] 187800 <- 3 minutes and 13 seconds0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 jump @0 How about now? Quote Share this post Link to post Share on other sites