Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,934 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

midou35000

Need Help With A Script

Recommended Posts

midou35000

Ok i left the AK47 its good:

 

{$CLEO .cs}:ACTOR_0103A4: name_thread 'Actor':ACTOR_020001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_02if0AB0: key_pressed 78004D: jump_if_false @ACTOR_020247: request_model 1130247: request_model #AK47:ACTOR_030001: wait  0 ms00D6: if  and0248:   model 113 available0248:   model #AK47 available004D: jump_if_false @ACTOR_0304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2009A: [email protected] = create_actor_pedtype 4 model 113 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  30 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to  100005E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model 113:ACTOR_040001: wait  0 msif8118: NOT   actor [email protected] dead004D: jump_if_false @ACTOR_05if0104: actor $PLAYER_ACTOR near_actor [email protected] radius  100.0  100.0  20.0 sphere  0004D: jump_if_false @ACTOR_050002: jump @ACTOR_04:ACTOR_0501C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @ACTOR_02

Share this post


Link to post
Share on other sites
ZAZ

there's a player $PLAYER_CHAR defined check missing in the loop after spawning

Edited by ZAZ

Share this post


Link to post
Share on other sites
midou35000

ZAZ, wich number shall i use? i just followed the number of the ak47 and i did the same thing to shotgspa here:

http://prntscr.com/46idyd

 

{$CLEO .cs} :ACTOR_0103A4: name_thread 'Actor' :ACTOR_020001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_02if0AB0: key_pressed 78004D: jump_if_false @ACTOR_020247: request_model 1130247: request_model #SHOTGSPA :ACTOR_030001: wait  0 ms00D6: if  and0248:   model 113 available0248:   model #SHOTGSPA available004D: jump_if_false @ACTOR_0304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2009A: [email protected] = create_actor_pedtype 4 model 113 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  27 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to  100005E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model 113 :ACTOR_040001: wait  0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_05if8118: NOT   actor [email protected] dead004D: jump_if_false @ACTOR_050104: actor $PLAYER_ACTOR near_actor [email protected] radius  100.0  100.0  20.0 sphere  0004D: jump_if_false @ACTOR_050002: jump @ACTOR_04 :ACTOR_0501C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @ACTOR_02
Edited by midou35000

Share this post


Link to post
Share on other sites
ZAZ

well done, just a tiny note: an "if" was lost by adding the player_defined check

if0256: player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_05//--- here should be IF ---8118: NOT   actor [email protected] dead004D: jump_if_false @ACTOR_05

but it isn't a problem because the compiler know that here should be a "if",
unless if there'e more than one condition per check, you know, then you have to determine if "if and" or "if or" is meant

 

-----------------------------------------------------------------------------------------

 

About model loading:

you can enter the id number as well as the model name with # infront

so, the ped id: 113, MAFBOSS can also be called with #MAFBOSS

and the weapon id: 351, shotgspa can also be called with 351

0247: request_model #MAFBOSS0247: request_model 351 :ACTOR_030001: wait  0 ms00D6: if  and0248:   model #MAFBOSS available0248:   model 351 available004D: jump_if_false @ACTOR_0304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2009A: [email protected] = create_actor_pedtype 4 model #MAFBOSS at [email protected] [email protected] [email protected]: give_actor [email protected] weapon  27 ammo  15000249: release_model #MAFBOSS0249: release_model 351

ATTENTION: loading special actors needs other codes than loading peds

 

[Q] What's different of peds and special actors?

 

[A] peds are defined in peds.ide with ID number and model name (113, MAFBOSS)

special actors not, but there are ID numbers reserverd in peds.ide to assigne a ID number temporarelly (290 - 299)

so special actors need to be called allways by file name: 023C: load_special_actor 'TENPEN' as 1

-----------------------------------------------------------------------------------------------------------------------------

 

 

Write now a script that spawns MAFBOSS and RYDER, one actor with AK47, the other with shotgun

 

 

 

 

Share this post


Link to post
Share on other sites
midou35000

ZAZ am stuck help me please.

Share this post


Link to post
Share on other sites
ZAZ

