Jump to content

Hard to do.


12jango

Recommended Posts

Is there any way to make an absolute command that would affects all kinds of pedtypes? devil.gif

For Drug Dealer, Gangs, etc are not going to follow any commands that I made (except commands to kill him) like performing animation. dontgetit.gif

Thanks! icon14.gificon14.gificon14.gif

 

Link to comment
Share on other sites

 

Is there any way to make an absolute command that would affects all kinds of pedtypes? devil.gif

For  Drug Dealer, Gangs, etc are not going to follow any commands that I made (except commands to kill him) like performing animation. dontgetit.gif

Thanks! icon14.gif  icon14.gif  icon14.gif

Only this method to count from 0 to 35584 and check if it is an instance of an actor

Wesser posted a method to get every actor in the gameworld, also those of missions, extern scripts as well as other cleo script except those of the food stores like burgershop etc.

here: call_func @getActorInSphere

The for loop repeats a block of code while a control variable runs through an arithmetic progression.

 

A smaller and faster vaiation was done by Deji. Find the template >here<

 

I recompiled the script to get access and push the actors in arrays because it needs to controle more actors at same time and each actor needs his own variable

 

the script below runs throw 6 subscripts after keypress backspace

 

first gosub to to count from 0 to 35584 and check if it is an instance of an actor

if it is an actor, then create_actor fire (it can find max. 12 actors)

wait 2 sekonds

second gosub to remove then actor and fire instances

 

the other gosubs are repeating the first two gosubs for 2 times

 

{$CLEO .cs}:RandomActor_FIRE_byusinga_countingcheck03A4: name_thread 'RANDAFR' :RANDAFR_110001: wait 0 ms if 0256:   player $PLAYER_CHAR defined jf @RANDAFR_11if0AB0:   key_pressed 8//  backspacejf @RANDAFR_11 0050: gosub @RANDAFR_start_random_check 0001: wait 2000 ms 0050: gosub @RANDAFR_remove_actorfire 0001: wait 250 ms 0050: gosub @RANDAFR_start_random_check 0001: wait 2000 ms 0050: gosub @RANDAFR_remove_actorfire 0001: wait 250 ms 0050: gosub @RANDAFR_start_random_check 0001: wait 2000 ms 0050: gosub @RANDAFR_remove_actorfire 0001: wait 250 msjump @RANDAFR_11 :RANDAFR_start_random_check31@ = 0 27@ = 0 :RANDAFR_countingcheckLoop0085: 30@ = 31@ // (int) 29@ = 0 :RANDAFR_CheckLoopif and056D:   actor 30@ defined 803C:   not  $PLAYER_ACTOR == 30@ // (int) jf @RANDAFR_countingcheck1 0085: 0@(27@,12i) = 30@ // (int) 0326: 13@(27@,12i) = create_actor 0@(27@,12i) fire 27@ += 1 jump @RANDAFR_countingcheck2 :RANDAFR_countingcheck130@ += 1 29@ += 1 29@ > 127 jf @RANDAFR_CheckLoop :RANDAFR_countingcheck231@ += 256 if or27@ > 12 31@ > 35584 jf @RANDAFR_countingcheckLoop return :RANDAFR_remove_actorfire0006: 27@ = 0 :RANDAFR_remove_10001: wait 0 ms if 001B:   13 > 27@ jf @RANDAFR_remove_end 02D1: remove_fire 13@(27@,12i) 01C2: remove_references_to_actor 0@(27@,12i) // Like turning an actor into a random pedestrian 000A: 27@ += 1 jump @RANDAFR_remove_1 :RANDAFR_remove_end0051: return

 

 

 

 

script below creates markers above actors

it repeats allways 2 gosubs

 

