Shmoopy Posted October 8, 2013 Share Posted October 8, 2013 (edited) Sets : - Ped mass : Default value is 70.00AB1: set_actor @ActorMass params 2 actor $PLAYER_ACTOR mass 70.0 :ActorMasswait 0if Actor.Defined([email protected])then0A96: [email protected] = actor [email protected] [email protected] += 1400A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0end0AB2: ret 0 - Ped air resistance : Default value is 0.0 0AB1: set_actor @ActorAirres params 2 actor $PLAYER_ACTOR air_resistance 0.0 :ActorAirreswait 0if Actor.Defined([email protected])then0A96: [email protected] = actor [email protected] [email protected] += 1520A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0end0AB2: ret 0 Gets : - Ped brightness : Returns a float value , 50.0 means that CJ is fully exposed to sunlight This was used by rockstar in the mission where CJ must steal the Lyrics , it checks whether CJ is hiding in the shadows or not . 0AB1: get_actor @ActorBrightness params 1 actor $PLAYER_ACTOR brightness $result :ActorBrightnesswait 0if Actor.Defined([email protected])then0A96: [email protected] = actor [email protected] [email protected] += 3000A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0end0AB2: ret 1 [email protected] - Ped speed : Returns a float value of the acutal ped movement speed .0AB1: get_actor @ActorSpeed params 1 actor $PLAYER_ACTOR speed $result :ActorSpeedwait 0if Actor.Defined([email protected])then0A96: [email protected] = actor [email protected] [email protected] += 720A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0end0AB2: ret 1 [email protected] Edited October 10, 2013 by Fable11 Link to comment Share on other sites More sharing options...
Seemann Posted October 9, 2013 Share Posted October 9, 2013 There is no need to put wait 100 after each code instruction. Why the result of last two functions is a number if their description says: true means. You have to use return_true and return_false opcodes instead. And giant empty spaces in the beginning of each function confuse me. For what? Sanny Builder 3 • SA Memory Handling • OpenIV • gtamodding.com CLEO.li - The CLEO Library - Official site Link to comment Share on other sites More sharing options...
Shmoopy Posted October 9, 2013 Author Share Posted October 9, 2013 (edited) There is no need to put wait 100 after each code instruction. Why the result of last two functions is a number if their description says: true means. You have to use return_true and return_false opcodes instead. And giant empty spaces in the beginning of each function confuse me. For what? Yes i need to rewrite the topic If i dont put a wait beween 0A96: [email protected] = actor [email protected] struct and 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 wouldn't the game execute both opcodes instantly and therefore crash ? Edited October 9, 2013 by Fable11 Link to comment Share on other sites More sharing options...
Silent Posted October 9, 2013 Share Posted October 9, 2013 No. Link to comment Share on other sites More sharing options...
fastman92 Posted October 9, 2013 Share Posted October 9, 2013 (edited) 0001 - WAITSanny Builder opcodes.txt: 0001: wait 0 msSanny Builder SASCM.INI: 0001=1,wait %1d% msSanny Builder keyword: wait ( wait 0 )Description: WAIT command stops processing of the current thread and lets the GTA SA to process other active SCM threads and execute different actions. The number specifies a minimum number of milliseconds of current thread inactivity. When a number of milliseconds is less or equal to zero, then current thread will be executed as soon as possible. GTA SA stops the current thread, executes other actions and comes back to process this thread again until it encounters WAIT command again.Native name: WAITOpcode definition: void wait (int time); Parameters:1) Passed: integer, time to wait expressed in milliseconds. 1000 ms = 1 secondReturns true or false? No. Edited October 9, 2013 by fastman92 Link to comment Share on other sites More sharing options...
Wesser Posted October 9, 2013 Share Posted October 9, 2013 1 second takes 1000 milliseconds. Your mistype. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Deji Posted October 10, 2013 Share Posted October 10, 2013 Good to see an attempt to help the fellow modder, but try again when you have 100 or more functions and some better coding standards Or perhaps you intended this to be a topic where we can all post some helpful functions.. I really don't know... Link to comment Share on other sites More sharing options...
Shmoopy Posted October 10, 2013 Author Share Posted October 10, 2013 Good to see an attempt to help the fellow modder, but try again when you have 100 or more functions and some better coding standards Or perhaps you intended this to be a topic where we can all post some helpful functions.. I really don't know... Like i give a sh*t about your opinion , i'll post whatever i want whenever i want , so stop acting like u're the best out there . Link to comment Share on other sites More sharing options...
Silent Posted October 10, 2013 Share Posted October 10, 2013 so stop acting like u're the best out there . Isn't that true though? Link to comment Share on other sites More sharing options...
Deji Posted October 10, 2013 Share Posted October 10, 2013 Good to see an attempt to help the fellow modder, but try again when you have 100 or more functions and some better coding standards Or perhaps you intended this to be a topic where we can all post some helpful functions.. I really don't know... Like i give a sh*t about your opinion , i'll post whatever i want whenever i want , so stop acting like u're the best out there . I was actually trying to be supportive, but whatever. One of the most important things to learn in coding is how to take all sorts of criticism, because while it may feel harsh, it's probably true. Silent 1 Link to comment Share on other sites More sharing options...
Silent Posted October 10, 2013 Share Posted October 10, 2013 Ped speed snippet looks wrong too. Besides, isn't GET_CHAR_SPEED pretty much the thing you wanted to achieve? Link to comment Share on other sites More sharing options...
Shmoopy Posted October 10, 2013 Author Share Posted October 10, 2013 I was actually trying to be supportive but try again when you have 100 or more functions and some better coding standards Yes indeed Link to comment Share on other sites More sharing options...
Deji Posted October 10, 2013 Share Posted October 10, 2013 (edited) We're playing the quote game? take all sorts of criticism, because while it may feel harsh, it's probably true. Just let it go. Edited October 10, 2013 by Deji Link to comment Share on other sites More sharing options...
aStiffSausage Posted October 11, 2013 Share Posted October 11, 2013 Idea of this topic is good, though I kind of think it's too much in hands of one person. A topic like this, with just links in first post to posts which contain coding snippet, would keep the thread pretty organised and would help a lot when it comes to searching. And, limiting coding snippets to one per post, would allow direct linking to correct snippet.Example of first post:Ped massPed air resistanceCar handling and offsets to different values You probably got the idea. Link to comment Share on other sites More sharing options...
Seemann Posted October 13, 2013 Share Posted October 13, 2013 Isn't better to make a wiki article then, so anyone can contribute, add new functions, fix mistakes, etc? TheGodfather. 1 Sanny Builder 3 • SA Memory Handling • OpenIV • gtamodding.com CLEO.li - The CLEO Library - Official site 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