where did you stuck?

Share this post


Link to post
Share on other sites
midou35000

There is no RYDER model in peds.ide or shall i type?:

 

0247: request_model #RYDER
EDIT:Never Mind its a specialactor i should load with

 

023C: load_special_actor 'RYDER' as 1
you are so smart ZAZ and... do i have to ccheck if the model if availeble with opcode 0248.?

Here is what i got right now:

 

{$CLEO .cs} :ACTOR_0103A4: name_thread 'ActorS' :ACTOR_020001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_02if0AB0: key_pressed 78//------key N004D: jump_if_false @ACTOR_020247: request_model 1130247: request_model #SHOTGSPA0247: request_model #AK47:ACTOR_0020001: wait 0 ms00D6: if823D:   not special_actor 1 loaded004D: jump_if_false @ACTOR_0002023C: load_special_actor 'RYDER' as 1:ACTOR_0002wait 0 ms077E: get_active_interior_to [email protected]: load_special_actor 'RYDER' as 1 :ACTOR_030001: wait  0 ms00D6: if  and0248:   model 113 available0248:   model #SHOTGSPA available0248:   model #AK47 available004D: jump_if_false @ACTOR_0304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2009A: [email protected] = create_actor_pedtype 4 model 113 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  27 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to  100005E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model 11304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 2.0 -2.0 0.2009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  30 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to 10000860: link_actor [email protected] to_interior [email protected]: AS_actor [email protected] kill_actor $PLAYER_ACTOR0296: unload_special_actor 1 :ACTOR_040001: wait  0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_05if8118: NOT   actor [email protected] dead004D: jump_if_false @ACTOR_050002: jump @ACTOR_04 :ACTOR_0501C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @ACTOR_02
Edited by midou35000

Share this post


Link to post
Share on other sites
ZAZ

Not bad

You found out, RYDER isn't defined as ped but it's a special actor, needs to load with 023C: and check if loaded with 0248:

other model which have definitions in any *.ide file needs to load with 0247: and check if loaded with 0247: , vehicles, peds, objects, weapons

look into vehicles.ide, peds.ide, default.ide as well ide files of map folder

(tuningparts of veh_mods.ide can you also load in that way and spawn as object but to use it as tuningpart requires to load with 06E9: and check if loaded with 06EA:)

 

your problem is still to understand what a conditional check do

so let's focus this load check:

 

:ACTOR_0020001: wait 0 ms00D6: if823D:   not special_actor 1 loaded004D: jump_if_false @ACTOR_0002023C: load_special_actor 'RYDER' as 1
what do you think, does the reading process do when it read this lines

 

00D6: if823D:   not special_actor 1 loaded004D: jump_if_false @ACTOR_0002
if not actor loaded, then ... ?

 

i think your answer will be: "if not actor loaded, then load_special_actor"

 

but we need it reverse:

first load the special actor with 023C: then check if it's loaded

and repeat the check as long as it's really loaded

to repeat the check needs to put the check in a LOOP

 

 

023C: load_special_actor 'RYDER' as 1:LOAD_CHECK_LOOPwait 0if023D:   special_actor 1 loadedelse_jump @LOAD_CHECK_LOOP
when the reading process reads the first time the conditional check 023D: special_actor 1 loaded, then the actor isn't loaded yet

and the else_jump leads the reading process to the label :LOAD_CHECK_LOOP

then it checks again and again, thausend times per second, it repeats the codes because it's a LOOP

and only if the actor is really loaded, then the check will be passed

 

you can it also do with NOT-version of the condition, but then you must build the jump instruction in another way

 

 

:LOAD_CHECK_LOOPwait 0if823D: not  special_actor 1 loadedelse_jump @LOAD_CHECK_passed023C: load_special_actor 'RYDER' as 1jump @LOAD_CHECK_LOOP:LOAD_CHECK_passed009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]
now it checks first if the actor isn't loaded and of course, this check will be passed immeadiately and the following code loads the actor,

BUT THEN, SEND the Reading process BACK TO LOOP ADRESS TO REPEAT THE CHECK

 

Whats wrong with your codes?

 

