domingo, 1 de novembro de 2015

Mod Cleo Policial Interior GTA SA

Esse foi um dos mods mais completos que eu já fiz.
Com esse mod você pode virar policial (patrulheiro), poderá usar uma taser (um pouco bugada), tapete de pregos, poderá chamar reforço e prender pessoas. Vale lembrar que o mod foi pensado na policia do interior (mulholland).

Comandos:

O - Decreta a prisão
R - Repara Carro
T - Tapete de pregos (no carro) / Taser (á pé)
L - Limitador de velocidade

Vídeo tutorial:



Tutorial:

Primeiro de tudo você precisa pegar o carro. (precisa ser a primeira coisa a ser feita).
Vá ate a delegacia de mulholland. Você pode pressionar I depois R (digitar "ir"), para se teleportar.



Vá em frente a garagem e o carro irá aparecer.





Entre na delegacia e fique em frente a o armário então você pegará seu uniforme.



Pronto. Agora você pode patrulhar.
Sempre que algum suspeito aparecer ele terá uma marca vermelha.



Se ele estiver em um carro, você pode ligar a sirene e o reforço será solicitado.




Para prender alguém mire até que ele fique de mãos para cima. Então pare de mirar e pressione O ate ele começar a correr em direção a seu carro (se você apertar O e ele não se mexer aperte novamente).




Ele vai entrar na parte de traz do carro, então é só você ir até o estacionamento.



Depois de algum tempo o presidiário cumprirá seu tempo de prisão e sai da cela da direita e vai para cela da esquerda. Você pode abrir a cela da esquerda se você ficar em frente a ela, assim o presidiário poderá sair.





Esse mod requer Cleo 4

Download Mod Cleo Policial Interior

Para instalar esse mod basta colocar o arquivo na pasta cleo na raiz do gta sa.

Código do mod (Source):

{$CLEO .cs}



//O - Decreta a prisao

//R - Repara Carro

//T - Tapete de pregos / Taser

//L - Limitador



thread "policia_interior"



:INIT

if

056D:   actor $PLAYER_ACTOR defined

jf @INIT

wait 5000





CONST

MODELO_PORTAO = 971

MODELO_CADEIRA = 1810

SKIN_GUARDA = 282

SKIN_PLAYER_COP = 282

MODELO_TAPETE = 2899

MODELO_CARRO_COP = #COPCARLA

MODELO_CARRO_REF = #COPCARRU

ANIM_CRACK = "crckdeth2"

END



CONST

INDEX_PRESOS = 1@

TASERATIVADA = 2@

MODATIVADO = 3@

SOM_SUATIVADO = 4@

LIM_ATIVADO = 5@

PORTAO = 6@

MARCA_SUSPEITO = 7@

DIST_SUSPEITO = 8@

DIST_RENDIDO = 9@

PRESO = 10@

PRESO_X = 11@

PRESO_Y = 14@

SOM_SUSPEITO = 12@

SOM_REFOSO = 13@

RAND1 = 15@

RAND2 = 16@

MODELO_PRESO = 17@

DIST_MIRA = 18@

TAPETE = 19@

DIST_TAPETE = 20@

VELO_CARRO = 21@

PRENDER = 22@

CADEIRA = 23@

GUARDA = 24@

PORTAO2 = 25@

INDEX_SOLTO = 26@

TEMPO_PRESO = 27@

END



var

$PRESOS: array 100 of Integer

INDEX_PRESOS : Integer = 0

INDEX_SOLTO : Integer = 0

TEMPO_PRESO : Integer = 500

TASERATIVADA : Integer = FALSE

MODATIVADO : Integer = FALSE

SOM_SUATIVADO : Integer = TRUE

LIM_ATIVADO : Integer = FALSE

PRENDER : Integer = FALSE

PRESO_X : Float = 0.0

PRESO_Y : Float = 0.0

end



0247: load_model MODELO_PORTAO

0247: load_model MODELO_CADEIRA

0247: load_model SKIN_GUARDA

wait 1000



:WAITM

if and

0248:   model MODELO_PORTAO available

0248:   model MODELO_CADEIRA available

0248:   model SKIN_GUARDA available

jf @WAITM



