Quantcast

Jump to content

» «
Photo

[SA] ~ CLEO Script Tutorial ~

910 replies to this topic
ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#901

Posted 26 March 2017 - 12:40 PM

I Got a question: How to do I Coding of a CLEO Mission for Liberty City Stories PC edition (GTA San Andreas Mods) by using a Sanny Builder through?

in same way as described here
Because it's a total convertion, make shure that the main.scm contain this code
0180: set_on_mission_flag_to $ONMISSION
and take care by using objects, because the map system has changed, object id's can now be different

Hayate Kankichi
  • Hayate Kankichi

    Player Hater

  • Members
  • Joined: 31 Jul 2015
  • India

#902

Posted 07 April 2017 - 02:47 AM

Hey guys, I want to make another script. but Don't know professonal. so I need help in making object attach to Player. like War Machine have Minigun on it's shoulder, so please tell me how I can mount any object or model to player?


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#903

Posted 08 April 2017 - 12:11 PM

Hey guys, I want to make another script. but Don't know professonal. so I need help in making object attach to Player. like War Machine have Minigun on it's shoulder, so please tell me how I can mount any object or model to player?

First method: opcode 069B: attach object with offset to actor model center like parachute is done
object keeps position, while actor makes animation
0247: load_model #PARACHUTE 

:PLCHUTE_274 
00D6: if 
0248:   model #PARACHUTE available 
004D: jump_if_false @PLCHUTE_377 
0107: 17@ = create_object #PARACHUTE at $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD 
069B: attach_object 17@ to_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 
0750: set_object 17@ visibility 0

Second method: opcode 070A: attach object to bone, like smoking cigar
 
070A: AS_actor $PLAYER_ACTOR attach_to_object 15@ offset 0.0 0.0 -0.5 on_bone 6 1 perform_animation "NULL" IFP_file "NULL" time 999999
If 2 objects should be attached, then use 070A: for first object and 09A0: for second object
 
070A: AS_actor $PLAYER_ACTOR attach_to_object 15@ offset 0.0 0.0 -0.5 on_bone 6 1 perform_animation "NULL" IFP_file "NULL" time 999999
09A0: actor $PLAYER_ACTOR attach_object 16@ with_offset 0.0 0.0 -0.5 on_bone 5 1 perform_animation "NULL" IFP_file "NULL" time 999999

Bones ID list

Crashes the Game = 0
Chest = 1
Neck = 2
Left Shoulder = 3
Right Shoulder = 4
Left Hand = 5
Right Hand = 6
Root = 7
- = 8
Left Foot = 9
Right Foot = 10
Right Knee = 11
- = 12
Left Elbow = 13
Right Elbow = 14
Left Clavicle = 15
Right Clavicle = 16
Back of Neck = 17
Mouth or Chin = 18
Crashes the Game = 19

deltaCJ
  • deltaCJ

    BUSTED!

  • Members
  • Joined: 27 Dec 2013
  • None

#904

Posted 13 April 2017 - 03:34 AM Edited by deltaCJ, 13 April 2017 - 03:36 AM.

How can I play music during a mission?

 

I want to make it play during a car chase.

 

EDIT: Also, how would I make a cutscene where the car flips over and explodes?


BiPolarBear
  • BiPolarBear

    Nature's Finest

  • Members
  • Joined: 13 Jan 2013
  • Unknown

#905

Posted 22 May 2017 - 07:18 AM Edited by BiPolarBear, 22 May 2017 - 07:19 AM.

ZAZ, Please can you could help me out :) ?
I am on the verge to finish my mod but i  am facing 2 big problems :-/
1-Actor 10@ is NOT performing his animations (DEALER_DEAL)
2-How do i disable what usually happens if i press Y? How do i make cj NOT tell the dealer to go away if i press y, and make my mod instead to take place?
:SMOKE_1
0001: wait 0 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @SMOKE_1 
0001: wait 0 ms 
00D6: if 
80DF:   not actor $PLAYER_ACTOR driving 
004D: jump_if_false @SMOKE_1 
0001: wait 0 ms  
00D6: if 
03EE:   player $PLAYER_CHAR controllable 
004D: jump_if_false @SMOKE_1 
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 11@ closest_ped_to 10@ 
0001: wait 0 ms 
00D6: if 
8039:   not  10@ == -1 
004D: jump_if_false @SMOKE_1 
00D6: if or
02F2:   actor 10@ model == #BMYDRUG 
02F2:   actor 10@ model == #WMYDRUG 
02F2:   actor 10@ model == #HMYDRUG 
02F2:   actor 10@ model == #BIKDRUG 
004D: jump_if_false @SMOKE_1
0001: wait 0 ms
00D6: if
00F2:   actor 10@ near_actor $PLAYER_ACTOR radius 1.5 1.5 sphere 0
004D: jump_if_false @SMOKE_1
0001: wait 0 ms 
00D6: if 
0AB0:   key_pressed 69 
004D: jump_if_false @SMOKE_1
0002: jump @SMOKE_2 

