-ATP- Posted March 26, 2011 Share Posted March 26, 2011 (edited) Anybody knows what things this opcode checks? 88B4: not test $390 bit 1 Edited March 26, 2011 by -ATP- Link to comment Share on other sites More sharing options...
Adler Posted March 26, 2011 Share Posted March 26, 2011 Deji's Doc on Bits Link to comment Share on other sites More sharing options...
OrionSR Posted March 26, 2011 Share Posted March 26, 2011 88B4: not test $390 bit 1 This opcode will evaluate the specified variable and return the value of TRUE if the 2nd bit is NOT equal to 1. Binary number: 11111111111111111111111111111101, the 2nd bit is NOT 1 -- so the statement is true. Very few routines in San Andreas use bitmask flags. They are used (almost) exclusively by the various dating routines. Global variable $390 is used in the flow control of the dates. $390 bit 1 flags that the GF_Date routine is active -- CJ is on a date. So, as used in the standard script: 88B4:if not test $390 bit 1 jf @POOL_439 0209: [email protected] = random_int_in_ranges 0 2 Means that: If CJ is not on a date (if he is then jump to the label @POOL_$439) then set [email protected] to a random number between 0 and 2 and continue. Link to comment Share on other sites More sharing options...
Wesser Posted May 5, 2011 Share Posted May 5, 2011 The meaning of 020D is inverted. It should be: 020d=1, car %1d% unflipped It probably returns true whether a wheel touches the ground. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Silent Posted May 5, 2011 Share Posted May 5, 2011 It probably returns true whether a wheel touches the ground. I doubt it, as 09D0 already exist But yeah, 'flipped' opcode returns true when the car is upside down (both in air and on ground), so it may be a inversion of this opcode (...both in air and on ground). Deji will surely update it in v2. Link to comment Share on other sites More sharing options...
ZAZ Posted May 5, 2011 Share Posted May 5, 2011 (edited) It probably returns true whether a wheel touches the ground. I doubt it, as 09D0 already exist But yeah, 'flipped' opcode returns true when the car is upside down (both in air and on ground), so it may be a inversion of this opcode (...both in air and on ground). Deji will surely update it in v2. to make it complete if and01F4: car [email protected] flipped// --- works like described81F3: NOT car [email protected] airborne//--- opposite of 89D0:jf @Flipsub Edited May 5, 2011 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
DK22Pac Posted June 11, 2011 Share Posted June 11, 2011 I don't know, does anyone else know it, but... 016F: create_shadow_type 3 rotation [email protected] size 2.0 intensity 255 RGB 255 0 0 at [email protected] [email protected] [email protected] The second param is an angle in radians. To convert degrees to radians: 0174: [email protected] = car [email protected] Z_anglediv([email protected], 57.2957795) //degrees to radians Link to comment Share on other sites More sharing options...
ZAZ Posted June 11, 2011 Share Posted June 11, 2011 (edited) 016F: create_particle 1 makes shadow on the ground Edited June 12, 2011 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
DK22Pac Posted June 11, 2011 Share Posted June 11, 2011 @ZAZ I do not need help on it. I just noticed that "rotation factor" means angle in radians. Part of my code, attaching tailight to vehicle: 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 [email protected] [email protected] // PATCH CSHADOW_RENDER 0A8C: write_memory 0x7079FA size 4 value DistanceToGround virtual_protect true 0A8C: write_memory 0x707A1F size 4 value TextureAdress virtual_protect true 0174: [email protected] = car [email protected] Z_angle div([email protected], 57.2957795) // DEGREE TO RADIAN 050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected] 0087: [email protected] = [email protected] 0063: [email protected] -= [email protected] 006B: [email protected] *= RedLimit 0073: [email protected] /= [email protected] 0092: [email protected] = float [email protected] to_integer if [email protected] == true then 016F: create_shadow_type 3 rot [email protected] size SizeForBike Intensity [email protected] 0 0 at [email protected] [email protected] [email protected] 016F: create_shadow_type 3 rot [email protected] size SizeForCar Intensity [email protected] 0 0 at [email protected] [email protected] [email protected] end // DEFAULT 0A8C: write_memory 0x7079FA size 4 value DefaultDistanceToGround virtual_protect true 0A8C: write_memory 0x707A1F size 4 value DefaultTextureAdress virtual_protect true Link to comment Share on other sites More sharing options...
ZAZ Posted June 12, 2011 Share Posted June 12, 2011 @ZAZI do not need help on it. I just noticed that "rotation factor" means angle in radians. Part of my code, attaching tailight to vehicle: 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 [email protected] [email protected] // PATCH CSHADOW_RENDER 0A8C: write_memory 0x7079FA size 4 value DistanceToGround virtual_protect true 0A8C: write_memory 0x707A1F size 4 value TextureAdress virtual_protect true 0174: [email protected] = car [email protected] Z_angle div([email protected], 57.2957795) // DEGREE TO RADIAN 050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected] 0087: [email protected] = [email protected] 0063: [email protected] -= [email protected] 006B: [email protected] *= RedLimit 0073: [email protected] /= [email protected] 0092: [email protected] = float [email protected] to_integer if [email protected] == true then 016F: create_shadow_type 3 rot [email protected] size SizeForBike Intensity [email protected] 0 0 at [email protected] [email protected] [email protected] 016F: create_shadow_type 3 rot [email protected] size SizeForCar Intensity [email protected] 0 0 at [email protected] [email protected] [email protected] end // DEFAULT 0A8C: write_memory 0x7079FA size 4 value DefaultDistanceToGround virtual_protect true 0A8C: write_memory 0x707A1F size 4 value DefaultTextureAdress virtual_protect true ups, was confused, i tried something with 0174: [email protected] = car [email protected] Z_angle div([email protected], 57.2957795) // DEGREE TO RADIAN but got only weired values I would like to see what you mean but your script snippet have to much unknown variables CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
DK22Pac Posted June 12, 2011 Share Posted June 12, 2011 @ZAZ Try this, must work. {$CLEO .cs}0000:while true if player.Defined(0) then if actor.Driving($player_actor) then 0811: [email protected] = actor $player_actor car_nosave 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 -3.0 0.0 // change offset_ShadExp to offset_Handman 0A8C: write_memory 0x707A1F size 4 value 0xC40404 virtual_protect true 0174: [email protected] = car [email protected] Z_angle div([email protected], 57.2957795) 016F: create_shadow_type 3 rotation [email protected] size 1.0 255 0 255 0 at [email protected] [email protected] [email protected] end end 003D:end Link to comment Share on other sites More sharing options...
ZAZ Posted June 12, 2011 Share Posted June 12, 2011 @ZAZTry this, must work. {$CLEO .cs}0000:while true if player.Defined(0) then if actor.Driving($player_actor) then 0811: [email protected] = actor $player_actor car_nosave 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 -3.0 0.0 // change offset_ShadExp to offset_Handman 0A8C: write_memory 0x707A1F size 4 value 0xC40404 virtual_protect true 0174: [email protected] = car [email protected] Z_angle div([email protected], 57.2957795) 016F: create_shadow_type 3 rotation [email protected] size 1.0 255 0 255 0 at [email protected] [email protected] [email protected] end end 003D:end amazing which file contains the handman? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Wesser Posted June 12, 2011 Share Posted June 12, 2011 It's the particle.txd file. This may be fix the lag with no other glitches (I believe). 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
DK22Pac Posted June 12, 2011 Share Posted June 12, 2011 (edited) @Wesser I used your code for making tailight) Works fine, but sometimes camera is "jigging" (like when you are stand at car and start run to it). Edit: OK. Maybe it caused because of other scripts which manipalated camera. Edited June 12, 2011 by DK22Pac Link to comment Share on other sites More sharing options...
radioman Posted June 12, 2011 Share Posted June 12, 2011 @WesserI used your code for making tailight) Works fine, but sometimes camera is "jigging" (like when you are stand at car and start run to it). Edit: OK. Maybe it caused because of other scripts which manipalated camera. Uh, just a friendly heads up, but this is the wrong section-we have a seperate section for IV modding(this one is for III modding ONLY). You posted screenshots of IV, which means it needs to be in the IV Modding section..... Link to comment Share on other sites More sharing options...
Silent Posted June 12, 2011 Share Posted June 12, 2011 Haha, it's SA mod xP Link to comment Share on other sites More sharing options...
fireguy109 Posted June 12, 2011 Share Posted June 12, 2011 Haha, it's SA mod xP I would never have guessed, that's fr*cking amazing. EDIT that gif sucks on this skin Link to comment Share on other sites More sharing options...
fastman92 Posted November 14, 2011 Share Posted November 14, 2011 Part of opcode 823: case 0x823: CScriptThread__getNumberParams((CScriptThread *)a2, 4u); v167 = PedPool; v165 = (int)CPool_CPed___atHandle(PedPool, opcodeParameters[0]); v166 = (int)CPool_CPed___atHandle(v167, opcodeParameters[1]); v207 = opcodeParameters[2]; v164 = CTask__operator new(120); v216 = v164; v247 = 7; if ( v164 ) { LODWORD(v212.x) = 0; LODWORD(v212.y) = 0; LODWORD(v212.z) = 0; v168 = CTask_87078C__constructor( (void *)v164, "COMMAND_TASK_GREET_PARTNER", v166, 1, v207, opcodeParameters[3], 0, 0, 0); Look at COMMAND_TASK_GREET_PARTNER There is GTA IV native: http://www.gtamodding.com/index.php?title=TASK_GREET_PARTNER TASK_GREET_PARTNER Link to comment Share on other sites More sharing options...
Midnightz Posted January 14, 2012 Share Posted January 14, 2012 The behavior of opcode: 83D9: not save_done ...is such that it checks if the player has exited the save menu (after saving or cancelling regardless). Is there a method/opcode/hack to check if the game was actually saved or just canceled - to determine which? Thanks, -Midnightz Link to comment Share on other sites More sharing options...
ZAZ Posted January 14, 2012 Share Posted January 14, 2012 The behavior of opcode: 83D9: not save_done ...is such that it checks if the player has exited the save menu (after saving or cancelling regardless). Is there a method/opcode/hack to check if the game was actually saved or just canceled - to determine which? Thanks, -Midnightz i assume it checks only for one time, like this meaning: "if user ever made a save" i don't know any way to check if a save was done again but the save script of origin main.scm make the player first frozen which can be checked CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
fastman92 Posted January 14, 2012 Share Posted January 14, 2012 The behavior of opcode: 83D9: not save_done ...is such that it checks if the player has exited the save menu (after saving or cancelling regardless). Is there a method/opcode/hack to check if the game was actually saved or just canceled - to determine which? Thanks, -Midnightz i assume it checks only for one time, like this meaning: "if user ever made a save" i don't know any way to check if a save was done again but the save script of origin main.scm make the player first frozen which can be checked It returns true always when user came back from Menu >> Save game, because it`s really set up by 03D8 opcode. 03D8 - set menu.isSaveDone, pause game, go to "save game" menu 03D9 - should happen when the game is resumed, user came back from "save game" menu. It doesn`t determine whether user made a save, but whether 03D8: show_save_screen was executed currently. The game automatically resets menu.isSaveDone to 0 after the first processing SCM scripts. case 0x3D8: if ( getPlayerPed(-1) ) { v132 = getPlayerPed(-1)->PedFlags.Flags1; if ( !(BYTE1(v132) & 1) ) { menu.isSaveDone = 1; v133 = (CPhysical *)getPlayerPed(-1); CPhysical__setSpeed(v133, 0.0, 0.0, 0.0); v134 = getPlayerPed(-1); sub_45AFB0(v134, 0, 0, 0); } } return 0; case 0x3D9: if ( menu.bIsActive || (v151 = 1, menu.isSaveDone) ) v151 = 0; CScriptThread__setCondResult(a2, v151); return 0; Link to comment Share on other sites More sharing options...
Waltzing Mouse Posted January 14, 2012 Share Posted January 14, 2012 Technically converting degrees to radians is (x*pi)/180 but 180/pi is ~57.29 so you can use that to some extent, though in pure mathematics the result is incorrect after a certain number of decimal places. Link to comment Share on other sites More sharing options...
Midnightz Posted January 14, 2012 Share Posted January 14, 2012 (edited) Thanks for the replies and help guys. fastman92, if I'm reading that code right, it's just checking if the game reset 03D8 to 0, correct? I'm not trying to intercept the original script to determine if the save menu was opened. I need some way of checking if an actual save was made or if the player canceled from the save menu. Why: I've written a code similar to the original for a new savepoint. My code advances time 6 hours, the same as any other save works. The problem is that I have no way of determining if a save was made or saving was canceled and my code, without that type of check, advances time for both scenarios. EDIT: I guess a better way to put it is this... How can I determine what the player selected in the save menu? A Save Slot OR Cancel. Edited January 14, 2012 by Midnightz Link to comment Share on other sites More sharing options...
fastman92 Posted January 14, 2012 Share Posted January 14, 2012 I have no time for this. It is possible when you patch some menu routine. Link to comment Share on other sites More sharing options...
DK22Pac Posted March 9, 2012 Share Posted March 9, 2012 (edited) 03ED: set_car [email protected] enable_taxi_light true Isn't it? Edited March 9, 2012 by DK22Pac Link to comment Share on other sites More sharing options...
Deji Posted March 9, 2012 Share Posted March 9, 2012 If yeh wanna check if the game has been saved, you could compare the save path: 0xC15F60 Or the save file handle: 0xC16EF0 Link to comment Share on other sites More sharing options...
stanesicmario Posted June 19, 2012 Share Posted June 19, 2012 Hi I need help I am new in the gta sa multiplayer and I had buy the server but i need the scripter-peoples to work for me but it need to wright on the croatian languages??? Is anyone here the scripter who can help me please ???? And yess of course I will pay you with paypal ...thx to all for scripting mods Link to comment Share on other sites More sharing options...
Adler Posted June 20, 2012 Share Posted June 20, 2012 Hi I need help I am new in the gta sa multiplayer and I had buy the server but i need the scripter-peoples to work for me but it need to wright on the croatian languages??? Is anyone here the scripter who can help me please ???? And yess of course I will pay you with paypal ...thx to all for scripting mods You're in the wrong topic, and it'd be best not to ask for help without first showing proof of progress so people would be inclined to help you. And payment, I'm sure, isn't enough to entice people to help you out as most modders are intrinsically motivated to create mods, and adding money as a factor in this only complicates matters. Link to comment Share on other sites More sharing options...
Link2012 Posted August 27, 2012 Share Posted August 27, 2012 (edited) Opcode 0876 created birds, but it is written a bit wrong internally, oh R* programmers... Ignore the bird color in red 0876: create_birds_at 0 0 0 destination 0 0 0 birds_count 3 bird_type 0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 3.0 2.0008C: [email protected] = float_to_integer [email protected]: [email protected] = float_to_integer [email protected]: [email protected] = float_to_integer [email protected]: create_birds_at [email protected] [email protected] [email protected] destination -2630 1411 28 birds_count 3 bird_type 0 The opcode expects integers instead of floats in the coordinates params, If you see in main.scm the opcode send floats as coordinates and then the bird will be spawned in some crazy place (and then removed since it's too far from the camera). Destination only serves to describe the bird angle... EDIT: I was wrong about topic title ok, Topic title shouldn't change Edited August 28, 2012 by Link2012 Link to comment Share on other sites More sharing options...
Deji Posted August 27, 2012 Share Posted August 27, 2012 Haha. Fun find (I'm sure this was supposed to be in the SA opcode topic, though ). I actually thought it was to block birds in a specified area, but had doubts due to the integer params and thought it might block more than one thing. Never bothered to actually test it, though. Just theorized a lot 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