:ACTOR_0020001: wait 0 ms00D6: if823D:   not special_actor 1 loaded004D: jump_if_false @ACTOR_0002023C: load_special_actor 'RYDER' as 1
it checks first if the actor isn't loaded and of course, this check will be passed immeadiately and the following code loads the actor

but it didn't repeat the check, the reading process instead continues the reading of the following codes

but the actor isn't loaded really at that moment when this code will be read:

009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]

and cause a game crash

Share this post


Link to post
Share on other sites
midou35000

Ok What About Now:

 

{$CLEO .cs} :ACTOR_0103A4: name_thread 'ActorS' :ACTOR_020001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_02if0AB0: key_pressed 78//------key N004D: jump_if_false @ACTOR_020247: request_model 1130247: request_model #SHOTGSPA0247: request_model #AK47:ACTOR_0020001: wait 0 ms00D6: if823D:   not special_actor 1 loaded004D: jump_if_false @ACTOR_002023C: load_special_actor 'RYDER' as 1jump @ACTOR_0002:ACTOR_0002wait 0 ms077E: get_active_interior_to [email protected]: load_special_actor 'RYDER' as 1 :ACTOR_030001: wait  0 ms00D6: if  and0248:   model 113 available0248:   model #SHOTGSPA available0248:   model #AK47 available004D: jump_if_false @ACTOR_0304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2009A: [email protected] = create_actor_pedtype 4 model 113 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  27 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to  100005E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model 11304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 2.0 -2.0 0.2009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  30 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to 10000860: link_actor [email protected] to_interior [email protected]: AS_actor [email protected] kill_actor $PLAYER_ACTOR0296: unload_special_actor 1 :ACTOR_040001: wait  0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_05if8118: NOT   actor [email protected] dead004D: jump_if_false @ACTOR_050002: jump @ACTOR_04 :ACTOR_0501C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @ACTOR_02

Share this post


Link to post
Share on other sites
ZAZ

no, you didn't understand
your check:

:ACTOR_002 <------ adress "LOAD_CHECK_LOOP"0001: wait 0 ms00D6: if823D:   not special_actor 1 loaded004D: jump_if_false @ACTOR_002 <------ leads to adress "LOAD_CHECK_LOOP"023C: load_special_actor 'RYDER' as 1jump @ACTOR_0002<--- useless jump to adress "LOAD_CHECK_passed":ACTOR_0002 <-- adress "LOAD_CHECK_passed"

my advice:

:LOAD_CHECK_LOOPwait 0if823D: not  special_actor 1 loadedelse_jump @LOAD_CHECK_passed023C: load_special_actor 'RYDER' as 1jump @LOAD_CHECK_LOOP:LOAD_CHECK_passed

Share this post


Link to post
Share on other sites
midou35000

Oh yes My bad i have made a mistake in copy/paste, i did understand:

 

{$CLEO .cs} :ACTOR_0103A4: name_thread 'ActorS' :ACTOR_020001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_02if0AB0: key_pressed 78//------key N004D: jump_if_false @ACTOR_020247: request_model 1130247: request_model #SHOTGSPA0247: request_model #AK47:ACTOR_0020001: wait 0 ms00D6: if823D:   not special_actor 1 loaded004D: jump_if_false @ACTOR_0002023C: load_special_actor 'RYDER' as 1jump @ACTOR_002:ACTOR_0002wait 0 ms077E: get_active_interior_to [email protected]: load_special_actor 'RYDER' as 1 :ACTOR_030001: wait  0 ms00D6: if  and0248:   model 113 available0248:   model #SHOTGSPA available0248:   model #AK47 available004D: jump_if_false @ACTOR_0304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2009A: [email protected] = create_actor_pedtype 4 model 113 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  27 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to  100005E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model 11304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 2.0 -2.0 0.2009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  30 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to 10000860: link_actor [email protected] to_interior [email protected]: AS_actor [email protected] kill_actor $PLAYER_ACTOR0296: unload_special_actor 1 :ACTOR_040001: wait  0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_05if8118: NOT   actor [email protected] dead004D: jump_if_false @ACTOR_050002: jump @ACTOR_04 :ACTOR_0501C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @ACTOR_02

