Jump to content

what's wrong with this script


Recommended Posts

crashoverride93

What's wrong with this script?

 

It seems to freeze apon entering a car I think it has something to do with end not being there but sanny complains when I try to add them.

 

{$CLEO .cs}

0000: PHIIPC

:PHIIPC_00

WAIT 100

IF

0256: player $PLAYER_CHAR defined

REPEAT UNTIL TRUE

 

 

WHILE TRUE

WAIT 100

IF OR

00E0: player $PLAYER_CHAR driving

0443: player $PLAYER_CHAR in_a_car

JF @PHIIPC_01

REPEAT UNTIL TRUE

 

 

WHILE TRUE

WAIT 100

00DA: 0@ = player $PLAYER_CHAR car

IF OR

0ADB: 0@ = car_model #POLICE name

0ADB: 0@ = car_model #ENFORCER name

0ADB: 0@ = car_model #FBICAR name

0ADB: 0@ = car_model #BARRACKS name

0ADB: 0@ = car_model #RHINO name

JF @PHIIPC_01

WHILE TRUE

WAIT 100

IF

0442: player $PLAYER_CHAR in_car 0@

jf @PHIIPC_01

01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 1

01F0: set_max_wanted_level_to 0

jump @PHIIPC_00

 

 

:PHIIPC_01

IF OR

80E0: not player $PLAYER_CHAR driving

8443: not player $PLAYER_CHAR in_a_car

80DA: not 0@ = player $PLAYER_CHAR car

8ADB: not 0@ = car_model #POLICE name

8ADB: not 0@ = car_model #ENFORCER name

8ADB: not 0@ = car_model #FBICAR name

8ADB: not 0@ = car_model #BARRACKS name

8ADB: not 0@ = car_model #RHINO name

jf @PHIIPC_00

01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 0

01F0: set_max_wanted_level_to 6

jump @PHIIPC_00

 

I know I mixed high and low level formats but that's because I don't know how to otherwise go about jump if false to another condition.

Edited by crashoverride93
Link to comment
https://gtaforums.com/topic/880752-whats-wrong-with-this-script/
Share on other sites

Don't works for SA, it's a VC cleo script
after recompiling by VC mode you'll get this

{$CLEO .cs}//-------------MAIN---------------0000: NOP :NONAME_2wait 100 if    Player.Defined($PLAYER_CHAR)wait 100 if or00E0:   player $PLAYER_CHAR driving 0443:   player $PLAYER_CHAR in_a_car jf @NONAME_144 wait 100 00DA: 0@ = player $PLAYER_CHAR car if or0ADB: 0@ = car_model #POLICE name 0ADB: 0@ = car_model #ENFORCER name 0ADB: 0@ = car_model #FBICAR name 0ADB: 0@ = car_model #BARRACKS name 0ADB: 0@ = car_model #RHINO name jf @NONAME_144 wait 100 if 0442:   player $PLAYER_CHAR in_car 0@ jf @NONAME_144 01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 1 01F0: set_max_wanted_level_to 0 jump @NONAME_2 :NONAME_144if or80E0:   not player $PLAYER_CHAR driving 8443:   not player $PLAYER_CHAR in_a_car 80DA:   not 0@ = player $PLAYER_CHAR car 8ADB:   not 0@ = car_model #POLICE name 8ADB:   not 0@ = car_model #ENFORCER name 8ADB:   not 0@ = car_model #FBICAR name 8ADB:   not 0@ = car_model #BARRACKS name 8ADB:   not 0@ = car_model #RHINO name jf @NONAME_2 01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 0 01F0: set_max_wanted_level_to 6 jump @NONAME_2

after recompiling by SA mode you'll get this

 

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------0000: NOP :NONAME_2wait 100 if    Player.Defined($PLAYER_CHAR)wait 100 if or00E0: 0443: else_jump @NONAME_110 wait 100 00DA: if or0ADB: 0@ = car_model #ENFORCER name 0ADB: 0@ = car_model #BARRACKS name 0ADB: 0@ = car_model #RHINO name else_jump @NONAME_110 wait 100 if 0442: else_jump @NONAME_110 01F7: set_player $PLAYER_CHAR ignored_by_cops 1 01F0: set_max_wanted_level_to 0 goto @NONAME_2 :NONAME_110if or80E0:   not 8443:   not 80DA:   not 8ADB:   not 0@ = car_model #ENFORCER name 8ADB:   not 0@ = car_model #BARRACKS name 8ADB:   not 0@ = car_model #RHINO name else_jump @NONAME_2 01F7: set_player $PLAYER_CHAR ignored_by_cops 0 01F0: set_max_wanted_level_to 6 goto @NONAME_2

 


I know I mixed high and low level formats but that's because I don't know how to otherwise go about jump if false to another condition.

:PHIIPC_00
WAIT 100
IF
0256: player $PLAYER_CHAR defined
REPEAT UNTIL TRUE

i never saw this unusual construct, but Sannybuilder accept it as you can see after recompiling

for San Andreas i would it write in this way

{$CLEO .cs}thread 'PHIIPC'while true    wait 0    if    0256:   player $PLAYER_CHAR defined    then        if  or            00DD:   actor $PLAYER_ACTOR driving_car_with_model #COPCARLA            00DD:   actor $PLAYER_ACTOR driving_car_with_model #COPCARSF            00DD:   actor $PLAYER_ACTOR driving_car_with_model #COPCARVG            00DD:   actor $PLAYER_ACTOR driving_car_with_model #RHINO            00DD:   actor $PLAYER_ACTOR driving_car_with_model #ENFORCER            00DD:   actor $PLAYER_ACTOR driving_car_with_model #BARRACKS            00DD:   actor $PLAYER_ACTOR driving_car_with_model #RHINO        then            //03C0: 0@ = actor $PLAYER_ACTOR car            01F7: set_player $PLAYER_CHAR ignored_by_cops 1             01F0: set_max_wanted_level_to 0            00BA: text_styled 'fem_ok'  1000 ms  4//ok            while true                wait 0                if                0256:   player $PLAYER_CHAR defined                then                    if                        8449: not  actor $PLAYER_ACTOR in_a_car                    then                        break                    end                end            end                        01F7: set_player $PLAYER_CHAR ignored_by_cops 0             01F0: set_max_wanted_level_to 6                            wait 2000            00BA: text_styled 'fem_off'  1000 ms  4//off        end    endend

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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