crashoverride93 Posted January 15, 2016 Share Posted January 15, 2016 In gta 3 i am trying to do bassicly the same thing I did at this link but in gta 3 instead of vice city http://gtaforums.com/topic/837594-coding-a-small-mod-in-vice-city/?do=findComment&comment=1068377835and again my code is below. Also is there something capable of converting lo level code like mine to high level code because I don't understand the high level syntex ? {$CLEO .cs} //-------------MAIN--------------- thread 'HNS' :HNS_1 wait 100 ms 8256: player $PLAYER_CHAR defined 004D: jump_if_false @HNS_1 :HNS_2 wait 0 8184: actor $PLAYER_CHAR health >= 99 8184: not actor $PLAYER_CHAR health <= 101 004D: jump_if_false @HNS_4 :HNS_3 wait 0 ms 0335: set_free_paynspray_to 1 jump @HNS_2 :HNS_4 wait 0 ms 0335: set_free_paynspray_to 0 jump @HNS_2 Link to comment Share on other sites More sharing options...
xNCx Posted January 15, 2016 Share Posted January 15, 2016 Wow you messed it all. 8184: actor $PLAYER_CHAR health >= 998184: not actor $PLAYER_CHAR health <= 101 One opcode = one function. Opcode 8184 is a NOT opcode and it checks if actor's health IS NOT >= x i.e. the health level is < x, where x =number. It doesn't do anything else You also missed the operator IF. You can't simply put 8184: in your script, you have to write IF 8184: $PLAYER_CHAR is used for PLAYER specified opcodes. Use $PLAYER_ACTOR for actor specified. I would change this to if and0184: actor $PLAYER_ACTOR health >= 998184: not actor $PLAYER_ACTOR health >= 101then0335: set_free_paynspray_to 1else0335: set_free_paynspray_to 0end Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 What part of the code do I change I'm confused Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 I Tried where you told me to no avail and for 5hours I've been modding this one code with no luck I either crash the game or its always free or never free I can't figure out how to do it Link to comment Share on other sites More sharing options...
xNCx Posted January 16, 2016 Share Posted January 16, 2016 You need to put 0000: at the beginning of your cleo script. {$CLEO .cs}//-------------MAIN---------------0000: :HNS_1wait 250 if and0184: actor $PLAYER_ACTOR health >= 998184: not actor $PLAYER_ACTOR health >= 101then0335: set_free_paynspray_to 1else0335: set_free_paynspray_to 0end jump @HNS_1 Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 OK thanks that works perfectly is it also possible to add the 125 check Because from what I have seen it looks like they will conflict Link to comment Share on other sites More sharing options...
xNCx Posted January 16, 2016 Share Posted January 16, 2016 Where do you want to put your "125 check"? Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 I don't have a clue how to add it I was thinking of adding another thread to check it if there's a simpler way let me know I kinda feel stupid because I can't figure this out Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 My original Idea was to add it if it fails the one hundred check by jumping to it if it failed the 100 check. Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 My attempt to add it is here but sanny builder don't like it {$CLEO .cs} //-------------MAIN--------------- 0000: :HNS_1 wait 250 if and 0184: actor $PLAYER_ACTOR health >= 99 8184: not actor $PLAYER_ACTOR health >= 101 then 0335: set_free_paynspray_to 1 else Jump @HNS_2 :HNS_2 if and 0184: actor $PLAYER_ACTOR health >= 124 8184: not actor $PLAYER_ACTOR health >= 126 then 0335: set_free_paynspray_to 1 else 0335: set_free_paynspray_to 0 end Jump @HNS_1 Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 I got it working Never mind its stuck on always free Sanny likes this but its always free I only want two values to work 125 and 100 {$CLEO .cs} //-------------MAIN--------------- 0000: :HNS_1 wait 250 if and 0184: actor $PLAYER_ACTOR health >= 99 8184: not actor $PLAYER_ACTOR health >= 101 then 0335: set_free_paynspray_to 1 else Jump @HNS_2 :HNS_2 if and 0184: actor $PLAYER_ACTOR health >= 124 8184: not actor $PLAYER_ACTOR health >= 126 then 0335: set_free_paynspray_to 1 else 0335: set_free_paynspray_to 0 end Jump @HNS_1 I posted the wrong code Here is the tweaked one {$CLEO .cs} //-------------MAIN--------------- 0000: :HNS_1 wait 250 if and 0184: actor $PLAYER_ACTOR health >= 99 8184: not actor $PLAYER_ACTOR health >= 101 then 004D: jump if false @HNS2 0335: set_free_paynspray_to 1 end jump @HNS_1 :HNS_2 if and 0184: actor $PLAYER_ACTOR health >= 124 8184: not actor $PLAYER_ACTOR health >= 126 then 0335: set_free_paynspray_to 1 else 0335: set_free_paynspray_to 0 end Jump @HNS_1 Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 I'm thinking its not possible Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 I got it working perfectly 125 and 100 Here is the perfect script with both checks after my mind cleared it became clear. {$CLEO .cs} //-------------MAIN--------------- 0000: :HNS_1 wait 250 if and 0184: actor $PLAYER_ACTOR health >= 99 8184: not actor $PLAYER_ACTOR health >= 101 then 0335: set_free_paynspray_to 1 else 0335: set_free_paynspray_to 0 jump @HNS_2 else 0335: set_free_paynspray_to 0 end jump @HNS_1 :HNS_2 if and 0184: actor $PLAYER_ACTOR health >= 124 8184: not actor $PLAYER_ACTOR health >= 126 then 0335: set_free_paynspray_to 1 else 0335: set_free_paynspray_to 0 end jump @HNS_1 Actually I see where it looks like an error might be but it works perfect Link to comment Share on other sites More sharing options...
xNCx Posted January 16, 2016 Share Posted January 16, 2016 (edited) Why do you write so many posts in a row? Please use the edit button, unless you have something very important to write. Why do you want to create separate threads? Wouldn't this be better? :HNS_1wait 250if and0184: actor $PLAYER_ACTOR health >= 998184: not actor $PLAYER_ACTOR health >= 101then0335: set_free_paynspray_to 1else0335: set_free_paynspray_to 0endif and0184: actor $PLAYER_ACTOR health >= 1248184: not actor $PLAYER_ACTOR health >= 126then0335: set_free_paynspray_to 1else0335: set_free_paynspray_to 0endjump @HNS_1 Edited January 16, 2016 by xNCx Link to comment Share on other sites More sharing options...
crashoverride93 Posted January 16, 2016 Author Share Posted January 16, 2016 (edited) OK neither 100 or 125 works without the seperat threads because the code cancels each other out notice I jumped after failing and setting it two zero for the other test. Edited January 16, 2016 by crashoverride93 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