Anurag_Anmol Posted September 28, 2010 Share Posted September 28, 2010 (edited) I managed to be able to use the magnet with a hydra by attaching it to the hydra. But that means that I won't be able to control it. Buuuut I managed to get it to release stuff attached to it, although it's prob is that I can't raise/lower it. The problem is on :HELIM_273 and :HELIM_321, here's the part that doesn't work. :HELIM_273if 0AB0: key_pressed 98 jf @HELIM_321 0796: get_crane_magnet $CRANE_MAGNET magnet_lane_length_to 2@ // float 2@ -= 0.1 0797: set_crane_magnet $CRANE_MAGNET magnet_lane_length_to 2@ // float :HELIM_321if 0AB0: key_pressed 104 jf @HELIM_369 0796: get_crane_magnet $CRANE_MAGNET magnet_lane_length_to 2@ // float 2@ += 0.1 0797: set_crane_magnet $CRANE_MAGNET magnet_lane_length_to 2@ // float Heres the full code. // 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 'HELIM' :HELIM_16wait 0 if Player.Defined($PLAYER_CHAR)jf @HELIM_16 :HELIM_43if and04A9: actor $PLAYER_ACTOR driving_heli 00E1: player 0 pressed_key 18 jf @HELIM_141 0811: 0@ = actor $PLAYER_ACTOR car // versionC 0788: enable_heli 0@ magnet 1wait 250:HELIM_96wait 0 if 00E1: player 0 pressed_key 18 jf @HELIM_96 0788: enable_heli 0@ magnet 0 Car.RemoveReferences(0@)wait 250 jump @HELIM_16 :HELIM_141if and Actor.DrivingVehicleType($PLAYER_ACTOR, #HYDRA)00E1: player 0 pressed_key 18 jf @HELIM_16 03C0: 0@ = actor $PLAYER_ACTOR car Model.Load($CRANE_MAGNET)wait 500 0681: attach_object $CRANE_MAGNET to_car 0@ with_offset 0.0 -35.0 2.0 rotation 0.0 0.0 0.0 Object.CollisionDetection($CRANE_MAGNET) = False0797: set_crane_magnet $CRANE_MAGNET magnet_lane_length_to 0.5 // floatwait 250:HELIM_240wait 0 if 00E1: player 0 pressed_key 4 jf @HELIM_273 0799: set_crane_magnet $CRANE_MAGNET release_stuff_from_magnet :HELIM_273if 0AB0: key_pressed 98 jf @HELIM_321 0796: get_crane_magnet $CRANE_MAGNET magnet_lane_length_to 2@ // float 2@ -= 0.1 0797: set_crane_magnet $CRANE_MAGNET magnet_lane_length_to 2@ // float :HELIM_321if 0AB0: key_pressed 104 jf @HELIM_369 0796: get_crane_magnet $CRANE_MAGNET magnet_lane_length_to 2@ // float 2@ += 0.1 0797: set_crane_magnet $CRANE_MAGNET magnet_lane_length_to 2@ // float :HELIM_369if 00E1: player 0 pressed_key 18 jf @HELIM_240 0682: detach_object $CRANE_MAGNET 0.0 0.0 0.0 collision_detection 0 Car.RemoveReferences(0@)wait 250jump @HELIM_16 Edited September 30, 2010 by Anurag_Anmol Link to comment https://gtaforums.com/topic/460056-hydra-magnet-mod-prob/ Share on other sites More sharing options...
Anurag_Anmol Posted September 30, 2010 Author Share Posted September 30, 2010 Bump! Oh yeah other question for my other cleo, 0AF4: 9@ = read_string_from_ini_file "cleo\CarSpawner.ini" section "CARSPAWNER" key "PersonalVehicle" Makes game crash when it does that. What I'm trying to do is get a string (#INFERNUS) and put it into 9@ for spawning and stuff. Just crashes the game! Heres the .ini file - [CARSPAWNER]PersonalVehicle=#INFERNUS // What car to spawn, keep the # at the front. Oh yeah and the problem with my script on the first post is that raising or lowering the magnet isn't working. :HELIM_273 raises it and 321 lowers it. But they aren't working...! Link to comment https://gtaforums.com/topic/460056-hydra-magnet-mod-prob/#findComment-1060144938 Share on other sites More sharing options...
Adler Posted September 30, 2010 Share Posted September 30, 2010 For your second question, #INFERNUS (which only exists in Sanny) should translate to the number ID of the car so it should be an integer not a string. But I'm not sure about the crane magnet. I never worked with those before sorry. Link to comment https://gtaforums.com/topic/460056-hydra-magnet-mod-prob/#findComment-1060144974 Share on other sites More sharing options...
Silent Posted September 30, 2010 Share Posted September 30, 2010 heli magnet =/= crane magnet. Try to delete all crane magnet stuff, 0788 opcode should work OK alone. Link to comment https://gtaforums.com/topic/460056-hydra-magnet-mod-prob/#findComment-1060145141 Share on other sites More sharing options...
Anurag_Anmol Posted October 2, 2010 Author Share Posted October 2, 2010 With hydras 0788 fails -thumbs down-, with helis, 0788 is good -thumbs up- Link to comment https://gtaforums.com/topic/460056-hydra-magnet-mod-prob/#findComment-1060147761 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