Share this post


Link to post
Share on other sites
ZAZ

ok, now remove the useless codes

:ACTOR_0002wait 0 ms <-- useless077E: get_active_interior_to [email protected]: load_special_actor 'RYDER' as 1 <-- useless

then make the check in the loop after the spawning in this way that the code jumps to the cleanup only if both actors are dead

Share this post


Link to post
Share on other sites
midou35000

Like that:

 

{$CLEO .cs} :ACTOR_0103A4: name_thread 'ActorS' :ACTOR_020001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_02if0AB0: key_pressed 78//------key N004D: jump_if_false @ACTOR_020247: request_model 1130247: request_model #SHOTGSPA0247: request_model #AK47:ACTOR_0020001: wait 0 ms00D6: if823D:   not special_actor 1 loaded004D: jump_if_false @ACTOR_0002023C: load_special_actor 'RYDER' as 1jump @ACTOR_002:ACTOR_0002077E: get_active_interior_to [email protected]_jump @ACTOR_0002 :ACTOR_030001: wait  0 ms00D6: if  and0248:   model 113 available0248:   model #SHOTGSPA available0248:   model #AK47 available004D: jump_if_false @ACTOR_0304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2009A: [email protected] = create_actor_pedtype 4 model 113 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  27 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to  100005E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model 11304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 2.0 -2.0 0.2009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  90.001B2: give_actor [email protected] weapon  30 ammo  1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to 10000860: link_actor [email protected] to_interior [email protected]: AS_actor [email protected] kill_actor $PLAYER_ACTOR0296: unload_special_actor 1 :ACTOR_040001: wait  0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @ACTOR_05if8118: NOT   actor [email protected] dead004D: jump_if_false @ACTOR_050002: jump @ACTOR_04 :ACTOR_0501C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @ACTOR_02

Share this post


Link to post
Share on other sites
ZAZ

what should that be? i think we give it up

Edited by ZAZ

Share this post


Link to post
Share on other sites
midou35000

What do you mean?

Share this post


Link to post
Share on other sites
ZAZ


:ACTOR_0002

077E: get_active_interior_to [email protected]

else_jump @ACTOR_0002 <------------------ i mean this

Share this post


Link to post
Share on other sites
midou35000

Sorry dude


Ok could you explain more about what you said in the last post that you asked to make the check loop.

Edited by midou35000

Share this post


Link to post
Share on other sites
ZAZ

doesn't matter what i said, what did you think you were doing, as you put that else_jump there?

Share this post


Link to post
Share on other sites
midou35000

Isnt else_jump is like jump_if_false??

Share this post


Link to post
Share on other sites
ZAZ

yes and what sense does it make at that position?

Share this post


Link to post
Share on other sites
midou35000

I dont know you told me to make a conditional check :p

Share this post


Link to post
Share on other sites
ZAZ

and where is the condition of your imaginary conditional check?

 

put your smiley in your a..

 

 

Share this post


Link to post
Share on other sites
midou35000

Dude ive got confused plz help me :panic:

Share this post


Link to post
Share on other sites
jayd00

and where is the condition of your imaginary conditional check?

 

put your smiley in your a..

 

 

jajaja I was like :O:blink: woow... you really have a big patient! :cookie::cookie:

 

Dude ive got confused plz help me :panic:

test this;

 

