ShadowCoderKing Posted June 30, 2009 Share Posted June 30, 2009 ok i am confused here i am trying to make a very simple mod witch is if you press backspace you die but i die instantly when i start game lol please help a new modder my CODE : {$CLEO .cs} 03A4: name_thread 'death' :pressdie2 00D6: if 0AB0: key_pressed 8 Actor.Health($PLAYER_ACTOR) = 0 0A93: end_custom_thread Link to comment Share on other sites More sharing options...
gtasearcher Posted June 30, 2009 Share Posted June 30, 2009 Well, sorry bud, but I made that a long time ago http://www.gtagarage.com/mods/show.php?id=5742 [it's the suicide script] Anyway your problem is that check is not valid. You need a "jf" [jump_if_false] aswell, and we must put it in a loop. So final code {$CLEO .cs}03A4: name_thread 'death':pressdie2wait 0 // REQUIRED00D6: ifPlayer.Defined($PLAYER_CHAR) // required toojf @pressdie2if0AB0: key_pressed 8jf @pressdie2Actor.Health($PLAYER_ACTOR) = 0goto @pressdie2 // we want to do it again, right? By the way, next time, use for CODE tags Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted June 30, 2009 Author Share Posted June 30, 2009 thanx heaps and dont worry wasnt gonna steal or anything just learning the way of code Link to comment Share on other sites More sharing options...
KyanoAng3l0 Posted June 30, 2009 Share Posted June 30, 2009 You can also use the JUMP code instead of the GOTO code, especially when it's CLEO. Link to comment Share on other sites More sharing options...
gtasearcher Posted June 30, 2009 Share Posted June 30, 2009 You can also use the JUMP code instead of the GOTO code, especially when it's CLEO. I know, but they're the same thing Link to comment Share on other sites More sharing options...
james227uk Posted June 30, 2009 Share Posted June 30, 2009 Your codes are missing a Player-DEFINED check too. Adds stability to the script. Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted June 30, 2009 Author Share Posted June 30, 2009 thanx guys 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