Nabx3n Posted December 29, 2010 Share Posted December 29, 2010 is Player.Defined($PLAYER_CHAR) an important check on every thread? and i don't mean all the threads but im talking about threads that you control, such us scripts that only works when you do something like pressing a button or driving or die or something like that (not spawn cars,objects, peds...etc). is it ok to delete this opcode from threads? for example: :EXAMPLEthread 'EXAMPLE' :EXAMPLE_19wait 0 if Actor.Defined($PLAYER_CHAR)else_jump @EXAMPLE_1900E1: player 0 pressed_key 6 else_jump @EXAMPLE_19 05DE: AS_actor $PLAYER_ACTOR walk_around_ped_pathjump @EXAMPLE_19 becomes: :EXAMPLEthread 'EXAMPLE' :EXAMPLE_19wait 0 if00E1: player 0 pressed_key 6 else_jump @EXAMPLE_19 05DE: AS_actor $PLAYER_ACTOR walk_around_ped_pathjump @EXAMPLE_19 cause i think the game wouldn't set the controllers to work untill the game loads right? i tried that on some threads and it doesn't seam to cause any problems with these kind of threads, so is it still ok?. thank you PS: i use Main.scm NOT Cleo, cause i use Xbox. Link to comment https://gtaforums.com/topic/466297-a-question-about-playerdefinedplayer_char/ Share on other sites More sharing options...
TheSiggi Posted December 29, 2010 Share Posted December 29, 2010 0256: returns true if the player is neither wasted or busted = alive and not arrested. The script engine starts working as soon as the loading process is over. The check is often used to permit unnessessary looping and can be removed but I don't see the point for removing it... Link to comment https://gtaforums.com/topic/466297-a-question-about-playerdefinedplayer_char/#findComment-1060269792 Share on other sites More sharing options...
Nabx3n Posted December 29, 2010 Author Share Posted December 29, 2010 lol, thanks for the infos man the reason is cause i passed the main.scm limit so i won't to delete this opcode from every similiar script to decrease the space of the .scm. Link to comment https://gtaforums.com/topic/466297-a-question-about-playerdefinedplayer_char/#findComment-1060269806 Share on other sites More sharing options...
spaceeinstein Posted December 29, 2010 Share Posted December 29, 2010 There are much better ways to decrease the size of the code in the "MAIN" section. Check out how Deezire manage to squeeze so much into the file in TTDISA. Link to comment https://gtaforums.com/topic/466297-a-question-about-playerdefinedplayer_char/#findComment-1060269842 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