0107: PORTAO = create_object MODELO_PORTAO at 613.1 -603.8 14.0

0177: set_object PORTAO Z_angle_to 0

0107: PORTAO2 = create_object MODELO_PORTAO at 615.1708 -607.3796 14.0

0177: set_object PORTAO2 Z_angle_to 90.0

0249: release_model MODELO_PORTAO



0107: CADEIRA = create_object MODELO_CADEIRA at 619.72 -594.21 16.3

0453: set_object CADEIRA XY_rotation 0 0 angle 90.0

0249: release_model MODELO_CADEIRA





//0AAC: SOM_SUSPEITO = load_mp3 "cleo\audio\suspeito.mp3"

//0AAC: SOM_REFOSO = load_mp3 "cleo\audio\refoso.mp3"



:INI   

00A0: store_actor $PLAYER_ACTOR position_to $X $Y $Z

01C2: remove_references_to_actor $MIRA_ACTOR

0AD2: $MIRA_ACTOR = player $PLAYER_CHAR targeted_actor



if

0ADC: test_cheat "IR"

then

    actor.PutAt($PLAYER_ACTOR, 614.1722, -597.5099, 17.233 )

end



if and

00ED:   actor $PLAYER_ACTOR sphere 1 near_point 625.6473 -597.9674 radius 2.0 2.0 on_foot

0039:   MODATIVADO == FALSE

then

    0ACA: show_text_box "Carro pego"

    MODATIVADO = TRUE

    wait 500

    jump @INIMOD

end



if

0AB0:   key_pressed 82 //R

then

    wait 0

    jump @Repara_carro

end



if

0AB0:   key_pressed 79 //O

then

    PRENDER = TRUE

    wait 0

end





if

0103:   actor $PLAYER_ACTOR in_sphere 614.1722 -597.5099 17.233 radius 4.0 4.0 6.0 sphere 1 stopped_in_car

then

    wait 0

    jump @Prender_suspeito

end   



if and

0AB0:   key_pressed 84 //T

80DF:   not actor $PLAYER_ACTOR driving

then

    wait 0

    jump @Taser

end 



if and

0AB0:   key_pressed 84 //T

00DF:   actor $PLAYER_ACTOR driving

then

    wait 0

    jump @Tapete_pregos

    wait 500

end



if and

0AB0:   key_pressed 76 //L

00DF:   actor $PLAYER_ACTOR driving

then

    wait 0

    jump @Velocidade

end



if

00ED:   actor $PLAYER_ACTOR sphere 1 near_point 616.8407 -603.2665 radius 2.0 2.0 on_foot

then

    wait 100

    jump @Mover_portao

end



if

00ED:   actor $PLAYER_ACTOR sphere 1 near_point 253.3418 77.4392 radius 0.5 0.5 on_foot

then

    0ACA: show_text_box "Uniforme e armas pegos"

    wait 100

    jump @Uniforme

end







wait 10

gosub @Fecha_portao



wait 10

gosub @Render_suspeito



wait 10

gosub @Teste_taser



wait 10

gosub @Procurar_suspeito



wait 10

gosub @Atualiza_tapete



wait 10

gosub @Teste_velocidade



wait 10

gosub @Solta_preso



wait 10

gosub @Refoso

  

wait 0

jump @INI

0A93: end_custom_thread

















:INIMOD

04ED: load_animation "CASINO"

04ED: load_animation "FOOD"



wait 500



if and

04EE:   animation "CASINO" loaded

04EE:   animation "FOOD" loaded

jf @INIMOD

wait 100



0629: change_integer_stat 23 to 500

0629: change_integer_stat 70 to 0

0629: change_integer_stat 72 to 0

player.Build($PLAYER_CHAR)

wait 10   

010D: set_player $PLAYER_CHAR wanted_level_to 0

01F0: set_max_wanted_level_to 0

048F: actor $PLAYER_ACTOR remove_weapons

  

009A: GUARDA = create_actor_pedtype 4 model SKIN_GUARDA at 619.92 -594.41 17.5

0173: set_actor GUARDA Z_angle_to 270.0 

0812: AS_actor GUARDA perform_animation "SEAT_idle" IFP_file "ped" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB                 

