Quantcast

Jump to content

» «
Photo

[GTA SA] ~ CLEO Script Tutorial ~

631 replies to this topic
123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#241

Posted 16 May 2011 - 03:39 AM

How to active beach party in Life's a beach mission ? active the party anytime we want or 21pm-4am inlove.gif

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci Racing
  • Joined: 01 Feb 2010
  • Poland

#242

Posted 16 May 2011 - 12:40 PM

It's manually scripted. However, you can try to use:

CODE
0662: "ACTIVATE_COOL_BEACH_PARTY"

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#243

Posted 16 May 2011 - 02:56 PM Edited by ZAZ, 16 May 2011 - 03:58 PM.

QUOTE (Sasukers @ May 15 2011, 21:03)
I want to throw the beachball and  When the beachball collides, the beach ball is attached in ANY surface

i know only this opcode to check if there is a wall of a Map building
CODE
:PARAMOD_6347
0001: wait 0 ms
04C4: store_coords_to 13@ 12@ 22@ from_actor $PLAYER_ACTOR with_offset 3.5 3.5 1.5
04C4: store_coords_to 7@ 27@ 23@ from_actor $PLAYER_ACTOR with_offset -3.5 -3.5 0.0
00D6: if
06BD:   no_obstacles_between 13@ 12@ 22@ and 7@ 27@ 23@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PARAMOD_6461


Another way is to stop the thrown object when it collides
Have you read this chapter: Object - COLLISION - check?
there is an example script to stop the object for a moment when it collides.

Finaly could you merge both methods



QUOTE (123iamking @ May 16 2011, 03:39)
How to active beach party in Life's a beach mission ? active the party anytime we want or 21pm-4am  inlove.gif

by using this code:
CODE
0417: start_mission 31



123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#244

Posted 17 May 2011 - 01:29 AM

QUOTE (ZAZ @ May 16 2011, 14:56)
QUOTE (Sasukers @ May 15 2011, 21:03)
I want to throw the beachball and  When the beachball collides, the beach ball is attached in ANY surface

i know only this opcode to check if there is a wall of a Map building
CODE
:PARAMOD_6347
0001: wait 0 ms
04C4: store_coords_to 13@ 12@ 22@ from_actor $PLAYER_ACTOR with_offset 3.5 3.5 1.5
04C4: store_coords_to 7@ 27@ 23@ from_actor $PLAYER_ACTOR with_offset -3.5 -3.5 0.0
00D6: if
06BD:   no_obstacles_between 13@ 12@ 22@ and 7@ 27@ 23@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PARAMOD_6461


Another way is to stop the thrown object when it collides
Have you read this chapter: Object - COLLISION - check?
there is an example script to stop the object for a moment when it collides.

Finaly could you merge both methods



QUOTE (123iamking @ May 16 2011, 03:39)
How to active beach party in Life's a beach mission ? active the party anytime we want or 21pm-4am  inlove.gif

by using this code:
CODE
0417: start_mission 31

Thank you , you're my hero ! inlove.gif inlove.gif

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#245

Posted 17 May 2011 - 01:50 AM Edited by 123iamking, 17 May 2011 - 01:53 AM.

code 0417: start_mission 31 doesn't work as I expect ! first ,it starts the whole mission Life 's a beach ! second ,it get trouble with my old mod - my "blow up all car" mod activate when I go to beach party , my "skate board" activate too,every body hold a skate board ! cry.gif sad.gif confused.gif Can I just activate "beach party" and deactivate it as well monocle.gif

otakups
  • otakups

    Player Hater

  • Members
  • Joined: 28 Apr 2011

#246

Posted 17 May 2011 - 02:07 AM

hi, i just started cleo scripts yesterday.
i've been looking at your tuts for 12hrs straight now.. i think.

but could you tell me how to get actor i'm aiming at?
i'm guessing it's on the memory coding part, but i skipped that part.. i get a lot of crashes for tinkering.

thanks.

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#247

Posted 17 May 2011 - 02:37 PM

