#1 18-10-2011 22:31

Manoel Victor
From: Minas Gerais
Registered: 26-04-2011
Posts: 44
Website

I'm having problems in my code! Help please!

Я уже получил свой ​​код! Я нашел ошибку, я изменил коды операций и количество актеров и это сработало! Я сам! В любом случае, спасибо всем, кто пытался помочь мне!

-------

I already got my own code! I found the error, I changed the opcodes and the numbers of actors and it worked! I got myself! Anyway, thanks to everyone who tried to help me!

Last edited by Manoel Victor (22-10-2011 17:06)

Offline

#2 19-10-2011 07:35

Yoda
From: Moscow
Registered: 08-03-2011
Posts: 90

Re: I'm having problems in my code! Help please!

:NONAME is just a label used by people i think... As far as i understand it the game uses memory adresses.
else_jump, jump_if_false and jf are the same, or synonyms.
So, i think the problem with your savings is related to the saving procedures used - CLEO save everywhere and original routine.


Try not. Do or do not, there is no try.

Offline

#3 19-10-2011 16:22

Den_spb
From: Ленинград
Registered: 23-11-2008
Posts: 941
Website

Re: I'm having problems in my code! Help please!

{$CLEO}
2@ = -1
while true
    wait 0
    if
        not player.Defined($player_char)
    then
        continue
    end
    if
        056D: actor 2@ defined
    then
        if
            Actor.Dead(2@)
        then
            009B: destroy_actor 2@ 
        end
    else
        if
            00EC:   actor $PLAYER_ACTOR 0 near_point 1508.885 2918.351 radius 113.362 115.0
        then
            Model.Load(28)
            Model.Load(348) 
            038B: load_requested_models 
            2@ = Actor.Create(4, 28, 1510.019, 2915.165, 9.4218)
            Actor.Health(2@) = 1700
            0446: set_actor 2@ immune_to_headshots 0 
            01B2: give_actor 2@ weapon 24 ammo 9999 // Load the weapon model before using this 
            05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR  // It's enough for constant attack
            model.Destroy(28)
            model.Destroy(348) 
        end    
    end    
end

Last edited by Den_spb (19-10-2011 17:01)

Offline

#4 19-10-2011 16:36

Manoel Victor
From: Minas Gerais
Registered: 26-04-2011
Posts: 44
Website

Re: I'm having problems in my code! Help please!

Ден, но это мне кажется, что ваш код будет создан актером и посадили его в банду. Мне нужен код, который кладет врагов CJ. 7, чтобы положить эти модели в этих координатах. Но я думаю, этот код дает ошибку. У Вас есть код? Я использовал Google Переводчик поставить на мой вопрос на русском языке. Пожалуйста, помогите мне!

Offline

#5 19-10-2011 17:00

Den_spb
From: Ленинград
Registered: 23-11-2008
Posts: 941
Website

Re: I'm having problems in my code! Help please!

Код работает без ошибок. Проверь.
Тип актёра 2@ может быть любым. Опкод 05E2: работает независимо от типа актёра.

Last edited by Den_spb (19-10-2011 17:04)

Offline

#6 19-10-2011 17:11

Manoel Victor
From: Minas Gerais
Registered: 26-04-2011
Posts: 44
Website

Re: I'm having problems in my code! Help please!

Он дал об ошибке: неизвестный директиву "then".

Offline

#7 19-10-2011 17:33

Den_spb
From: Ленинград
Registered: 23-11-2008
Posts: 941
Website

Re: I'm having problems in my code! Help please!

Аккуратно скопируй весь код целиком и вставь в окно Sanny Builder.

Last edited by Den_spb (19-10-2011 17:35)

Offline

#8 19-10-2011 17:47

Manoel Victor
From: Minas Gerais
Registered: 26-04-2011
Posts: 44
Website

Re: I'm having problems in my code! Help please!

Это дает ошибку в этой строке:

then

Offline

#9 19-10-2011 18:05