wait 0

jump @Criar_carro









:Criar_carro

0247: load_model MODELO_CARRO_COP

if

0248:   model MODELO_CARRO_COP available

then

    0009: $X += 2.0

    0009: $Y += 2.0

    0009: $Z += 1.0

    00A5: $PLAYER_CAR = create_car MODELO_CARRO_COP at $X $Y $Z 

    020A: set_car $PLAYER_CAR door_status_to 1

    0224: set_car $PLAYER_CAR health_to 9000

    0674: set_car_model MODELO_CARRO_COP numberplate "_Police_"

    0249: release_model MODELO_CARRO_COP

    wait 0

    jump @INI

else

    wait 0

    jump @Criar_carro

end







:Repara_carro

if

056E:   car $PLAYER_CAR defined

then

    if

    03C9:   car $PLAYER_CAR damaged

    then

        0A30: repair_car $PLAYER_CAR

    end

end

wait 0

jump @INI













:Procurar_suspeito

if

856D:   not actor $SUSPEITO defined

then

    073F: get_actor_in_sphere $X $Y $Z radius 20.0 with_pedtype_civilian 0 gang 0 criminal/prostitute 1 handle_as $SUSPEITO

    SOM_SUATIVADO = FALSE

    if

    075C:   marker MARCA_SUSPEITO enabled

    then

        0164: disable_marker MARCA_SUSPEITO

    end

end



if

056D:   actor $SUSPEITO defined

then

    0187: MARCA_SUSPEITO = create_marker_above_actor $SUSPEITO

    00A0: store_actor $SUSPEITO position_to $XS $YS $ZS

    0509: DIST_SUSPEITO = distance_between_XY $X $Y and_XY $XS $YS

  

    /*if

    0039:   SOM_SUATIVADO == FALSE

    then

        wait 100 ms

        0AAD: set_mp3 SOM_SUSPEITO perform_action 1

        SOM_SUATIVADO = TRUE

    end*/



    if or

    8184:   not actor $SUSPEITO health >= 1

    0021:   DIST_SUSPEITO > 200.0

    then

        0164: disable_marker MARCA_SUSPEITO

        034F: destroy_actor_with_fade $SUSPEITO

        01C2: remove_references_to_actor $SUSPEITO

        0004: $SUSPEITO = 0

    end

  



end





wait 0

0051: return













:Render_suspeito

if and

056E:   car $PLAYER_CAR defined

0039:   PRENDER == TRUE

then



    if

    056D:   actor $SUSPEITO defined

    then

        if and

        0611:   actor $SUSPEITO performing_animation "handsup"

        0431:   car $PLAYER_CAR passenger_seat_free 1

        then

            0792: disembark_instantly_actor $SUSPEITO

            05CA: AS_actor $SUSPEITO  enter_car $PLAYER_CAR passenger_seat 1 10000 ms

            0526: set_actor $SUSPEITO stay_in_car 1

            PRENDER = FALSE 

        end

    end



    if

    056D:   actor $MIRA_ACTOR defined

    then

        if and

        0611:   actor $MIRA_ACTOR performing_animation "handsup"

        0431:   car $PLAYER_CAR passenger_seat_free 1

        then

            0004:$REDIDO_ACTOR = $MIRA_ACTOR   

        end                                                                                           

    end

  

    if

    056D:   actor $REDIDO_ACTOR defined

    then

        0792: disembark_instantly_actor $REDIDO_ACTOR

        05CA: AS_actor $REDIDO_ACTOR  enter_car $PLAYER_CAR passenger_seat 1 10000 ms

        0526: set_actor $REDIDO_ACTOR stay_in_car 1

        PRENDER = FALSE

      

        00A0: store_actor $REDIDO_ACTOR position_to $XREND $YREND $ZREND

        0509: DIST_RENDIDO = distance_between_XY $X $Y and_XY $XREND $YREND

        if or

        8184:   not actor $REDIDO_ACTOR health >= 1

        0021:   DIST_RENDIDO > 200.0

        then

            034F: destroy_actor_with_fade $REDIDO_ACTOR

            01C2: remove_references_to_actor $REDIDO_ACTOR

        end

    end