{$CLEO}thread 'ActorS':start_codewhile trueif  0256:   player $PLAYER_CHAR definedthen    if 0AB0:   key_pressed 78//------key N    then break     endend wait 0end/// load models  023C: load_special_actor 'RYDER' as 10247: request_model 1130247: request_model #SHOTGSPA0247: request_model #AK47while trueif and 823D:  not special_actor 1 loaded8248:  not model 113 available8248:  not model #SHOTGSPA available8248:  not model #AK47 availablejf break wait 0end///  create the 3d Models04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2009A: [email protected] = create_actor_pedtype 4 model 113 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to 90.001B2: give_actor [email protected] weapon 27 ammo 1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to 1000223: set_actor [email protected] health_to 100004C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 2.0 -2.0 0.2009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to 90.001B2: give_actor [email protected] weapon 30 ammo 1500  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to 1000223: set_actor [email protected] health_to 1000// release models0249: release_model 1130296: unload_special_actor 10249: release_model #SHOTGSPA0249: release_model #AK47// give new tasks to new actors05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR// check if someone is deadwhile trueif  8256: not player $PLAYER_CHAR defined    // if wasted/bustedthen  break endif 056D:   actor [email protected] definedthen     if  0118:   actor [email protected] dead    then  01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian    endendif 056D:   actor [email protected] definedthen     if  0118:   actor [email protected] dead    then  01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian    endendif and        /// both are dead!856D:  not actor [email protected] defined856D:  not actor [email protected] definedthen  breakend wait 0end/// last checks, to be sure both actors are dead, if not, turning them into a random pedestrian if  056D:   actor [email protected] definedthen      01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrianendif 056D:   actor [email protected] definedthen    01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrianendwait 2000goto @start_code
instructions;
-copy & paste into sanny builder
-compile & put a name
- locate the .cs file
-decompile the file and "Magic"
-you will understand now. ;)
study the code... and test it by yourself.
and a good advice will be that you keep order in your scripts ;)

good luck ;)

Edited by jayd00

Share this post


Link to post
Share on other sites
midou35000

ZAZ, Sorry For That i know what was my mistake and thanks jayd00:

 

{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'ACTORS' :ACTORS_110001: wait  0 msif 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @ACTORS_11 if 0AB0:   key_pressed 78 //-------key N  004D: jump_if_false @ACTORS_11 :ACTORS_60023C: load_special_actor 'RYDER' as 10247: load_model #MAFBOSS 0247: load_model #SHOTGSPA 0247: load_model #AK47 :ACTORS_8700D6: if and823D:   not special_actor 1 loaded 8248:   not model #MAFBOSS available 8248:   not model #SHOTGSPA available 8248:   not model #AK47 available 004D: jump_if_false @ACTORS_127 0001: wait 0 ms 0002: jump @ACTORS_87 :ACTORS_12704C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2 009A: [email protected] = create_actor_pedtype 4 model #MAFBOSS at [email protected] [email protected] [email protected] 0173: set_actor [email protected] Z_angle_to 90.0 01B2: give_actor [email protected] weapon 27 ammo 1500 // Load the weapon model before using this 02E2: set_actor [email protected] weapon_accuracy_to 100 0223: set_actor [email protected] health_to 1000 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 2.0 -2.0 0.2 009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected] 0173: set_actor [email protected] Z_angle_to 90.0 01B2: give_actor [email protected] weapon 30 ammo 1500 // Load the weapon model before using this 02E2: set_actor [email protected] weapon_accuracy_to 100 0223: set_actor [email protected] health_to 1000 0249: release_model #MAFBOSS 0296: unload_special_actor 1 0249: release_model #SHOTGSPA 0249: release_model #AK47 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR :ACTORS_32600D6: if 8256:   not player $PLAYER_CHAR defined 004D: jump_if_false @ACTORS_349 0002: jump @ACTORS_462 :ACTORS_34900D6: if 056D:   actor [email protected] defined 004D: jump_if_false @ACTORS_386 00D6: if 0118:   actor [email protected] dead 004D: jump_if_false @ACTORS_386 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian :ACTORS_38600D6: if 056D:   actor [email protected] defined 004D: jump_if_false @ACTORS_423 00D6: if 0118:   actor [email protected] dead 004D: jump_if_false @ACTORS_423 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian :ACTORS_42300D6: if and856D:   not actor [email protected] defined 856D:   not actor [email protected] defined 004D: jump_if_false @ACTORS_386 :ACTORS_46200D6: if 056D:   actor [email protected] defined 004D: jump_if_false @ACTORS_462 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian :ACTORS_48300D6: if 056D:   actor [email protected] defined 004D: jump_if_false @ACTORS_483 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 0002: jump @ACTORS_11

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.