BEGINit Posted December 26, 2007 Share Posted December 26, 2007 Hello... It's been a while since I coded last time... well, maybe I forgot something or what...I dont know, but looks like Im not as good at coding as I was before... anyway. I have a problem. I wanted to make a drug dealing script in VC for my mod (which was left dying for months, but i decided to return). Well heres is the code: :a 0001: wait 0 ms00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump if false ££a00D6: if 00038: $ar == 0 \\ integer values 004D: jump if false ££i0054: store_player $PLAYER_CHAR position_to $1E98 $1E99 $1E9A04C4: create coordinate $1 $2 $3 from actor $PLAYER_ACTOR offset 400.0 -475.2 0.002C0: set $A65 $A66 $1BF to ped path coords closest to $1 $2 $3 0376: $army = create random actor $A65 $A66 $1BF0004: $ar = 1 \\ integer values 0187: $p = create marker above actor $army 018B: show on radar $p 2:i 00D6: if 0 80E9: NOT player $PLAYER_CHAR 0 ()near actor $army radius 500.0 500.0004D: jump if false ££x0004: $ar = 0 \\ integer values 009B: destroy actor instantly $army 0164: disable_marker $p :x 00D6: if 0 0184: actor $army health >= 95004D: jump if false ££d 00D6: if 0 00E9: player $PLAYER_CHAR 0 ()near actor $army radius 1.0 1.0 004D: jump if false ££a020F: actor $army look_at_player $PLAYER_CHAR 022C: set actor $PLAYER_ACTOR to look at actor $army0372: set_actor $PLAYER_ACTOR anim 31 wait_state_time 2000 ms 0372: set_actor $army anim 31 wait_state_time 2000 ms0109: player $PLAYER_CHAR money += 200:d 0004: $ar = 0 \\ integer values0164: disable_marker $p01C2: remove references to actor $army0002: jump ££a It is in the main section of the script and there is no difference whether you are on mission or not. The thing is after several deals the game crashes. I hope someone will explain me the problem. Thank you. Link to comment Share on other sites More sharing options...
ZAZ Posted December 27, 2007 Share Posted December 27, 2007 At first the game will crash if player is not near army radius 500 because after destroying army in part :i the code runs directly into the check of :x 00D6: if 0 0184: actor $army health >= 95 004D: jump if false ££d after several deals the game crashes Because the wait_state_time codes will be read permanent, at 1000 times per second you must build in a switch to check a time of a few sekundes before wait_state_time codes should be read again or a check so the player must first leave the spot before he can start the deal again. CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
BEGINit Posted December 27, 2007 Author Share Posted December 27, 2007 About that :i to :x jump... well, I noticed that and fixed but that all wait_state_time thing... I didnt think about that at all. Thank you ZAZ. I will try to fix that and will write if I managed to do that. Thanx again Link to comment Share on other sites More sharing options...
BEGINit Posted December 28, 2007 Author Share Posted December 28, 2007 Ok, now I feel dumb. Could someone show me, how to fix this, because I cant get it right. Please... Link to comment Share on other sites More sharing options...
BEGINit Posted December 30, 2007 Author Share Posted December 30, 2007 (edited) HELP!! My main.scm suddenly became: 0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown) What the hell happened? Is it possible to bring back the "normal" code? Or all my game is gone forever and I should kill myself? I still have a little hope, because it still decompiles missions 0 to 54 (my missions) Edited December 30, 2007 by BEGINit Link to comment Share on other sites More sharing options...
ZAZ Posted December 30, 2007 Share Posted December 30, 2007 Sorry, dont know what happend. Did you get it by decompiling your mod main ? Did you keep your source text? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
BEGINit Posted December 31, 2007 Author Share Posted December 31, 2007 I just wanned to play my VC one morning, but after turning it on the game crashed. I opened my main and found this... Link to comment Share on other sites More sharing options...
ZAZ Posted December 31, 2007 Share Posted December 31, 2007 I just wanned to play my VC one morning, but after turning it on the game crashed. I opened my main and found this... So the compile process failed ? Make shure that you have enough freespace on that drive where the builded main.scm will be stored. Maybe you can upload your main.txt and we test it in our MB which MB version do you have ? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
BEGINit Posted December 31, 2007 Author Share Posted December 31, 2007 (edited) I have BW VC mission builder v1.1 but I tried to open with v1.3 and Sanny builder. The same. When I opened main.scm.txt - I found the same. What is interesting, that a part of a code is normal, but from certain point it becomes 000: (unknown) I put a link tu txt when i finish uploading it. Edited December 31, 2007 by BEGINit Link to comment Share on other sites More sharing options...
BEGINit Posted December 31, 2007 Author Share Posted December 31, 2007 text: http://www.megaupload.com/?d=967HM4JH Link to comment Share on other sites More sharing options...
BEGINit Posted January 1, 2008 Author Share Posted January 1, 2008 Umm so, is there anyone who knows if its possible to restore that 0000: (unknown) thing to a normal script? It would be great to get an answer ASAP Link to comment Share on other sites More sharing options...
BEGINit Posted January 5, 2008 Author Share Posted January 5, 2008 C'mon guys..I'm getting depressed Link to comment Share on other sites More sharing options...
SteaVor Posted January 5, 2008 Share Posted January 5, 2008 There's no way to restore the code - why didn't you keep a copy of the decompiled (plain-text) script? Link to comment Share on other sites More sharing options...
ZAZ Posted January 5, 2008 Share Posted January 5, 2008 C'mon guys..I'm getting depressed What you uploaded is a main.txt which was decompiled from your modded main.scm A big part was gone by compiling I assume. I had the same phenomenon as my freespace was gone. I modified mains and stored it by new name and again and again. And at anytime the freespace of that partition was gone which was used to store the compiled main Maybe other reasons could make disruption for exemble by using a other specific programm at same time as compile process You should always keep the basic original main.txt of your modified version. If not its very very sh*t CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
BEGINit Posted January 5, 2008 Author Share Posted January 5, 2008 Impossible? Damn... thats frustrating... well I had a backup with...ummm... 40missions...and the lost one was with...54 I think... What a pitty. Thanks for answering anyway... now I do backup everytime I make a mission... Link to comment Share on other sites More sharing options...
BEGINit Posted January 6, 2008 Author Share Posted January 6, 2008 Hello, I'd like to ask a few questions(about VC): 1. Is it possible to make actor walk and use cellphone at the same time? Well when i try tu use actor walk and hold cellphone opcodes at the same time, actor only walks, but doesnt use cellphone. In one mission I made a condition actor walk and if actor in that point it starts using cellphone. The thing is that he walks while using cellphone, BUT he doesnt stop walking even if he reaches the point. 2. I dont really understand how to take pictures in VC. I use opcode 04C5 which seems is if photo of a certain actor is taken (checked in original script and san andreas) piece of the code: :pic0001: wait 0 ms00D6: if 0 04C5: $bos004D: jump if false £pic 0213: $dgts = create pickup -120 (BRIEFCASE) type 2 at -972.128 -757.500 19.665 player has a camera, but when I take photos of actor $bos, nothing happens. 3. I wanted to make smoke. but when I used create gas smoke opcode, nothing happened. When I looked into the original code I didnt find anything (except that the gasgrenade is loaded). What do I need to do to make as. Do I really need to load gasgrenade? Thanks for answering... Link to comment 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