end



wait 0

0051: return







:Prender_suspeito

if

056E:   car $PLAYER_CAR defined

then

    if

    8431:   not car $PLAYER_CAR passenger_seat_free 1

    then

        0432: PRESO = get_actor_handle_from_car $PLAYER_CAR passenger_seat 1

        0633: AS_actor PRESO exit_car

        wait 2500

      

        0208: RAND1 = random_float_in_ranges -2.0 2.0

        0208: RAND2 = random_float_in_ranges -3.0 3.0

      

        PRESO_X = 610.7077

        PRESO_Y = -608.4301

        005B: PRESO_X += RAND1

        005B: PRESO_Y += RAND2

      

        00A1: put_actor PRESO at PRESO_X PRESO_Y 17.2266 

        0665: get_actor PRESO model_to MODELO_PRESO

        01C2: remove_references_to_actor PRESO

        034F: destroy_actor_with_fade PRESO

        009A: $PRESOS[INDEX_PRESOS] = create_actor_pedtype 4 model MODELO_PRESO at PRESO_X PRESO_Y 17.2266 

      

        :Anim_fumar

        04ED: load_animation "SMOKING"

        if

        04EE:   animation "SMOKING" loaded

        then

            if

            03A3:   actor $PRESOS[INDEX_PRESOS] male

            then

                0812: AS_actor $PRESOS[INDEX_PRESOS] perform_animation "M_smklean_loop" IFP_file "SMOKING" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 

            else

                0812: AS_actor $PRESOS[INDEX_PRESOS] perform_animation "M_smklean_loop" IFP_file "SMOKING" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 

            end

        else

            wait 0

            jump @Anim_fumar

        end

      

        04EF: release_animation "SMOKING"   

        000A: INDEX_PRESOS += 1

        if

        0019:   INDEX_PRESOS > 100

        then

            INDEX_PRESOS = 0

        end

        wait 1000

    end

  

end



wait 0

jump @INI





:Taser

if

0039:   TASERATIVADA == FALSE

then

    0ACA: show_text_box "Taser ativada"

    TASERATIVADA = TRUE

    wait 500 

else

    0ACA: show_text_box "Taser desativada"

    TASERATIVADA = FALSE

    wait 500

end



wait 0

jump @INI



:Teste_taser

if and

0039:   TASERATIVADA == TRUE

056D:   actor $MIRA_ACTOR defined

02D8:   actor $PLAYER_ACTOR current_weapon == 23

then

    if

    051A:   actor $MIRA_ACTOR damaged_by_actor $PLAYER_ACTOR

    then

        :Anim_taser

        04ED: load_animation "CRACK"

        if

        04EE:   animation "CRACK" loaded

        then

            0812: AS_actor $MIRA_ACTOR perform_animation ANIM_CRACK IFP_file "CRACK" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB 

        else

            wait 0

            jump @Anim_taser

        end

        04EF: release_animation "CRACK" 

    end

end



if

056D:   actor $MIRA_ACTOR defined

then

    00A0: store_actor $MIRA_ACTOR position_to $XT $YT $ZT

    0509: DIST_MIRA = distance_between_XY $X $Y and_XY $XT $YT

    if or

    8184:   not actor $MIRA_ACTOR health >= 1

    0021:   DIST_MIRA > 200.0

    then

        034F: destroy_actor_with_fade $MIRA_ACTOR

        01C2: remove_references_to_actor $MIRA_ACTOR

    end

end



wait 0

0051: return







:Tapete_pregos

if

056E:   car $PLAYER_CAR defined

then

    if

    00DB:   actor $PLAYER_ACTOR in_car $PLAYER_CAR

    then

        0407: store_coords_to $XCAR $YCAR $ZCAR from_car $PLAYER_CAR with_offset -0.337 1.566 -0.6

        :criar_tapete

        0247: load_model MODELO_TAPETE

        if

        0248:   model MODELO_TAPETE available

        then

            0107: TAPETE = create_object MODELO_TAPETE at $XCAR $YCAR $ZCAR

        else

            wait 0

            jump @criar_tapete

        end

        0249: release_model MODELO_TAPETE

        0ACA: show_text_box "Tapete criado"

    end