Den_spb
From: Ленинград
Registered: 23-11-2008
Posts: 941
Website

Re: I'm having problems in my code! Help please!

{$CLEO .cs}

//-------------MAIN---------------
0006: 2@ = -1 

:Noname_7
0001: wait 0 ms 
00D6: if 
8256:   not player $PLAYER_CHAR defined 
004D: jump_if_false @Noname_22 
0002: jump @Noname_C1 

:Noname_22
00D6: if 
056D:   actor 2@ defined 
004D: jump_if_false @Noname_4E 
00D6: if 
0118:   actor 2@ dead 
004D: jump_if_false @Noname_47 
009B: destroy_actor 2@ 

:Noname_47
0002: jump @Noname_C1 

:Noname_4E
00D6: if 
00EC:   actor $PLAYER_ACTOR 0 near_point 1508.885 2918.351 radius 113.362 115.0 
004D: jump_if_false @Noname_C1 
0247: load_model #BMYDRUG 
0247: load_model #DESERT_EAGLE 
038B: load_requested_models 
009A: 2@ = create_actor_pedtype 4 model #BMYDRUG at 1510.019 2915.165 9.4218 
0223: set_actor 2@ health_to 1700 
0446: set_actor 2@ immune_to_headshots 0 
01B2: give_actor 2@ weapon 24 ammo 9999 // Load the weapon model before using this 
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR 
0249: release_model #BMYDRUG 
0249: release_model #DESERT_EAGLE 

:Noname_C1
0002: jump @Noname_7

Offline

#10 19-10-2011 18:34

Manoel Victor
From: Minas Gerais
Registered: 26-04-2011
Posts: 44
Website

Re: I'm having problems in my code! Help please!

Den, я делаю это со всеми кодами, не так ли? Изменение только координаты, моделей и оружия, не так ли?

Offline

#11 19-10-2011 20:30

Den_spb
From: Ленинград
Registered: 23-11-2008
Posts: 941
Website

Re: I'm having problems in my code! Help please!

Я не понял.

Last edited by Den_spb (19-10-2011 20:33)

Offline

#12 19-10-2011 23:53

Manoel Victor
From: Minas Gerais
Registered: 26-04-2011
Posts: 44
Website

Re: I'm having problems in my code! Help please!

Что я хочу, Den, заключается в создании семь врагов, чтобы CJ. Как вы можете видеть, я отправил семь кодов. Интересно, если с этим кодом вы мне дали, я могу скопировать его несколько раз, только изменяя координаты, и модели оружия и персонажей для атаки CJ, вы знаете? Я хочу семь врагов атакуют CJ. Так что я хочу знать, если у вас есть ошибка, которую я скопировать этот код в семь раз, экономия с разными именами, изменение модели персонажей и оружия, вы знаете? Я отправлю примеры для вас. Смотрите, если я могу сделать, два кода на нерест двух разных врагов, только изменяя координаты, имя и моделей:
"первый_враг"

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
2@ = -1 

:NONAME_7
wait 0 
if 
   not Player.Defined($PLAYER_CHAR)
else_jump @NONAME_34 
jump @NONAME_193 

:NONAME_34
if 
   Actor.Defined(2@)
else_jump @NONAME_78 
if 
   Actor.Dead(2@)
else_jump @NONAME_71 
Actor.DestroyInstantly(2@)

:NONAME_71
jump @NONAME_193 

