Quantcast

Jump to content

» «
Photo

text not shown

2 replies to this topic
cst1992
  • cst1992

    Spam Hater

  • Members
  • Joined: 27 Dec 2012

#1

Posted 28 August 2013 - 10:53 AM Edited by cst1992, 28 August 2013 - 05:31 PM.

I am writing a mod which allows the car to be marked -- till it is unmarked, it will stay where it is.
This is the code I've written.
CODE

{$CLEO .cs}

thread 'MARKCAR'

:MARKCAR_1
wait 100 ms
if
00DF:   actor $PLAYER_ACTOR driving
else_jump @MARKCAR_2
03C0: 0@ = actor $PLAYER_ACTOR car

:MARKCAR_2
wait 0 ms
if and
00DB:   actor $PLAYER_ACTOR in_car 0@
0AB0:  key_pressed 0x6F // '/' key
else_jump @MARKCAR_3
0161: 1@ = create_marker_above_car 0@ unknown 0 radar_mode 1
0763: add_car_reference 0@ // mission only  
00BC: show_text_highpriority GXT 'MARKCAR_M' time 2200 flag 1
:MARKCAR_3
wait 0 ms
if and
044B:   actor $PLAYER_ACTOR on_foot
0458:   player $PLAYER_CHAR aiming_at_object 0@
0AB0:  key_pressed 0x6A // '*' key
else_jump @MARKCAR_4
00BC: show_text_highpriority GXT 'MARKCAR_U' time 2200 flag 1
0164: disable_marker 1@
01C3: remove_references_to_car 0@ // Like turning a car into any random car

:MARKCAR_4
wait 100 ms
jump @MARKCAR_1

Two problems:
1. Text is not shown.
2. Unmarking does not work.

What might be going wrong?

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#2

Posted 28 August 2013 - 12:14 PM

If you are using the GTX Hook plugin then the entry names are limited to 7 characters. I've never tried anything longer so I'm not sure what would happen.

cst1992
  • cst1992

    Spam Hater

  • Members
  • Joined: 27 Dec 2012

#3

Posted 28 August 2013 - 05:27 PM

Thanks, the text is now displayed.
What about the other problem?

P.S. Is there an opcode where we have cj aiming/looking at a car and we have to check something? The opcode that I have used, I doubt it is the correct one.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users