Jump to content

A question about Player.Defined($PLAYER_CHAR)


Nabx3n

Recommended Posts

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 smile.gif

 

PS: i use Main.scm NOT Cleo, cause i use Xbox.

Link to comment
Share on other sites

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
Share on other sites

lol, thanks for the infos man biggrin.gif

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. icon14.gif

Link to comment
Share on other sites

spaceeinstein

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
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.