end



wait 0

jump @INI



:Atualiza_tapete

if

03CA:   object TAPETE exists

then

    073E: get_car_in_sphere $XCAR $YCAR $ZCAR radius 4.0 model -1 handle_as $TAPETE_CAR

  

    if

    056E:   car $TAPETE_CAR defined

    then

        wait 10

        04FE: deflate_tire 0 on_car $TAPETE_CAR

        wait 10

        04FE: deflate_tire 1 on_car $TAPETE_CAR

        wait 10

        04FE: deflate_tire 2 on_car $TAPETE_CAR

        wait 10

        04FE: deflate_tire 3 on_car $TAPETE_CAR

        01C3: remove_references_to_car $TAPETE_CAR

    end

  

    0509: DIST_TAPETE = distance_between_XY $X $Y and_XY $XCAR $YCAR

    if

    0021:   DIST_TAPETE > 100.0

    then

        0108: destroy_object TAPETE

        01C4: remove_references_to_object TAPETE

  

    end

end

wait 0

0051: return





:Velocidade

if

0039:   LIM_ATIVADO == FALSE

then

    LIM_ATIVADO = TRUE

    0ACA: show_text_box "Limitador de Velocidade - Ativado"

    wait 0

else

    LIM_ATIVADO = FALSE

    0ACA: show_text_box "Limitador de Velocidade - Desativado"

    0ABF: set_vehicle $PLAYER_CAR engine_state_to 1

    wait 0

end

wait 0

jump @INI



:Teste_velocidade

if

0039:   LIM_ATIVADO == TRUE

then

    if

    056E:   car $PLAYER_CAR defined

    then

        02E3: VELO_CARRO = car $PLAYER_CAR speed

        if

        0021:   VELO_CARRO > 12.0

        then

            0ABF: set_vehicle $PLAYER_CAR engine_state_to 0

        else

            0ABF: set_vehicle $PLAYER_CAR engine_state_to 1

            wait 500

        end   

    end         

end

wait 0

0051: return



:Mover_portao

034E: move_object PORTAO to 611.1 -603.8 14.0 speed 0.1 0.0 0.0 collision_check 0

wait 0

jump @INI



:Fecha_portao

034E: move_object PORTAO to 613.1 -603.8 14.0 speed 0.05 0.0 0.0 collision_check 0

wait 0

0051: return



:Solta_preso

if and

0019:   TEMPO_PRESO > 0

056D:   actor $PRESOS[INDEX_SOLTO] defined

then

    000E: TEMPO_PRESO -= 1

end



if and

056D:   actor $PRESOS[INDEX_SOLTO] defined

0039:   TEMPO_PRESO == 0   

then

    0208: RAND2 = random_float_in_ranges -1.0 1.0

    PRESO_Y = -606.3386

    005B: PRESO_Y += RAND2

    00A1: put_actor $PRESOS[INDEX_SOLTO] at 616.65 PRESO_Y 17.2266 

    wait 100

    07CD: AS_actor $PRESOS[INDEX_SOLTO] walk_to 617.9307 -601.0054 17.233 stop_with_angle 270.0 within_radius 0.5

    wait 1000

    //01C2: remove_references_to_actor $PRESOS[INDEX_SOLTO]

    //0004: $PRESOS[INDEX_SOLTO] = 0 

    000A: INDEX_SOLTO += 1

    0006: TEMPO_PRESO = 500

end

wait 0

0051: return





:Uniforme

0247: load_model SKIN_PLAYER_COP



if

0248:   model SKIN_PLAYER_COP available

then

    09C7: change_player $PLAYER_CHAR model_to SKIN_PLAYER_COP   

    0247: load_model 334

    wait 10

    01B2: give_actor $PLAYER_ACTOR weapon 3 ammo 500

    0249: release_model 334

              

    0247: load_model 346

    wait 10

    01B2: give_actor $PLAYER_ACTOR weapon 22 ammo 500

    0249: release_model 346

              

    0247: load_model 349

    wait 10

    01B2: give_actor $PLAYER_ACTOR weapon 25 ammo 500

    0249: release_model 349

    wait 1000

else

    wait 0

    jump @Uniforme