{$CLEO .cs}:RandomActor_MARKER_byusinga_countingcheck03A4: name_thread 'PEDMARK' 0006: 26@ = 0 :PEDMARK_18wait 0 if 0256:   player $PLAYER_CHAR defined jf @PEDMARK_18 077E: get_active_interior_to 12@ if 12@ == 0 jf @PEDMARK_18 13@ = -1 14@ = -1 15@ = -1 16@ = -1 17@ = -1 18@ = -1 19@ = -1 20@ = -1 21@ = -1 22@ = -1 23@ = -1 24@ = -1 gosub @PEDMARK_171 wait 300 gosub @PEDMARK_344 jump @PEDMARK_18 :PEDMARK_17131@ = 0 27@ = 0 :PEDMARK_1850085: 30@ = 31@ // (int) 29@ = 0 :PEDMARK_200if and056D:   actor 30@ defined 803C:   not  $PLAYER_ACTOR == 30@ // (int) 8118:   not actor 30@ dead jf @PEDMARK_278 0085: 0@(27@,12i) = 30@ // (int) 0187: 13@(27@,12i) = create_marker_above_actor 0@(27@,12i) jump @PEDMARK_264 :PEDMARK_26427@ += 1 jump @PEDMARK_306 :PEDMARK_27830@ += 1 29@ += 1 29@ > 127 jf @PEDMARK_200 :PEDMARK_30631@ += 256 if or27@ > 10 31@ > 35584 jf @PEDMARK_185 return :PEDMARK_3440006: 27@ = 0 :PEDMARK_351wait 0 if 11 > 27@ jf @PEDMARK_427 if 8039:   not  13@(27@,12i) == -1 jf @PEDMARK_404 0164: disable_marker 13@(27@,12i) :PEDMARK_40401C2: remove_references_to_actor 0@(27@,12i) // Like turning an actor into a random pedestrian 27@ += 1 jump @PEDMARK_351 :PEDMARK_427return

 

 

script below shows red smoke above every actor

it reapeats permanent 2 gosubs to find 25 actors, shows smoke and remove their reference

 

{$CLEO .cs}:RandomActor_SMOKE_byusinga_countingcheckthread 'RACTSMK':RACTSMK_11wait 0 if 0256:   player $PLAYER_CHAR defined jf @RACTSMK_110@ = -1 1@ = -1 2@ = -1 3@ = -1 4@ = -1 5@ = -1 6@ = -1 7@ = -1 8@ = -1 9@ = -1 10@ = -1 11@ = -1 12@ = -113@ = -1 14@ = -1 15@ = -1 16@ = -1 17@ = -1 18@ = -1 19@ = -1 20@ = -1 21@ = -1 22@ = -1 23@ = -1 24@ = -1gosub @RACTSMK_175 wait 0 gosub @RACTSMK_336jump @RACTSMK_11 :RACTSMK_17531@ = 0 27@ = 0 :RACTSMK_1890085: 30@ = 31@ // (int) 29@ = 0 :RACTSMK_204if and056D:   actor 30@ defined 803C:   not  $PLAYER_ACTOR == 30@ // (int)  jf @RACTSMK_270 0085: 0@(27@,32i) = 30@ // (int)04C4: create_coordinate 25@ 26@ 28@ from_actor 30@ offset 0.0 0.0  1.2095C: create_smoke_at 25@ 26@ 28@ velocity 0.0 0.0 1.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red 095C: create_smoke_at 25@ 26@ 28@ velocity 0.0 0.0 3.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red 095C: create_smoke_at 25@ 26@ 28@ velocity 0.0 0.0 5.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red 27@ += 1 jump @RACTSMK_298 :RACTSMK_27030@ += 1 29@ += 1 29@ > 127 jf @RACTSMK_204 :RACTSMK_29831@ += 256 if or27@ > 24 31@ > 35584 jf @RACTSMK_189 return :RACTSMK_33627@ = 0 :RACTSMK_343wait 0 if 25 > 27@ jf @RACTSMK_397if   not 0@(27@,32i) == -1 jf @RACTSMK_345  01C2: remove_references_to_actor 0@(27@,32i) // Like turning an actor into a random pedestrian :RACTSMK_34527@ += 1 jump @RACTSMK_343 :RACTSMK_397return

 

Edited by ZAZ
Link to comment
Share on other sites

Or the fastest and easiest way...

 

 

00A0: store_actor $PLAYER_ACTOR position_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3if   0AE1:   3@ = random_actor_near_point 0@ 1@ 2@ in_radius 10.0 find_next 0 pass_deads 1then   repeat       0321: AS_actor 3@ die_headshotted   until 8AE1:   not 3@ = random_actor_near_point 0@ 1@ 2@ in_radius 10.0 find_next 1 pass_deads 1end

 

Link to comment
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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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