Plz explain this code :
1@(23@,16i) = Actor.Create(Prostitute, #SPECIAL06, 961.4539, -50.44983, 1001.117)
23@,16i = what’s this mean ?
Prostitute = what’s this for ? (sometimes this’s “Mission1”)
961.4539, -50.44983, 1001.117 = I know this set the actor appear at somewhere we want ,but I don’t know how they can make it !
thank
inlove.gif

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#248

Posted 17 May 2011 - 04:58 PM

QUOTE (123iamking @ May 17 2011, 01:50)
code 0417: start_mission 31 doesn't work as I expect ! first ,it starts the whole mission Life 's a beach ! second ,it get trouble with my old mod - my "blow up all car" mod activate when I go to beach party , my "skate board" activate too,every body hold a skate board !  cry.gif   sad.gif   confused.gif   Can I just activate "beach party" and deactivate it as well  monocle.gif

It's the only way to start this mission

If another script disturbs it needs to deactivate the other script.
Either remove the cleoscript or stop it with
0ABA: end_custom_thread_named 'DFTSMOK'
therefore you have to know the threadnames of the scripts "blow up all car" and "skate board"
If you have seen my example scripts, they all have a valid threadname
Valid threadname means they have maximum 7 charakter

thread 'MEMCAR'

03A4: name_thread 'TELE'

QUOTE (123iamking @ May 17 2011, 14:37)
Plz  explain this code :
1@(23@,16i) = Actor.Create(Prostitute, #SPECIAL06, 961.4539, -50.44983, 1001.117)
23@,16i = what’s this mean ?
Prostitute = what’s this for ? (sometimes this’s “Mission1”)
961.4539, -50.44983, 1001.117 = I know this set the actor appear at somewhere we  want ,but I don’t know how they can make it !

1@(23@,16i) is an arry construct
Read here about arrays
Prostitute is the pedtype which can also be written by a number
The spawned actors have predefined execodet behaviors which is dependent by the pedtype parameter of the create_actor opcode.
Look for pedtypes in Sannybuilder HELP: SCM Documentation >> GTA SA >> PedTypes
PedType 22 will be a Prostitute

Sannybuilder allows scripting in different formats
by writing opcodes
or without opcodes

You should read the first chapter of the tutorial more exactly
There you will find this lesson:

Option: different view of the decompiled code

Choose TOOLS, then options
in option menu GENERAL you can find the feature to switch between 2 ways for decompiling

either decompile by writing opcodes
or decompiling without opcodes

user posted image


1. Writing Opcodes
All entries are shown with their opcodes
The opcodes are the real programm codes of the script functions
and by showing them is like to see the name of the command
Script with opcodes:
CODE
:CARSL_6439
00D6: if
00E1:   player 0 pressed_key 16
004D: jump_if_false @CARSL_6535
010B: 5@ = player $PLAYER_CHAR money
00D6: if
002D:   5@ >= 14@ // (int)
004D: jump_if_false @CARSL_6512
0012: 14@ *= -1
0109: player $PLAYER_CHAR money += 14@  
0002: jump @CARSL_6700


2. Without Opcodes
The script is more slim, maybe more clear (but not for me)
especially 004D: jump_if_false will be now jf
But not all opcodes are disappeared. Many codes must be used furthermore by applying their opcodes.
Script without opcodes:
CODE
:CARSL_6439
if
00E1:   player 0 pressed_key 16
jf @CARSL_6535
5@ = Player.Money($PLAYER_CHAR)
if
002D:   5@ >= 14@ // (int)
jf @CARSL_6512
14@ *= -1
Player.Money($PLAYER_CHAR) += 14@
jump @CARSL_6700


By compiling it doesnt matter if you use codes with opcodes or without opcodes
You can merge everything and sanny compile it as well,
provided that the code is correct and codelines which includes opcodes by decompiling without opcodes
must be used furthermore by using opcodes


A special feature by decompiling without opcodes is to translate opcode based commands into
Classes and Keywords

For a couple of codes can be used CLASSES
Read more about classes in Sannybuilder-HELP theme: Coding >> Classes

This code by decompiling with writing opcodes
00AB: put_car 22@ at -1577.942 52.6333 40.0

will by shown by decompiling with without opcodes in this kind:

Car.PutAt( 22@ , -1577.942, 52.6333, 40.0)

the meaning of the code is defined by the class entries

Car= class-name
PutAt= class-member
name and member are combined with a dot in the middle
22@ = class-owner
class-owner and parameters are placed in brackets and separated with comma
(parameter = needed information for the command)



Sanny allows to use some KEYWORDS instead using opcodes

Opcode = Keyword
_____________
0001: = wait
00d6: = if
004d: = else_jump
004d: = jf
0002: = jump
0051: = return
0050: = gosub
016a: = fade
01B6: = set_weather
03a4: = thread
04BB: = select_interior
0417: = start_mission
00d8: = mission_cleanup
0317: = increment_mission_attempts


Instead writing
004D: jump_if_false @MAIN_6
can be written
jf @MAIN_6
or
else_jump @MAIN_6
you also can merge it
004D: jf @MAIN_6

BnB
  • BnB

    #OGAY_2014

  • The Yardies
  • Joined: 28 Jun 2010
  • Greece

#249

Posted 17 May 2011 - 05:05 PM

QUOTE (123iamking @ May 17 2011, 16:37)
Prostitute = what’s this for ? (sometimes this’s “Mission1”)

It's the PedType.

PedType
0PLAYER1
1PLAYER2
2PLAYER_NETWORK
3PLAYER_UNUSED
4CIVMALE
5CIVFEMALE
6COP
7GANG1
8GANG2
9GANG3
10GANG4
11GANG5
12GANG6
13GANG7
14GANG8
15GANG9
16GANG10
17DEALER
18MEDIC
19FIREMAN
20CRIMINAL
21BUM*
22PROSTITUTE
23SPECIAL
24MISSION1
25MISSION2
26MISSION3
27MISSION4
28MISSION5
29MISSION6
30MISSION7
31MISSION8


EDIT: Damn the table took me too much time.

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#250

Posted 17 May 2011 - 05:29 PM Edited by ZAZ, 17 May 2011 - 05:33 PM.

QUOTE (BnB @ May 17 2011, 17:05)

EDIT: Damn the table took me too much time.

useless effort, the people should look into sannybuilder help



QUOTE (otakups @ May 17 2011, 02:07)
hi, i just started cleo scripts yesterday.
i've been looking at your tuts for 12hrs straight now.. i think.

but could you tell me how to get actor i'm aiming at?
i'm guessing it's on the memory coding part, but i skipped that part.. i get a lot of crashes for tinkering.

thanks.

Such an opcode is only available in cleo4
CODE
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET  

this code should work as IF and SET which means that it checks if an actor is catched for the script by aiming
and submit his handle into the variable
CODE
if
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
else_jump @searchloop
05BE: AS_kill_actor 0@//  <-- effect to the found actor (actor dies)


please read also this post: sannybuilder.com/CLEO 4. Questions and bug reports

With cleo3 is it possible to get an random_actor and check then if player aims to that
I did it in the Bullet Show Time mod
But the standart get_random_actor opcodes won't catch every ped and never a mission actor

Wesser and Deji found a method to get every ped and actor
It's an advanced method, read here: Catch random actor

So i can write it in this way
script below applies a red marked marker above the aimed actor
CODE
{$CLEO .cs}
:RandomActor_AIM_RAFSTEP2
thread 'RACTAIM'

:RACTAIM_11
wait 0
if
  Player.Defined($PLAYER_CHAR)
jf @RACTAIM_11
31@ = 0

:RACTAIM_155
0085: 30@ = 31@ // (int)
29@ = 0

:RACTAIM_170
if and
  Actor.Defined(30@)
803C:   not  $PLAYER_ACTOR == 30@ // (int)
8118:   not actor 30@ dead
jf @RACTAIM_302
if
0457:   player $PLAYER_CHAR aiming_at_actor 30@
jf @RACTAIM_302
13@ = Marker.CreateAboveActor(30@)

:RACTAIM_180
wait 0
if
  Player.Defined($PLAYER_CHAR)
jf @RACTAIM_185
if and
8118:   not actor 30@ dead
0457:   player $PLAYER_CHAR aiming_at_actor 30@
jf @RACTAIM_185
jump @RACTAIM_180


:RACTAIM_185
Marker.Disable(13@)
Actor.RemoveReferences(30@)
jump @RACTAIM_11


:RACTAIM_302
30@ += 1
29@ += 1
 29@ > 127
jf @RACTAIM_170

:RACTAIM_330
31@ += 256
if
 31@ > 35584
jf @RACTAIM_155
jump @RACTAIM_11

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci Racing
  • Joined: 01 Feb 2010
  • Poland

#251

Posted 17 May 2011 - 05:42 PM

Untested, but it may work better, just as CLEO4 opcode. Made is as a SCM func.

CODE
0AB1: call_scm_func @TargettedActor 0 store_targetted_actor_to 0@   // IF and SET


Use it as normal opcode, and at the end of your CLEO paste:

CODE
:TargettedActor
0A8D: 0@ = read_memory 0xB6FB54 size 4 virtual_protect 0
if
   0019:   0@ > 0
then
   0A8D: 1@ = read_memory 0xC0EC24 size 4 virtual_protect 0
   0AA8: call_function_method 0x4442D0 struct 1@ num_params 1 pop 0 0@ 2@
else
   0006: 2@ = -1
end
0AB2: ret 1 2@

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#252

Posted 17 May 2011 - 07:43 PM

QUOTE (SilentPL @ May 17 2011, 17:42)
Untested, but it may work better

tested, but @TargettedActor returns allways -1 and 0xB6FB54 returns allways 0

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#253

Posted 18 May 2011 - 02:38 AM

QUOTE (ZAZ @ May 17 2011, 16:58)

This code by decompiling with writing opcodes
00AB: put_car 22@ at -1577.942 52.6333 40.0

will by shown by decompiling with without opcodes in this kind:

Car.PutAt( 22@ , -1577.942, 52.6333, 40.0)


I still don't understand how do you make this -1577.942 52.6333 40.0 ! at where ? how can I put a car (or a ped) in somewhere I want ? monocle.gif

otakups
  • otakups

    Player Hater

  • Members
  • Joined: 28 Apr 2011

#254

Posted 18 May 2011 - 05:13 AM Edited by otakups, 18 May 2011 - 07:34 AM.

QUOTE (123iamking @ May 18 2011, 02:38)

I still don't understand how do you make this -1577.942 52.6333 40.0 ! at where ? how can I put a car (or a ped) in somewhere I want ?  monocle.gif

-1577.942 52.6333 40.0 are the coordinates or coords X, Y and Z respectively.

if your code is to put a car in front of your, you must get your own coordinates first with offset:
CODE
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 5.0 0.0

then use use those coords to put the car with a distance of 5.0 in front of you by replacing the
-1577.942 52.6333 40.0 with your newly created coords (1@ 2@ 3@).

if you want put the car at a specific place:
1. go in game then go to the place where you wanted the car to be placed.
2. go back to your sannybuilder, then click on Tools > IDE Tools > Coords manager.
3. those coords shows where you're standing (in game).
4. use those coords in placing your car.

you can only use the code 00AB: put_car 22@ at $float_X $float_Y $float_Z if the car is defined which is held by the 22@ variable, in this example.

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#255

Posted 18 May 2011 - 03:17 PM Edited by ZAZ, 18 May 2011 - 03:23 PM.

QUOTE (123iamking @ May 18 2011, 02:38)
QUOTE (ZAZ @ May 17 2011, 16:58)

This code by decompiling with writing opcodes
00AB: put_car 22@ at -1577.942 52.6333 40.0

will by shown by decompiling with without opcodes in this kind:

Car.PutAt( 22@ , -1577.942, 52.6333, 40.0)


I still don't understand how do you make this -1577.942 52.6333 40.0 ! at where ? how can I put a car (or a ped) in somewhere I want ? monocle.gif

As otakups described above
and please have look to >here<, scroll down to the explanation about Coordinate_system

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#256

Posted 19 May 2011 - 01:32 AM

QUOTE (otakups @ May 18 2011, 05:13)
QUOTE (123iamking @ May 18 2011, 02:38)

I still don't understand how do you make this -1577.942 52.6333 40.0 ! at where ? how can I put a car (or a ped) in somewhere I want ?  monocle.gif

-1577.942 52.6333 40.0 are the coordinates or coords X, Y and Z respectively.

if your code is to put a car in front of your, you must get your own coordinates first with offset:
CODE
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 5.0 0.0

then use use those coords to put the car with a distance of 5.0 in front of you by replacing the
-1577.942 52.6333 40.0 with your newly created coords (1@ 2@ 3@).

if you want put the car at a specific place:
1. go in game then go to the place where you wanted the car to be placed.
2. go back to your sannybuilder, then click on Tools > IDE Tools > Coords manager.
3. those coords shows where you're standing (in game).
4. use those coords in placing your car.

you can only use the code 00AB: put_car 22@ at $float_X $float_Y $float_Z if the car is defined which is held by the 22@ variable, in this example.

thank you very much ! inlove.gif inlove.gif

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#257

Posted 19 May 2011 - 01:35 AM

Can we make Mexican gang (vla1 ,vla2 ,vla3) respect us ? inlove.gif devil.gif

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#258

Posted 19 May 2011 - 08:20 AM

QUOTE (123iamking @ May 19 2011, 01:35)
Can we make Mexican gang (vla1 ,vla2 ,vla3) respect us ? inlove.gif devil.gif

Obviously no. It's possible with cops or ballas, even while gangwar, or with San Fiero Rifa, Da Nang Boys as well as Los Santos Vagos
but it won't work with vla1 ,vla2 ,vla3

otakups
  • otakups

    Player Hater

  • Members
  • Joined: 28 Apr 2011

#259

Posted 20 May 2011 - 11:36 AM

i got this on my code:
CODE

:land_standing
00D6: if
0611:   actor $PLAYER_ACTOR performing_animation "FALL_COLLAPSE"
004D: jump_if_false @land_standing

0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_LAND" IFP_file "IFP" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB

the plan is to make CJ do the normal landing instead of him collapsing after jumping from a high place.

how do i force CJ to do the FALL_LAND animation instead of the FALL_COLLAPSE?
and in 0812:, what's the 4.0 and the time -1 for?

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#260

Posted 20 May 2011 - 12:05 PM

QUOTE (otakups @ May 20 2011, 11:36)
i got this on my code:
CODE

:land_standing
00D6: if
0611:   actor $PLAYER_ACTOR performing_animation "FALL_COLLAPSE"
004D: jump_if_false @land_standing

0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_LAND" IFP_file "IFP" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB

the plan is to make CJ do the normal landing instead of him collapsing after jumping from a high place.

how do i force CJ to do the FALL_LAND animation instead of the FALL_COLLAPSE?
and in 0812:, what's the 4.0 and the time -1 for?

4.0 is an internal sequence value of the animation
time -1 let him do the whole anim for one time
it allows also to insert a time in ms: time 250
it's more interessting if the anim has a longer duration, for example if the whole anim needs 5 seconds you can it increase to maybe 1 second: time 1000

you made a wrong entry for the ifp file

"FALL_LAND" is an animation of ifp file "ped"
so you have to write
CODE
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_LAND" IFP_file "PED" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci Racing
  • Joined: 01 Feb 2010
  • Poland

#261

Posted 20 May 2011 - 12:41 PM

ZAZ, wait is missing here aswell, game will hang in an infinite loop tounge.gif

otakups
  • otakups

    Player Hater

  • Members
  • Joined: 28 Apr 2011

#262

Posted 20 May 2011 - 02:11 PM Edited by otakups, 20 May 2011 - 02:16 PM.

QUOTE
you made a wrong entry for the ifp file

"FALL_LAND" is an animation of ifp file "ped"

so that's why it doesn't work. tounge.gif .
thanks for the info and the help with the actor catching thing. icon14.gif

QUOTE
ZAZ, wait is missing here aswell, game will hang in an infinite loop

oh yeah, let's not forget to at least 0001: wait 0 ms for every loop happy.gif or the game will do it so fast, it hurts. thanks.

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#263

Posted 28 May 2011 - 06:26 AM

I saw your King Kong mod ,ZAZ ! And I saw your Giant Monkey climb up the wall ! How can we make Cj climb up the wall ? biggrin.gif sly.gif sneaky2.gif

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#264

Posted 28 May 2011 - 07:05 AM

QUOTE (123iamking @ May 28 2011, 06:26)
I saw your King Kong mod ,ZAZ ! And I saw your Giant Monkey climb up the wall ! How can we make Cj climb up the wall ?  biggrin.gif   sly.gif   sneaky2.gif

by using the move opcode 083C:
look for the Airdance script

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#265

Posted 29 May 2011 - 02:25 AM

when I wanna affect to some ped , I use some opcode like "0321: kill_actor 0@" , "0332: set_actor 0@ bleeding 1" ,... but I wanna affect to all ped I see , what can I replace with 0@ ? and just a small question : how can I know the number in this opcode :"09F1: play_audio_at_actor 1@ event 1189" may perform what sound ? biggrin.gif monocle.gif

wangxiulin
  • wangxiulin

    f*ck you

  • Members
  • Joined: 02 May 2011

#266

Posted 29 May 2011 - 07:44 AM

good.verygood.

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#267

Posted 29 May 2011 - 08:35 AM

How can I turn people into object ? monocle.gif lol.gif biggrin.gif

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#268

Posted 29 May 2011 - 12:28 PM

QUOTE (123iamking @ May 29 2011, 02:25)
when I wanna affect to some ped , I use some opcode like "0321: kill_actor 0@" , "0332: set_actor 0@ bleeding 1" ,... but I wanna affect to all ped I see , what can I replace with 0@ ?

CODE
04C4: create_coordinate 25@ 26@ 28@ from_actor 0@ offset 0.0 0.0  1.2
095C: 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


QUOTE
and just a small question : how can I know the number in this opcode :"09F1: play_audio_at_actor 1@ event 1189" may perform what sound ?  biggrin.gif    monocle.gif

write a soundcheck script and look into data\AudioEvents.txt
CODE
{$CLEO .cs}
:Audio_Test
03A4: name_thread "AUDIOTS"
0006: 0@ =  1002    // integer values


:Audiotest_01
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Audiotest_01
03F0: text_draw_toggle  1
045A: text_draw_1number  100.0  40.0 'NUMBER' 0@    // value
if  
80DF:   NOT   actor $PLAYER_ACTOR driving
004D: jump_if_false @Audiotest_01
if  and
33@ > 1000
0AB0:   key_pressed 8//  Backspace
004D: jump_if_false @Audiotest_03
33@ = 0
04C4: create_coordinate 11@ 12@ 13@ from_actor $PLAYER_ACTOR offset 0.0 0.0  1.0


///////////////////////////////////////////
//097A: play_audio_at 11@ 12@ 13@ event 0@
////////////////////////////////////////////
//09F1: play_audio_at_actor $PLAYER_ACTOR event 0@
////////////////////////////////////////////
018C: play_sound  0@ at  11@ 12@ 13@

:Audiotest_03
if and
1191 > 0@
0AB0:   key_pressed 107//  add key
004D: jump_if_false @Audiotest_05
0@ +=  1  // integer values
wait 250
0002: jump @Audiotest_01


:Audiotest_05
if and
0@ > 1002
0AB0:   key_pressed 109//  subtract key
004D: jump_if_false @Audiotest_01
0@ -=  1  // integer values
wait 250
0002: jump @Audiotest_01




QUOTE
How can I turn people into object ?

actors are actors (charackter models with skeletton)
objects are objects(can be a very simple model like a pyramid with minmum 8 faces)
do you wanna replace a ped with an object?
so get coords of ped, destroy the ped and place object at coords

or do you wanna attach an object to ped?
just use attach object to actor opcode
object will also be unvisible if actor is unvisible
you could also attach actor to object and make actor unvisible then the object will still be visible

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#269

Posted 29 May 2011 - 01:48 PM

thank you , ZAZ inlove.gif

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011

#270

Posted 30 May 2011 - 03:49 AM

QUOTE (ZAZ @ May 29 2011, 12:28)

CODE
04C4: create_coordinate 25@ 26@ 28@ from_actor 0@ offset 0.0 0.0  1.2
095C: 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



I still don't get it dontgetit.gif ! Can you make a example , a scrip can make all ped dead (like blow up all car cheat ) biggrin.gif plz




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users