Back to GTA SA
GTAForums Topic

hud.txd
CODE
:CJPISS_10
0001: wait  3000 ms

:CJPISS_20
0006: @32 =  0 ;; integer values ;;  internal timer thanks to demarest for the explaination
0209: @1 = random_int  120  150         ;; time in second before you need to piss
0012: @1 *=  1000 ;; integer values
0006: @2 =  0 ;; integer values;will be used checks if it's urgent !!!

:CJPISS_30
0001: wait  10 ms
00D6: if  0
0256:   player $2 defined        ;; I use that to check if player's been wasted/busted, much better and much working than the swasted or busted check
004D: jump_if_false ££FEELBETTERNOW_1
00D6: if  0
801D:  NOT  @32 > @1 ;; integer values
004D: jump_if_false ££EMERGENCY_1                              
00D6: if  1
80DF:   NOT   actor $3 driving
00E1:   key_pressed  0  11
004D: jump_if_false ££CJPISS_30
0001: wait  1000 ms                          ;; to make it as a long press on the touch
00D6: if  0
00E1:   key_pressed  0  11
004D: jump_if_false ££CJPISS_30

:CJPISS_40
04ED: load_animation "PAULNMAC"
0001: wait  0 ms
00D6: if  0
04EE:   animation "PAULNMAC" loaded
004D: jump_if_false ££CJPISS_40

:PISSNG_1
0001: wait  0 ms
0470: @16 = actor $3  armed_weapon unknown
01B9: set_actor $3 armed_weapon_to  0             ;; so you don't piss with a gun in your hand
066A: attach_particle "PETROLCAN" to_actor $3 offset 0.0  .58 -.08  0.0  .01  0.0  1 @17;; this create the particules that make the little drops  tahnks to spaceeinstein to find 0669 which is really close to it
0615: start_action sequence @3                              ;; this is for starting the action_sequence
0605: unknown_action_sequence $3 "PISS_IN" "PAULNMAC"  4.0  0  0  0  0 -1
064C: make_particle_visible  @17                            ;; make the particule @17 visible, thanks to spaceeinstein to find the opcode
0605: unknown_action_sequence $3 "PISS_LOOP" "PAULNMAC"  4.0  0  0  0  0  -1
0605: unknown_action_sequence $3 "PISS_OUT" "PAULNMAC" 4.0  0  0  0  0 -1
0001: wait  6000 ms
0650: destroy_particle @17            ;; destroy the little drops
0616: end_action_sequnece @3           ;; this is for ending the action_sequence
0001: wait  5000 ms
01B9: set_actor $3 armed_weapon_to  @16

:CHIOTTES_1
00D6: if  25
00FF:   actor $3  1 ()near_point_on_foot 2238.0   -1068.0   1049.0 radius  1.0  1.0  1.0    ;; checks if you're in the bathroom
00FF:   actor $3  1 ()near_point_on_foot 2279.0   -1139.0   1050.0 radius  1.0  1.0  1.0    ;; checks if you're in the bathroom
00FF:   actor $3  1 ()near_point_on_foot 2193.0   -1223.0   1049.0 radius  1.0  1.0  1.0    ;; checks if you're in the bathroom
00FF:   actor $3  1 ()near_point_on_foot 2344.0   -1062.0   1049.0 radius  1.0  1.0  1.0    ;; checks if you're in the bathroom
00FF:   actor $3  1 ()near_point_on_foot 2254.0   -1217.0   1049.0 radius  1.0  1.0  1.0    ;; checks if you're in the bathroom
00FF:   actor $3  1 ()near_point_on_foot 2321.0   -1005.0   1054.0 radius  1.0  1.0  1.0    ;; checks if you're in the bathroom
004D: jump_if_false ££TEXT_2
0002: jump ££FEELBETTERNOW_1

:COPAS_1
0001: wait  0 ms
01C0: @4 = player $2 wanted_level
00D6: if  0
810F:   NOT   player $2 wanted_level >  1
004D: jump_if_false ££FEELBETTERNOW_1
0008: @4 +=  1 ;; integer values
010D: set_player $2 wanted_level_to  @4
0002: jump ££FEELBETTERNOW_1

:TEXT_2
03E5: text_box 'DUNLOCK'         ;; this should be some text like: "The cops don't like you piss anywhere, they'll piss you off now."
0001: wait  5000 ms
03E6: remove_text_box
0002: jump ££COPAS_1

:CRAPASS_1
00BA: text_styled 'M_FAIL'  1000 ms  1  ;; this should be some text like: "You disgusting boy, you've craped your pants, the cops don't like dirty asses like you, they'll piss you off now."
0002: jump ££COPAS_1

:EMERGENCY_1
0001: wait  0 ms
00D6: if  0
0039:   @2 ==  0 ;; integer values
004D: jump_if_false ££CRAPASS_1
03E5: text_box 'DUNLOCK'                   ;; this should be some text like: "You need to take piss, find yourself some bathroom before it's too late."
0001: wait  5000 ms
03E6: remove_text_box
04CE: @20 = create_icon_marker_without_sphere 32 at 1333.0   -628.0   109.0        ;; the icons going with it
04CE: @21 = create_icon_marker_without_sphere 32 at 2233.0   159.0   27.0          ;; the icons going with it
04CE: @22 = create_icon_marker_without_sphere 32 at -2080.0   -2309.0   30.0       ;; the icons going with it
04CE: @23 = create_icon_marker_without_sphere 32 at -1444.0   -1534.0   101.0      ;; the icons going with it
04CE: @24 = create_icon_marker_without_sphere 32 at -2028.0   -44.0   38.0         ;; the icons going with it
04CE: @25 = create_icon_marker_without_sphere 32 at -2100.0   899.0    76.0        ;; the icons going with it
04CE: @26 = create_icon_marker_without_sphere 32 at -1048.0   1545.0    33.0       ;; the icons going with it
04CE: @27 = create_icon_marker_without_sphere 32 at 1277.0   2522.0     10.0       ;; the icons going with it
04CE: @28 = create_icon_marker_without_sphere 32 at 2371.0   2165.0     10.0       ;; the icons going with it
04CE: @29 = create_icon_marker_without_sphere 32 at -1534.0  2650.0    55.0        ;; the icons going with it
04CE: @30 = create_icon_marker_without_sphere 32 at 206.0   -109.0   4.0           ;; the icons going with it
0006: @32 =  0 ;; integer values
0209: @1 = random_int  30  48      ;; time in sec vefore you crap your pants
0012: @1 *=  1000                  ;; integer values
0006: @2 =  1                      ;; integer values;will be used checks if it's urgent !!!, 1=urgent, 0= not urgent yet
0002: jump ££CJPISS_30

:FEELBETTERNOW_1
0001: wait  0 ms
04EF: release_animation "PAULNMAC"
00D6: if  0
0039:   @2 ==  1 ;; integer values
004D: jump_if_false ££CJPISS_20
0164: disable_marker @20       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @21       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @22       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @23       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @24       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @25       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @26       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @27       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @28       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @29       ;;because you've pissed you don't need to see the markers and the spheres
0164: disable_marker @30       ;;because you've pissed you don't need to see the markers and the spheres
0002: jump ££CJPISS_20