end



wait 0

jump @INI



:Refoso

if and

056E:   car $PLAYER_CAR defined

056D:   actor $SUSPEITO defined

then

    if and

    00DF:   actor $SUSPEITO driving

    00DB:   actor $PLAYER_ACTOR in_car $PLAYER_CAR

    0ABD:   vehicle $PLAYER_CAR siren_on

    856E:   not car $refoso defined   

    then

        wait 100 ms

        //0AAD: set_mp3 SOM_REFOSO perform_action 1

        :Carrega_ref

        0247: load_model MODELO_CARRO_REF

        0247: load_model 283

        if and

        0248:   model MODELO_CARRO_REF available

        0248:   model 283 available

        then       

            0208: 11@ = random_float_in_ranges -50.0 50.0

            0208: 12@ = random_float_in_ranges -50.0 50.0

            005D: 11@ += $X

            005D: 12@ += $Y

            02C1: store_to $xref $yref $zref car_path_coords_closest_to 11@ 12@ $Z

            00A5: $refoso = create_car MODELO_CARRO_REF at $xref $yref $zref

            03C0: $SUSPEITO_CAR = actor $SUSPEITO car

            wait 500

            05F2: set_car $refoso follow_car $SUSPEITO_CAR keep_3o_clock

            00AF: set_car $refoso driver_behaviour_to 2

            00AE: unknown_set_car $refoso to_ignore_traffic_lights  2

            0397: enable_car $refoso siren 1

            0129: $cop_ref = create_actor_pedtype 6 model 283 in_car $refoso driverseat

            0223: set_actor $cop_ref health_to 100

            00AD: set_car $refoso max_speed_to  25.0

            0186: $mark_ref = create_marker_above_car $refoso

            05F2: set_car $refoso follow_car $SUSPEITO_CAR keep_3o_clock

            0249: release_model MODELO_CARRO_REF

            0ACA: show_text_box "Refoso chegou"

        else

            wait 0

            jump @Carrega_ref

        end

    end

end



if

056E:   car $refoso defined

then

    if or

    8185:   not car $refoso health >= 1  // <

    856D:   not actor $SUSPEITO defined

    856E:   not car $SUSPEITO_CAR defined

    then

        if

        075C:   marker $mark_ref enabled

        then

            0164: disable_marker $mark_ref

        end

      

        01C3: remove_references_to_car $refoso 

        0004: $refoso = 0 

        wait 500

    end

  

    if

    056D:   actor $SUSPEITO defined

    then

        if

        00DB:   actor $SUSPEITO in_car $PLAYER_CAR

        then

            if

            075C:   marker $mark_ref enabled

            then

                0164: disable_marker $mark_ref

            end

            01C3: remove_references_to_car $refoso 

            0004: $refoso = 0 

            wait 500   

        end

    end

end





if and

056D:   actor $cop_ref defined

856E:   not car $refoso defined

then

    01C2: remove_references_to_actor $cop_ref

    0004: $cop_ref = 0

    wait 500

end





if

056E:   car $SUSPEITO_CAR defined

then



  

    if or

    8185:   not car $SUSPEITO_CAR health >= 1  // <

    856D:   not actor $SUSPEITO defined

    then

        01C3: remove_references_to_car $SUSPEITO_CAR

        0004: $SUSPEITO_CAR = 0

        wait 500

    end

  

    if

    056D:   actor $SUSPEITO defined

    then

        if

        00DB:   actor $SUSPEITO in_car $PLAYER_CAR

        then

            01C3: remove_references_to_car $SUSPEITO_CAR

            0004: $SUSPEITO_CAR = 0

            wait 500 

        end

    end

end 





wait 0

0051: return

Obs: Nesse código eu comentei a parte do som, porque o som tava travando o jogo as vezes. Se você quiser que toque algum som (como um radio da policia) quando você achar um suspeito ou quando chamar reforço, descomente a parte do som do codigo e crie uma pasta chamada "audio" dentro da pasta cleo e nela coloque os dois arquivos de audio .mp3. Um deve se chamar suspeito.mp3 e o outro refoso.mp3

3 comentários:

Related Posts Plugin for WordPress, Blogger...