:NONAME_78
if 
00EC:   actor $PLAYER_ACTOR 0 near_point 1508.885 2918.351 radius 113.362 115.0 
else_jump @NONAME_193 
Model.Load(#BMYDRUG)
Model.Load(#DESERT_EAGLE)
038B: load_requested_models 
2@ = Actor.Create(CivMale, #BMYDRUG, 1510.019, 2915.165, 9.4218)
Actor.Health(2@) = 1700
0446: set_actor 2@ immune_to_headshots 0 
01B2: give_actor 2@ weapon 24 ammo 9999 // Load the weapon model before using this 
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR 
Model.Destroy(#BMYDRUG)
Model.Destroy(#DESERT_EAGLE)

:NONAME_193
jump @NONAME_7

"второго_врага"

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
2@ = -1 

:NONAME_7
wait 0 
if 
   not Player.Defined($PLAYER_CHAR)
else_jump @NONAME_34 
jump @NONAME_193 

:NONAME_34
if 
   Actor.Defined(2@)
else_jump @NONAME_78 
if 
   Actor.Dead(2@)
else_jump @NONAME_71 
Actor.DestroyInstantly(2@)

:NONAME_71
jump @NONAME_193 

:NONAME_78
if 
00EC:   actor $PLAYER_ACTOR 0 near_point 1489.602 2930.958 radius 113.362 115.0 
else_jump @NONAME_193 
Model.Load(#HMYDRUG)
Model.Load(#CUNTGUN)
038B: load_requested_models 
2@ = Actor.Create(CivMale, #HMYDRUG, 1494.824, 2932.765, 9.9839)
Actor.Health(2@) = 1700
0446: set_actor 2@ immune_to_headshots 0 
01B2: give_actor 2@ weapon 27 ammo 9999 // Load the weapon model before using this 
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR 
Model.Destroy(#HMYDRUG)
Model.Destroy(#CUNTGUN)

:NONAME_193
jump @NONAME_7

Видите? Я могу это сделать? Чтобы создать семь врагов. Я просто хочу знать, если он идет гладко. Делая же код в семь раз, и только изменение координаты, имя. Cs и оружия и модели персонажей.
Извините, если это выглядит и тот же код вы мне дали, но я PUZ кода вы дали мне и компилируется, но искажает код Sanny Builder.

Offline

#13 20-10-2011 01:12

~AquaZ~
Registered: 01-03-2010
Posts: 726

Re: I'm having problems in my code! Help please!

How about making all 7 enemies in 1 thread? This variant is suitable?

{$CLEO .cs}

//-------------MAIN---------------
1@ = -1
2@ = -1
3@ = -1
4@ = -1
5@ = -1
6@ = -1
7@ = -1

while true
  wait 50
  if or
    80EC: not  actor $PLAYER_ACTOR 0 near_point 1489.602 2930.958 radius 113.362 115.0
    not Player.Defined($PLAYER_CHAR)
  then
    Continue
  end

  if 
    not Actor.Defined(1@)
  then 
    Model.Load(#HMYDRUG)
    Model.Load(#CUNTGUN)
    038B: load_requested_models 
    1@ = Actor.Create(CivMale, #HMYDRUG, 1494.824, 2932.765, 9.9839)
    Actor.Health(1@) = 1700
    0446: set_actor 1@ immune_to_headshots 0 
    01B2: give_actor 1@ weapon 27 ammo 9999 // Load the weapon model before using this 
    05E2: AS_actor 1@ kill_actor $PLAYER_ACTOR 
    Model.Destroy(#HMYDRUG)
    Model.Destroy(#CUNTGUN)
  end
  if 
     Actor.Dead(1@)
  then
    Actor.DestroyInstantly(1@)
  end

  if 
    not Actor.Defined(2@)
  then 
    Model.Load(#HMYDRUG)
    Model.Load(#CUNTGUN)
    038B: load_requested_models 
    2@ = Actor.Create(CivMale, #HMYDRUG, 1494.824, 2932.765, 9.9839)
    Actor.Health(2@) = 1700
    0446: set_actor 2@ immune_to_headshots 0 
    01B2: give_actor 2@ weapon 27 ammo 9999 // Load the weapon model before using this 
    05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR 
    Model.Destroy(#HMYDRUG)
    Model.Destroy(#CUNTGUN)
  end
  if 
     Actor.Dead(2@)
  then
    Actor.DestroyInstantly(2@)
  end

//repeat code yet more times

end

Don't forget to change coords of 2...7 actors!
NOT TESTED.
P.S. Sorry for my english. If you can see some mistakes, please, tell me about them.

Offline

#14 20-10-2011 03:28

Robintedd
Registered: 20-10-2011
Posts: 1

Re: I'm having problems in my code! Help please!

Thanks for your contribution. I personally find it quite informative!

optimal health
hcg weightloss diet

Last edited by Robintedd (20-10-2011 04:53)

Offline

#15 20-10-2011 15:51

Manoel Victor
From: Minas Gerais
Registered: 26-04-2011
Posts: 44
Website

Re: I'm having problems in my code! Help please!

I had rather thought of it but did not know the code. I'll try and see if it worked, and then you talk. Thank you for your help friend!

Offline

#16 20-10-2011 16:25

Den_spb
From: Ленинград
Registered: 23-11-2008
Posts: 941
Website

Re: I'm having problems in my code! Help please!

Understood now grin
1. It's not good to copy one script several times. Script must be single.
2. If script creates more than 1 actor, then it's appropriate to use array.
Creating of 7 actors:

{$CLEO}
wait 0
for 0@ = 0 to 6
    1@(0@,7i) = -1
end
while true
    wait 0
    if
        not player.Defined($player_char)
    then
        continue
    end
    for 0@ = 0 to 6   
        if
            056D: actor 1@(0@,7i) defined
        then
            if
                Actor.Dead(1@(0@,7i))
            then
                009B: destroy_actor 1@(0@,7i)
            else
                05E2: AS_actor 1@(0@,7i) kill_actor $PLAYER_ACTOR  // It's enough for constant attack 
            end
        else
            if
                00EC:   actor $PLAYER_ACTOR 0 near_point -2026.6721 171.4566 {1508.885 2918.351} radius 20.0 20.0{113.362 115.0 }
            then
                0093: 8@ = integer 0@ to_float 
                8@ += -2026.6721 //1510.019
                if
                    0@ == 0
                then
                    9@ = 28
                    10@ = 348
                    11@ = 24
                end
                if
                    0@ == 1
                then
                    9@ = 30
                    10@ = 357
                    11@ = 27
                end
                if
                    0@ == 2
                then
                    9@ = 49
                    10@ = 339
                    11@ = 8
                end
                if
                    0@ == 3
                then
                    9@ = 111
                    10@ = 335
                    11@ = 4
                end
                if
                    0@ == 4
                then
                    9@ = 162
                    10@ = 341
                    11@ = 9
                end
                if
                    0@ == 5
                then
                    9@ = 181
                    10@ = 352
                    11@ = 28
                end
                if
                    0@ == 6
                then
                    9@ = 113
                    10@ = 350
                    11@ = 26
                end 
                Model.Load(9@)
                Model.Load(10@) 
                038B: load_requested_models 
                1@(0@,7i) = Actor.Create(4, 9@, 8@, 171.4566, 28.8359 {2915.165 9.4218})
                Actor.Health(1@(0@,7i)) = 1700
                0446: set_actor 1@(0@,7i) immune_to_headshots 0 
                01B2: give_actor 1@(0@,7i) weapon 11@ ammo 9999 // Load the weapon model before using this 
                model.Destroy(9@)
                model.Destroy(10@) 
            end    
        end 
    end   
end

Code creates actors near SF garage, but you can change coordinates.

искажает код Sanny Builder.

Script isn't changed after decompiling, although code looks otherwise.

Last edited by Den_spb (20-10-2011 17:13)

Offline

#17 22-10-2011 17:06

Manoel Victor
From: Minas Gerais
Registered: 26-04-2011
Posts: 44
Website

Re: I'm having problems in my code! Help please!

Я уже получил свой ​​код! Я нашел ошибку, я изменил коды операций и количество актеров и это сработало! Я сам! В любом случае, спасибо всем, кто пытался помочь мне!

-------

I already got my own code! I found the error, I changed the opcodes and the numbers of actors and it worked! I got myself! Anyway, thanks to everyone who tried to help me!

Offline

Board footer

Powered by FluxBB