Ajuda para saber se estou fazendo certo ou se estou fazendo errado

    Compartilhe
    avatar
    julio.ckj
    Mensagens Nível 1
    Mensagens Nível 1

    Mensagens : 10
    Reputação : 0
    Desde : 05/11/2013
    Idade : 25
    Localização : São Paulo Taboão Da Sérra

    Ajuda para saber se estou fazendo certo ou se estou fazendo errado

    Mensagem por julio.ckj em Ter 07 Jan 2014, 03:42

    Andei vendo muitas Source e vi que e totalmente diferente do modo que eu faço um exemplo

    um script não compilado mod Peds com medo de armas
    code:
    {$CLEO}
    wait 1000

    const
      Getted___Ped = 0@
    end

    var
      0@ : int
      1@ : float
      2@ : float
      3@ : float
      $PLAYER_ACTOR : int
      25@ : int
    end
     
    while true
      wait 0
      if 0256:   player 0 defined
      jf continue
      12@ = false
      0470: 9@ = actor $PLAYER_ACTOR current_weapon
      if and
         9@ > 15
         40 > 9@
      then
         12@ = true
      end
      0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
      29@ += 0x4
      0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
      for 30@ = 0 to 27904 step 0x100
         0A8D: Getted___Ped = read_memory 29@ size 1 virtual_protect 0
         000A: 29@ += 0x1
         if and
            0029: Getted___Ped >= 0x00
            001B: 0x80 > Getted___Ped
         then
            005A: Getted___Ped += 30@
            089F: get_actor Getted___Ped pedtype_to 7@
            if 7@ == 6
            then
               25@ = Getted___Ped
            end
            if 8118:   not actor Getted___Ped dead  
            jf continue
            if $PLAYER_ACTOR <> 0@
            jf continue
            0AAA: 14@ = thread 'COPCAR' pointer  
            if and
               14@ == 0 // checks if the player is not on a vigilante mission
               12@ == true
            then
               if 09ED:   actor Getted___Ped is_within_field_of_view_actor $3
               jf continue
               if 00DF:   actor $PLAYER_ACTOR driving
               then
                  0811: 20@ = actor $PLAYER_ACTOR car
                  02E3: 20@ = car 20@ speed
                  if 20@ < 10.0
                  jf continue
               end
               gosub @Stuffs
            end      
            gosub @OtherCopAndPedFixes
         end                  
      end          
    end


    hex

      "Mod by Fabio - http://gtamodvicio.blogspot.com - http://mixmods.blogspot.com - http://brmodstudio.forumeiros.com"

    end



    :OtherCopAndPedFixes
    089F: get_actor Getted___Ped pedtype_to 7@
    if and
      7@ > 6
      7@ < 18
    then
      0470: 9@ = actor Getted___Ped current_weapon
      if and
         9@ > 15
         40 > 9@
      then
         if 056D:   actor 25@ defined
         0AA1: return_if_false
         if 09ED:   actor 25@ is_within_field_of_view_actor Getted___Ped
         0AA1: return_if_false
         if 8248:  not model #desert_eagle available
         then
            0247: load_model #desert_eagle
            038B: load_requested_models
         end
         01B2: give_actor 25@ weapon 24 ammo 9999
         01B9: set_actor 25@ armed_weapon_to 24
         05E2: AS_actor 25@ kill_actor Getted___Ped
      end
    end
    return

    :Stuffs
    089F: get_actor Getted___Ped pedtype_to 7@
    if 7@ == 6
    then
      if 810F:   not player 0 wanted_level > 1
      then
         01C0: 8@ = player 0 wanted_level
         8@ += 1
         010D: set_player 0 wanted_level_to 8@
      end
      05E2: AS_actor Getted___Ped kill_actor $3
      return
    end
    1@ = random(50.0, 250.0)
    2@ = random(00.0, 250.0)
    if 00DF:   actor Getted___Ped driving
    then
      0811: 20@ = actor Getted___Ped car
      00A7: car 20@ drive_to 4@ 5@ 6@
      00AF: set_car 20@ driver_behaviour_to 8
      return
    end
    if and
      7@ > 6
      7@ <> 8
      7@ < 18
    then
      05E2: AS_actor Getted___Ped kill_actor $3
      return
    end
    04C4: store_coords_to 4@ 5@ 6@ from_actor Getted___Ped with_offset 1@ 2@ 0.0
    05DA: AS_actor Getted___Ped run_away_in_panic_from 4@ 5@ 6@ away_radius 100.0 timelimit 15000
    return

    agora um script meu não compilado
    code 2:
    {$CLEO .cs}

    0000: NOP

    :Noname_2
    0001: wait 0 ms
    00D6: if
    0AB0:   key_pressed 77
    004D: jump_if_false @Noname_2
    0001: wait 100 ms
    00D6: if
    010A:   player $PLAYER_CHAR money > 200
    004D: jump_if_false @Noname_44
    0006: 1@ = 200
    0006: 2@ = 500
    0006: 3@ = 100
    :Noname_1
    0001: wait 0 ms
    01B4: set_player $PLAYER_CHAR can_move 0
    08D4: 14@ = create_panel_with_title 'AMMUN' position 29.0 170.0 width 180.0 columns 1 interactive 1 background 1 alignment 0  // Ammu-Nation
    08DB: set_panel 14@ column 0 header 'WEAPON' data 'GUN1' 'GUN2' 'GUN3' 'GUN4' 'GUN5' 'GUN6' 'GUN7' 'GUN8' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'  // Weapon // Monday // Wednesday // Thursday // Friday // Saturday
    08EE: set_panel 14@ column 1 row 0 text_1number GXT 'DOLLAR' number 1@  // $~1~
    08EE: set_panel 14@ column 1 row 1 text_1number GXT 'DOLLAR' number 2@  // $~1~
    08EE: set_panel 14@ column 1 row 2 text_1number GXT 'DOLLAR' number 2@  // $~1~
    08EE: set_panel 14@ column 1 row 3 text_1number GXT 'DOLLAR' number 2@  // $~1~
    08EE: set_panel 14@ column 1 row 4 text_1number GXT 'DOLLAR' number 2@  // $~1~
    08EE: set_panel 14@ column 1 row 5 text_1number GXT 'DOLLAR' number 2@  // $~1~

    :Noname_3
    0001: wait 0 ms
    00D6: if
    00E1:   player 0 pressed_key 16
    004D: jump_if_false @Noname_4
    08D7: 14@ = panel 14@ active_row
    0001: wait 100 ms
    0002: jump @Noname_5

    :Noname_44
    0001: wait 0 ms
    0ACA: show_text_box "voce nao tem dinheiro suficiente"
    0002: jump @Noname_2

    :Noname_4
    0001: wait 0 ms
    00D6: if
    0AB0:   key_pressed 13
    004D: jump_if_false @Noname_3
    08DA: remove_panel 14@
    08DA: remove_panel 17@
    01B4: set_player $PLAYER_CHAR can_move 1
    0002: jump @Noname_2


    :Noname_5
    0001: wait 0 ms
    0039:   14@ == 0
    004D: jump_if_false @Noname_16
    0002: jump @Noname_6

    :Noname_16
    0001: wait 0 ms
    14@ == 1
    004D: jump_if_false @Noname_27
    0002: jump @Noname_17

    :Noname_27
    0001: wait 0 ms
    14@ == 2
    004D: jump_if_false @Noname_36
    0002: jump @Noname_28

    :Noname_36
    0001: wait 0 ms
    14@ == 3
    004D: jump_if_false @Noname_3
    0002: jump @Noname_37

    :Noname_6
    0001: wait 0 ms
    08DA: remove_panel 14@
    08D4: 17@ = create_panel_with_title 'AMMUN' position 29.0 170.0 width 180.0 columns 1 interactive 1 background 1 alignment 0  // Ammu-Nation
    08DB: set_panel 17@ column 0 header 'PISTOLAS' data 'PISTOL' 'PISTSL' 'DEAGLE' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
    08EE: set_panel 17@ column 1 row 0 text_1number GXT 'DOLLAR' number 1@  // $~1~
    08EE: set_panel 17@ column 1 row 1 text_1number GXT 'DOLLAR' number 1@  // $~1~
    08EE: set_panel 17@ column 1 row 2 text_1number GXT 'DOLLAR' number 1@  // $~1~
    0002: jump @Noname_8

    :Noname_7
    0001: wait 0 ms
    0ACA: show_text_box "vc esta sem dinheiro"
    0002: jump @Noname_5

    :Noname_8
    0001: wait 0 ms
    00D6: if
    00E1:   player 0 pressed_key 16
    004D: jump_if_false @Noname_9
    08D7: 17@ = panel 17@ active_row
    0001: wait 100 ms
    0002: jump @Noname_10

    :Noname_9
    0001: wait 0 ms
    00D6: if
    0AB0:   key_pressed 13
    004D: jump_if_false @Noname_8
    08DA: remove_panel 14@
    0001: wait 100 ms
    0002: jump @Noname_1

    :Noname_10
    0001: wait 0 ms
    0039:   17@ == 0
    004D: jump_if_false @Noname_12
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 1@ // (int)
    004D: jump_if_false @Noname_7
    0062: 0@ -= 1@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #COLT45
    038B: load_requested_models

    :Noname_11
    0001: wait 0 ms
    0248:   model #COLT45 available
    004D: jump_if_false @Noname_11
    01B2: give_actor $PLAYER_ACTOR weapon 22 ammo 60 // Load the weapon model before using this
    0ACA: show_text_box "uma bela arma pra assasinatos furtivos"
    08DA: remove_panel 17@
    0002: jump @Noname_6

    :Noname_12
    0001: wait 0 ms
    17@ == 1
    004D: jump_if_false @Noname_14
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 2@ // (int)
    004D: jump_if_false @Noname_7
    0062: 0@ -= 2@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #SILENCED
    038B: load_requested_models

    :Noname_13
    0001: wait 0 ms
    0248:   model #SILENCED available
    004D: jump_if_false @Noname_13
    01B2: give_actor $PLAYER_ACTOR weapon 23 ammo 60 // Load the weapon model before using this
    08DA: remove_panel 17@
    0002: jump @Noname_6

    :Noname_14
    0001: wait 0 ms
    17@ == 2
    004D: jump_if_false @Noname_8
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 3@ // (int)
    004D: jump_if_false @Noname_7
    0062: 0@ -= 3@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #DESERT_EAGLE
    038B: load_requested_models

    :Noname_15
    0001: wait 0 ms
    0248:   model #DESERT_EAGLE available
    004D: jump_if_false @Noname_15
    01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 60 // Load the weapon model before using th
    08DA: remove_panel 17@
    0002: jump @Noname_6

    :Noname_17
    0001: wait 0 ms
    08DA: remove_panel 14@
    08DA: remove_panel 17@
    08DA: remove_panel 19@
    08DA: remove_panel 20@
    08D4: 18@ = create_panel_with_title 'AMMUN' position 29.0 170.0 width 180.0 columns 1 interactive 1 background 1 alignment 0  // Ammu-Nation
    08DB: set_panel 18@ column 0 header 'PISTOLAS' data 'SHOTGN1' 'SHOTGN3' 'SHOTGN1' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
    08EE: set_panel 18@ column 1 row 0 text_1number GXT 'DOLLAR' number 1@  // $~1~
    08EE: set_panel 18@ column 1 row 1 text_1number GXT 'DOLLAR' number 1@  // $~1~
    08EE: set_panel 18@ column 1 row 2 text_1number GXT 'DOLLAR' number 1@  // $~1~

    :Noname_18
    0001: wait 0 ms
    00D6: if
    00E1:   player 0 pressed_key 16
    004D: jump_if_false @Noname_19
    08D7: 18@ = panel 18@ active_row
    0001: wait 100 ms
    0002: jump @Noname_20

    :Noname_22
    0001: wait 0 ms
    0ACA: show_text_box "vc esta sem dinheiro"
    0002: jump @Noname_16


    :Noname_19
    0001: wait 0 ms
    00D6: if
    0AB0:   key_pressed 13
    004D: jump_if_false @Noname_18
    08DA: remove_panel 18@  
    0001: wait 100 ms
    0002: jump @Noname_1

    :Noname_20
    0001: wait 0 ms
    18@ == 0
    004D: jump_if_false @Noname_23
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 3@ // (int)
    004D: jump_if_false @Noname_22
    0062: 0@ -= 3@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #CHROMEGUN
    038B: load_requested_models

    :Noname_21
    0001: wait 0 ms
    0248:   model #CHROMEGUN available
    004D: jump_if_false @Noname_21
    01B2: give_actor $PLAYER_ACTOR weapon 25 ammo 60 // Load the weapon model before using th
    08DA: remove_panel 18@
    0002: jump @Noname_17

    :Noname_23
    0001: wait 0 ms
    18@ == 1
    004D: jump_if_false @Noname_25
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 3@ // (int)
    004D: jump_if_false @Noname_22
    0062: 0@ -= 3@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #SAWNOFF
    038B: load_requested_models

    :Noname_24
    0001: wait 0 ms
    0248:   model #SAWNOFF available
    004D: jump_if_false @Noname_24
    01B2: give_actor $PLAYER_ACTOR weapon 26 ammo 60 // Load the weapon model before using th
    08DA: remove_panel 18@
    0002: jump @Noname_17

    :Noname_25
    0001: wait 0 ms
    18@ == 2
    004D: jump_if_false @Noname_17
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 3@ // (int)
    004D: jump_if_false @Noname_22
    0062: 0@ -= 3@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #SHOTGSPA
    038B: load_requested_models

    :Noname_26
    0001: wait 0 ms
    0248:   model #SHOTGSPA available
    004D: jump_if_false @Noname_26
    01B2: give_actor $PLAYER_ACTOR weapon 27 ammo 60 // Load the weapon model before using th
    08DA: remove_panel 18@
    0002: jump @Noname_17

    :Noname_28
    0001: wait 0 ms
    08DA: remove_panel 14@
    08DA: remove_panel 17@
    08DA: remove_panel 18@
    08DA: remove_panel 20@
    08D4: 19@ = create_panel_with_title 'AMMUN' position 29.0 170.0 width 180.0 columns 1 interactive 1 background 1 alignment 0  // Ammu-Nation
    08DB: set_panel 19@ column 0 header 'PISTOLAS' data 'UZI' 'TEC9' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
    08EE: set_panel 19@ column 1 row 0 text_1number GXT 'DOLLAR' number 1@  // $~1~
    08EE: set_panel 19@ column 1 row 1 text_1number GXT 'DOLLAR' number 1@  // $~1~

                                             
    :Noname_29
    0001: wait 0 ms
    00D6: if
    00E1:   player 0 pressed_key 16
    004D: jump_if_false @Noname_31
    08D7: 19@ = panel 19@ active_row
    0001: wait 100 ms
    0002: jump @Noname_32

    :Noname_30
    0001: wait 0 ms
    0ACA: show_text_box "vc esta sem dinheiro"
    0002: jump @Noname_27


    :Noname_31
    0001: wait 0 ms
    00D6: if
    0AB0:   key_pressed 13
    004D: jump_if_false @Noname_29
    08DA: remove_panel 19@  
    0001: wait 100 ms
    0002: jump @Noname_1

    :Noname_32
    0001: wait 0 ms
    19@ == 0
    004D: jump_if_false @Noname_34
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 3@ // (int)
    004D: jump_if_false @Noname_30
    0062: 0@ -= 3@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #MICRO_UZI
    038B: load_requested_models

    :Noname_33
    0001: wait 0 ms
    0248:   model #MICRO_UZI available
    004D: jump_if_false @Noname_33
    01B2: give_actor $PLAYER_ACTOR weapon 28 ammo 60 // Load the weapon model before using th
    08DA: remove_panel 19@
    0002: jump @Noname_27

    :Noname_34
    0001: wait 0 ms
    19@ == 1
    004D: jump_if_false @Noname_28
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 3@ // (int)
    004D: jump_if_false @Noname_30
    0062: 0@ -= 3@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #TEC9
    038B: load_requested_models

    :Noname_35
    0001: wait 0 ms
    0248:   model #TEC9 available
    004D: jump_if_false @Noname_35
    01B2: give_actor $PLAYER_ACTOR weapon 32 ammo 60 // Load the weapon model before using th
    08DA: remove_panel 19@
    0002: jump @Noname_27


    :Noname_37
    0001: wait 0 ms
    08DA: remove_panel 14@
    08D4: 20@ = create_panel_with_title 'AMMUN' position 29.0 170.0 width 180.0 columns 1 interactive 1 background 1 alignment 0  // Ammu-Nation
    08DB: set_panel 20@ column 0 header 'GUN4' data 'GUN4' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
    08EE: set_panel 20@ column 1 row 0 text_1number GXT 'DOLLAR' number 1@  // $~1~

    :Noname_38
    0001: wait 0 ms
    00D6: if
    00E1:   player 0 pressed_key 16
    004D: jump_if_false @Noname_40
    08D7: 20@ = panel 20@ active_row
    0001: wait 100 ms
    0002: jump @Noname_41

    :Noname_39
    0001: wait 0 ms
    0ACA: show_text_box "vc esta sem dinheiro"
    0002: jump @Noname_27


    :Noname_40
    0001: wait 0 ms
    00D6: if
    0AB0:   key_pressed 13
    004D: jump_if_false @Noname_38
    08DA: remove_panel 20@  
    0001: wait 100 ms
    0002: jump @Noname_1

    :Noname_41
    0001: wait 0 ms
    20@ == 0
    004D: jump_if_false @Noname_36
    010B: 4@ = player $PLAYER_CHAR money
    002D:   4@ >= 3@ // (int)
    004D: jump_if_false @Noname_39
    0062: 0@ -= 3@ // (int)
    0109: player $PLAYER_CHAR money += 0@
    0247: load_model #MP5LNG
    038B: load_requested_models

    :Noname_42
    0001: wait 100 ms
    0248:   model #MP5LNG available
    004D: jump_if_false @Noname_42
    01B2: give_actor $PLAYER_ACTOR weapon 29 ammo 80 // Load the weapon model before using th
    08DA: remove_panel 20@
    0002: jump @Noname_37



    Olhando a primeira script e olhando a minha é que eu fico com duvida se estou fazendo certo ou se estou fazendo errado
    avatar
    JNRois12
    Programador - Básico
    Programador - Básico

    Mensagens : 6471
    Reputação : 65
    Desde : 09/07/2012
    Idade : 18
    Localização : Potim - SP
    Link : g1.globo.com/jornal-nacional/

    Re: Ajuda para saber se estou fazendo certo ou se estou fazendo errado

    Mensagem por JNRois12 em Ter 07 Jan 2014, 10:37

    Vc tá fazendo errado só em editar scripts e não tentar criar seus próprios
    avatar
    Fabio
    Programador - Avançado
    Programador - Avançado

    Título : CEO da Fabio's Gambiarra Industries
    Mensagens : 18604
    Reputação : 338
    Desde : 04/05/2012
    Idade : 20
    Localização : Reserva, Paraná, Brasil, América Latina, America do Sul, América, Planeta Terra, Sistema Solar, Via láctea, Universo
    Link : gtamodvicio.blogspot.com

    Re: Ajuda para saber se estou fazendo certo ou se estou fazendo errado

    Mensagem por Fabio em Ter 07 Jan 2014, 12:26

    Depende do que você chama de errado né

    Não acho um script low level "errado", só acho que fica ruim pra ler...


    ____________________

    Modifico quase qualquer coisa.   :)
    ------------------>>>http://gtamodvicio.blogspot.com/<<<------------------

    Meu PC:
    Spoiler:

    Configurações PC:
    *Processador: Intel Core i7 4790K 4.00GHz LGA1150
    *Placa Mãe: GIGABYTE GA-H97M-D3H Intel (LGA1150)
    *HD: 1TB Seagate Barracuda 64MB Sata III 7200RPM (2x - RAID 0)
    *HD²: SAMSUNG M3 Externo USB 5400RPM 1TB
    *Placa de vídeo: Nvidia GTX660 2GB DDR5 192bit EVGA
    *RAM: 8GB DDR3 1600MHZ Kingston HYPER X BEAST (2x4GB)
    *Fonte: Corsair 600W Reais CX600M Modular - CP-9020060-WW (80 Plus Bronze)
    *Gabinete: Gabinete Raidmax Super Hurricane Branco - 248WB
    *Monitor: LG 23MP55HQ Full HD HDMI 23'
    avatar
    julio.ckj
    Mensagens Nível 1
    Mensagens Nível 1

    Mensagens : 10
    Reputação : 0
    Desde : 05/11/2013
    Idade : 25
    Localização : São Paulo Taboão Da Sérra

    Re: Ajuda para saber se estou fazendo certo ou se estou fazendo errado

    Mensagem por julio.ckj em Ter 07 Jan 2014, 15:39

    JNRois12
    nao cara esse script eu fiz do zéro nao peguei um mod pronto e editei

    Conteúdo patrocinado

    Re: Ajuda para saber se estou fazendo certo ou se estou fazendo errado

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Qui 22 Jun 2017, 09:08