:SMOKE_2
04ED: load_animation "GANGS"
04ED: load_animation "DEALER" 
04ED: load_animation  "SMOKING"
0247: load_model 1212
038B: load_requested_models
0001: wait 0 ms 
00D6: if 
04EE:   animation "GANGS" loaded 
004D: jump_if_false @SMOKE_2
0001: wait 0 ms 
00D6: if 
04EE:   animation "DEALER" loaded 
004D: jump_if_false @SMOKE_2 
067E: put_camera_on_actor $PLAYER_ACTOR offset 0.5 -1.0 1.1 target_actor 10@ tilt 0.0 switchstyle 2
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1
029B: 9@ = init_object 1212 at 0.0 0.0 0.0
0382: set_object 9@ collision_detection 0 
05C1: AS_actor $PLAYER_ACTOR speak_from_audio_table 194 
0812: AS_actor $PLAYER_ACTOR perform_animation "SHOP_PAY" IFP "DEALER" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 4500
0001: wait 500 ms
070A: AS_actor $PLAYER_ACTOR attach_to_object 9@ offset 0.03 0.030 0.02 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 0
0001: wait 4000 ms
0108: destroy_object 9@ 
0249: release_model 1212
0647: AS_actor 10@ clear_look_task
0109: player $PLAYER_CHAR money = -20
05C1: AS_actor 10@ speak_from_audio_table 84 
0812: AS_actor 10@ perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 3200
0812: AS_actor $PLAYER_ACTOR perform_animation "DRUGS_BUY" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 3200
0001: wait 3200 ms
0687: clear_actor 10@ task
02EB: restore_camera_with_jumpcut

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#906

Posted 23 May 2017 - 02:48 AM

your script is uncomplete


skatefilter5
  • skatefilter5

    It's all about things to do in any games

  • Members
  • Joined: 30 Apr 2016
  • Canada

#907

Posted 2 weeks ago

I was testing to make a ped route to follow the path by walking into the short-cut but he skips the first route, I can't find loop to route or walk to the next route.

 

So I have this test script

{$CLEO .cs}

Model.Load(#swmotr2)

:TEST
wait 0
if and
   Player.Defined($PLAYER_CHAR)
0ADC:   test_cheat "walk"

jf @TEST
00A1: put_actor $PLAYER_ACTOR at -2655.6997 163.9048 4.3281
1@ = Actor.Create(Gang1, #swmotr2, -2662.04, 164.9193, 4.3281)
Actor.Angle($PLAYER_ACTOR) = 82.9693
Actor.Angle(1@) = 82.9693
060F: set_actor 1@ melee_accuracy_to 100.0
0817: assign_actor 1@ to_animation_path_with_walk_mode 3 route_mode 2 //Run Mode

07CD: AS_actor 1@ walk_to -2697.2449 165.4548 4.3281 stop_with_angle 90.9 within_radius 1.0
wait 5000
07CD: AS_actor 1@ walk_to -2698.2651 197.7581 4.3281 stop_with_angle 359.6 within_radius 1.0




end_thread
 


deltaCJ
  • deltaCJ

    BUSTED!

  • Members
  • Joined: 27 Dec 2013
  • None

#908

Posted 2 weeks ago

use AS_pack 


Steak1337
  • Steak1337

    Player Hater

  • Members
  • Joined: A week ago
  • None

#909

Posted A week ago

Hey, i want to make a mod like when i write something like /myname, to show in chat my name without writing my ID


deltaCJ
  • deltaCJ

    BUSTED!

  • Members
  • Joined: 27 Dec 2013
  • None

#910

Posted A week ago

Hey, i want to make a mod like when i write something like /myname, to show in chat my name without writing my ID

 

For SAMP is my guess?


Steak1337
  • Steak1337

    Player Hater

  • Members
  • Joined: A week ago
  • None

#911

Posted A week ago

 

Hey, i want to make a mod like when i write something like /myname, to show in chat my name without writing my ID

 

For SAMP is my guess?

 

Yes





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users