Jump to content

Can someone please help me with my custom threads?


ThePlague1988

Recommended Posts

ThePlague1988

Well I started coding this stuff when I wasn't that great at mission scripting and would like to finally update it to where it won't ever crash the game. But, I need a little help. Here is what I have right now, changed it a lot from how I originally made it.

 

 

:INFHLTHthread 'INFHLTH' :INFHLTH_10wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @INFHLTH_10 if 04AD:   actor $PLAYER_ACTOR in_water else_jump @INFHLTH_77 if and04AD:   actor $PLAYER_ACTOR in_water 0449:   actor $PLAYER_ACTOR in_a_car else_jump @INFHLTH_77 0322: kill_player $PLAYER_CHAR wait 1000 :INFHLTH_77wait 00222: set_player $PLAYER_CHAR health_to 200 jump @INFHLTH_10 :MYINFCHthread 'MYINFCH' :MYINFCH_10wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @MYINFCH_10 if 0449:   actor $PLAYER_ACTOR in_a_car else_jump @MYINFCH_99 03C0: 1@ = actor $PLAYER_ACTOR car if   Actor.Driving($PLAYER_ACTOR)else_jump @MYINFCH_10 Car.SetImmunities(1@, 1, 1, 1, 1, 1)053F: set_car 1@ tires_vulnerable 0 01EC: make_car 1@ very_heavy 1 :MYINFCH_99wait 500 Car.SetImmunities(1@, 0, 0, 0, 0, 0)053F: set_car 1@ tires_vulnerable 1 01EC: make_car 1@ very_heavy 0 jump @MYINFCH_10 :NIGZFLPthread 'NIGZFLP' :NIGZFLP_10wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @NIGZFLP_10 if   Actor.Driving($PLAYER_ACTOR)else_jump @NIGZFLP_10 03C0: 1@ = actor $PLAYER_ACTOR car if 01F4:   car 1@ flipped else_jump @NIGZFLP_10 Car.StorePos(1@, 10@, 11@, 12@)12@ += 2.0 // floating-point values Car.PutAt(1@, 10@, 11@, 12@)wait 250 jump @NIGZFLP_10 :MONEY69thread 'MONEY69':MONEY69_10 wait 1000if  Player.Defined($PLAYER_CHAR)else_jump @MONEY69_10 Player.Money($PLAYER_CHAR) += 2000000:MONEY69_56end_thread 

 

 

Now I don't think that the MONEY69 thread has anything to do with the game crashing, but I posted it incase there was a better way to give you money. Right at the start of the game. I remade parts of the game like when you first start out, you used to start at the lawyer's office. But, I made you start at the airport with all of the "Drug Money" that Sonny Forelli gave to you as a start. Things like that. By the way, since I'm still an amateur at coding I need some help. Cause everytime I look at the code and try to understand whats going on it confuses me more and more. Thanks in advance for the help guys (Love ya all for the wonderful help you've given me so far).

 

Nevermind, I think I got it.. here is the new finished code hopefully bug-free.

 

 

:INFHLTHthread 'INFHLTH' :INFHLTH_10wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @INFHLTH_10 if 04AD:   actor $PLAYER_ACTOR in_water else_jump @INFHLTH_99 if and04AD:   actor $PLAYER_ACTOR in_water 0449:   actor $PLAYER_ACTOR in_a_car else_jump @INFHLTH_99 0322: kill_player $PLAYER_CHAR wait 1000 jump @INFHLTH_10:INFHLTH_990222: set_player $PLAYER_CHAR health_to 200 jump @INFHLTH_10 :MYINFCHthread 'MYINFCH' :MYINFCH_10wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @MYINFCH_10 if 0449:   actor $PLAYER_ACTOR in_a_car else_jump @MYINFCH_127 03C0: 1@ = actor $PLAYER_ACTOR car Car.SetImmunities(1@, 1, 1, 1, 1, 1)053F: set_car 1@ tires_vulnerable 0 01EC: make_car 1@ very_heavy 1 jump @MYINFCH_10:MYINFCH_99Car.SetImmunities(1@, 0, 0, 0, 0, 0)053F: set_car 1@ tires_vulnerable 1 01EC: make_car 1@ very_heavy 0Car.RemoveReferences(1@):MYINFCH_127 jump @MYINFCH_10 :NIGZFLPthread 'NIGZFLP' :NIGZFLP_10wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @NIGZFLP_10 if   Actor.Driving($PLAYER_ACTOR)else_jump @NIGZFLP_10 03C0: 1@ = actor $PLAYER_ACTOR car if 01F4:   car 1@ flipped else_jump @NIGZFLP_10 Car.StorePos(1@, 10@, 11@, 12@)12@ += 2.0 // floating-point values Car.PutAt(1@, 10@, 11@, 12@)wait 250 jump @NIGZFLP_10 :MONEY69thread 'MONEY69':MONEY69_10 wait 1000if  Player.Defined($PLAYER_CHAR)else_jump @MONEY69_10 Player.Money($PLAYER_CHAR) += 27000000:MONEY69_56end_thread 

 

 

I need help with the door status crap where you lock doors when you get in and out of vehicles please help cause I don't want the game to crash half-way through a play of the game or something like that.

 

 

:NONAME_34wait 100 if 0443:   player $PLAYER_CHAR in_a_car else_jump @NONAME_34 03C1: $1388 = player $PLAYER_CHAR car 020A: set_car $1388 door_status_to 2 if 00E1:   key_pressed 0 7 else_jump @NONAME_34_59 020A: set_car $1388 door_status_to 1 :NONAME_34_59wait 100 020A: set_car $1388 door_status_to 2 if or00E1:   key_pressed 0 7 8443:   not player $PLAYER_CHAR in_a_car   Car.Wrecked($1388)else_jump @NONAME_34_59 020A: set_car $1388 door_status_to 1 Car.RemoveReferences($1388)jump @NONAME_34

 

 

Thanks in advance.

Edited by ThePlague1988

-Phil AKA (ThePlague1988)

 

C++/.NET/Java Programmer

Link to comment
Share on other sites

Ashwin.Star

 

when I wasn't that great at mission scripting

like now you are!

 

you need to have a look at here,

Cheat Code mode

download & open them with SB,

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.