Hayate Kankichi Posted April 7, 2017 Share Posted April 7, 2017 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? Link to comment Share on other sites More sharing options...
ZAZ Posted April 8, 2017 Author Share Posted April 8, 2017 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 doneobject 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: [email protected] = create_object #PARACHUTE at $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD 069B: attach_object [email protected] to_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 0750: set_object [email protected] visibility 0 Second method: opcode 070A: attach object to bone, like smoking cigar 070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 -0.5 on_bone 6 1 perform_animation "NULL" IFP_file "NULL" time 999999If 2 objects should be attached, then use 070A: for first object and 09A0: for second object 070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 -0.5 on_bone 6 1 perform_animation "NULL" IFP_file "NULL" time 99999909A0: actor $PLAYER_ACTOR attach_object [email protected] 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 Hayate Kankichi 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
deltaCJ Posted April 13, 2017 Share Posted April 13, 2017 (edited) 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? Edited April 13, 2017 by deltaCJ Link to comment Share on other sites More sharing options...
Omega_Is_Here Posted May 22, 2017 Share Posted May 22, 2017 (edited) 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 [email protected] 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_10001: 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 [email protected] closest_ped_to [email protected] 0001: wait 0 ms 00D6: if 8039: not [email protected] == -1 004D: jump_if_false @SMOKE_1 00D6: if or02F2: actor [email protected] model == #BMYDRUG 02F2: actor [email protected] model == #WMYDRUG 02F2: actor [email protected] model == #HMYDRUG 02F2: actor [email protected] model == #BIKDRUG 004D: jump_if_false @SMOKE_10001: wait 0 ms00D6: if00F2: actor [email protected] near_actor $PLAYER_ACTOR radius 1.5 1.5 sphere 0004D: jump_if_false @SMOKE_10001: wait 0 ms 00D6: if 0AB0: key_pressed 69 004D: jump_if_false @SMOKE_10002: jump @SMOKE_2 :SMOKE_204ED: load_animation "GANGS"04ED: load_animation "DEALER" 04ED: load_animation "SMOKING"0247: load_model 1212038B: load_requested_models0001: wait 0 ms 00D6: if 04EE: animation "GANGS" loaded 004D: jump_if_false @SMOKE_20001: 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 [email protected] tilt 0.0 switchstyle 201B9: set_actor $PLAYER_ACTOR armed_weapon_to 003BF: set_player $PLAYER_CHAR ignored_by_everyone 1029B: [email protected] = init_object 1212 at 0.0 0.0 0.00382: set_object [email protected] 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 45000001: wait 500 ms070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.03 0.030 0.02 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 00001: wait 4000 ms0108: destroy_object [email protected] 0249: release_model 12120647: AS_actor [email protected] clear_look_task0109: player $PLAYER_CHAR money = -2005C1: AS_actor [email protected] speak_from_audio_table 84 0812: AS_actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 32000812: AS_actor $PLAYER_ACTOR perform_animation "DRUGS_BUY" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 32000001: wait 3200 ms0687: clear_actor [email protected] task02EB: restore_camera_with_jumpcut Edited May 22, 2017 by BiPolarBear Link to comment Share on other sites More sharing options...
ZAZ Posted May 23, 2017 Author Share Posted May 23, 2017 your script is uncomplete CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
skatefilter5 Posted June 12, 2017 Share Posted June 12, 2017 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):TESTwait 0if and Player.Defined($PLAYER_CHAR)0ADC: test_cheat "walk"jf @TEST00A1: put_actor $PLAYER_ACTOR at -2655.6997 163.9048 4.3281[email protected] = Actor.Create(Gang1, #swmotr2, -2662.04, 164.9193, 4.3281)Actor.Angle($PLAYER_ACTOR) = 82.9693Actor.Angle([email protected]) = 82.9693060F: set_actor [email protected] melee_accuracy_to 100.00817: assign_actor [email protected] to_animation_path_with_walk_mode 3 route_mode 2 //Run Mode07CD: AS_actor [email protected] walk_to -2697.2449 165.4548 4.3281 stop_with_angle 90.9 within_radius 1.0wait 500007CD: AS_actor [email protected] walk_to -2698.2651 197.7581 4.3281 stop_with_angle 359.6 within_radius 1.0end_thread Link to comment Share on other sites More sharing options...
deltaCJ Posted June 13, 2017 Share Posted June 13, 2017 use AS_pack Link to comment Share on other sites More sharing options...
Steak1337 Posted June 14, 2017 Share Posted June 14, 2017 Hey, i want to make a mod like when i write something like /myname, to show in chat my name without writing my ID Link to comment Share on other sites More sharing options...
deltaCJ Posted June 14, 2017 Share Posted June 14, 2017 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? Link to comment Share on other sites More sharing options...
Steak1337 Posted June 14, 2017 Share Posted June 14, 2017 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 Link to comment Share on other sites More sharing options...
Grinch_ Posted June 30, 2017 Share Posted June 30, 2017 well i want to display a text right after the game starts.So how should i arranhe the script.Which opcodes should i use Link to comment Share on other sites More sharing options...
ZAZ Posted June 30, 2017 Author Share Posted June 30, 2017 (edited) There're several different methods to display text use opcode search tool and search for text -textbox (shows help and infos) -styled text (shows mission titel) -text high priority (shows instructions) -text draw(can show everything in different style, different size, positions, assignement, color) Edited June 30, 2017 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
NCHK Posted August 28, 2017 Share Posted August 28, 2017 Is there anyway to lauch exe files using cleo script in gta sa ? Link to comment Share on other sites More sharing options...
Arya_Eto Posted November 13, 2017 Share Posted November 13, 2017 Awesome Tutorial Zaz i need some help with coding. Issue/Problem: i want to check if player is near to a pickup and when he is near to certain distance from pickup, then pickups appear. when he goes away to certain distance then pickups should be released from memory. Reason: i want to do this because i added several pickups and then saved game. now i am not able to get normal in-game pickups like certain savegame disk pickup, weapon pickup on killing cops etc because maybe pickups limit is reached. i removed the script from cleo but still my pickups were visible instead of disappearing. so i read upon it and got info that pickups and in game car generators will be saved with savegame and then it will be duplicated with every game load. so basically first requirement is, i want to free up my pickups from my savegame, once this issue is solved then i want to make them appear when player is nearby to pickups and once he picks up and goes to certain distance then pickups should be released. i googled alot, went through sanny help content but didnt get any opcode to check if player is near a pickup. so please help me with this, i just started coding in cleo. like 3 days. Link to comment Share on other sites More sharing options...
deltaCJ Posted November 14, 2017 Share Posted November 14, 2017 I'm not ZAZ but maybe you shouldn't be doing such complex codes. Start simple. You need to practice for a while. Link to comment Share on other sites More sharing options...
Arya_Eto Posted November 14, 2017 Share Posted November 14, 2017 I'm not ZAZ but maybe you shouldn't be doing such complex codes. Start simple. You need to practice for a while. Since i posted my question under Zaz's tutorial, that's why referred him bro. Totally agree with you Delta and that's how i am going to proceed bro. i am going through Zaz's cleo tutorial now and parallelly writing small scripts to practice and for that reason i thought to play with above code. but in meantime i am really very curious to know the solution for my issue that how can we check if player is near a pickup because opcode for player near car or object is available but i didnt find any opcode which checks if player near pickup. deltaCJ 1 Link to comment Share on other sites More sharing options...
GuruGuru Posted November 14, 2017 Share Posted November 14, 2017 >Get player coords >Get pickup coords >Get distance between these two >If distance <= desired radius aka Player is near Pickup >>Do stuff deltaCJ, RyanDri3957V and Arya_Eto 3 Link to comment Share on other sites More sharing options...
ZAZ Posted November 15, 2017 Author Share Posted November 15, 2017 i want to do this because i added several pickups and then saved game. now i am not able to get normal in-game pickups like certain savegame disk pickup, weapon pickup on killing cops etc because maybe pickups limit is reached. i removed the script from cleo but still my pickups were visible instead of disappearing. so i read upon it and got info that pickups and in game car generators will be saved with savegame and then it will be duplicated with every game load. so basically first requirement is, i want to free up my pickups from my savegame, once this issue is solved then i want to make them appear when player is nearby to pickups and once he picks up and goes to certain distance then pickups should be released. No chance, you only can edit the savegame, ask OrionSR My advice: delete your corrupted savegame And for the future: don't install script mods and play story line and make savegames Maybe only 2 or 3 simple and good cleo scripts like this Teleport to marker and this carspawner Then use your favorite savegame to play script mods, but avoid savegames Arya_Eto 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Arya_Eto Posted November 16, 2017 Share Posted November 16, 2017 i want to do this because i added several pickups and then saved game. now i am not able to get normal in-game pickups like certain savegame disk pickup, weapon pickup on killing cops etc because maybe pickups limit is reached. i removed the script from cleo but still my pickups were visible instead of disappearing. so i read upon it and got info that pickups and in game car generators will be saved with savegame and then it will be duplicated with every game load. so basically first requirement is, i want to free up my pickups from my savegame, once this issue is solved then i want to make them appear when player is nearby to pickups and once he picks up and goes to certain distance then pickups should be released. No chance, you only can edit the savegame, ask OrionSR My advice: delete your corrupted savegame And for the future: don't install script mods and play story line and make savegames Maybe only 2 or 3 simple and good cleo scripts like this Teleport to marker and this carspawner Then use your favorite savegame to play script mods, but avoid savegames True Zaz...i understood after messing around that we shouldnt install too many scripts. instead should stick to few useful mods. man i am never going to make a savegame again if i have any script mod [specially written by me ] Thanks for advice, needed this. >Get player coords >Get pickup coords >Get distance between these two >If distance <= desired radius aka Player is near Pickup >>Do stuff Thanks bro ... will try it right away. Link to comment Share on other sites More sharing options...
KCAO Posted November 17, 2017 Share Posted November 17, 2017 (edited) Yo, could anyone lend a hand here? Trying to further modify zaz's girlxxx mod. I've been trying to include the transition animations between sex positions instead of having them zip into each one. However, every time I edit the script, I either cause the entire animation to freeze or the mini-game stops working. I tried editing the jumptable for those animations because I thought it was causing the animations to be skipped. Here's the part of the original script, without any edits: :GFXXXA_10009 if [email protected] == 6 else_jump @GFXXXA_10354 [email protected] += 1 0871: init_jump_table [email protected] total_jumps 3 default_jump 0 @GFXXXA_10347 jumps 1 @GFXXXA_10097 2 @GFXXXA_10178 3 @GFXXXA_10259 -1 @GFXXXA_10347 -1 @GFXXXA_10347 -1 @GFXXXA_10347 -1 @GFXXXA_10347 :GFXXXA_10097 0812: AS_actor [email protected] perform_animation "SEX_1TO2_W" IFP "SEX" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 0 // versionB 0812: AS_actor $PLAYER_ACTOR perform_animation "SEX_1TO2_P" IFP "SEX" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 0 // versionB jump @GFXXXA_10347 :GFXXXA_10178 0812: AS_actor [email protected] perform_animation "SEX_2TO3_W" IFP "SEX" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 0 // versionB 0812: AS_actor $PLAYER_ACTOR perform_animation "SEX_2TO3_P" IFP "SEX" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 0 // versionB jump @GFXXXA_10347 :GFXXXA_10259 [email protected] = 0 0812: AS_actor [email protected] perform_animation "SEX_3TO1_W" IFP "SEX" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 0 // versionB 0812: AS_actor $PLAYER_ACTOR perform_animation "SEX_3TO1_P" IFP "SEX" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 0 // versionB jump @GFXXXA_10347 :GFXXXA_10347 [email protected] = 1 :GFXXXA_10354 return Edited November 17, 2017 by KCAO Link to comment Share on other sites More sharing options...
deltaCJ Posted November 17, 2017 Share Posted November 17, 2017 Why do you have the animations time to be 0? Put it to -1 Link to comment Share on other sites More sharing options...
KCAO Posted November 17, 2017 Share Posted November 17, 2017 (edited) Why do you have the animations time to be 0? Put it to -1 That's how I found the file. There are more instances of it being that way in the script. Anyway I'll give that a shot and report back. Edit: Tried it, and changing the value from 0 to -1 doesn't affect the animation. Unless there's a step after that I'm missing, I still believe it has to do with the jumptable Edited November 17, 2017 by KCAO Link to comment Share on other sites More sharing options...
deltaCJ Posted November 18, 2017 Share Posted November 18, 2017 Send the full script Link to comment Share on other sites More sharing options...
KCAO Posted November 18, 2017 Share Posted November 18, 2017 The full script is pretty long. Here's the pastebin for it:https://pastebin.com/9UKb4Q7zI focused on the parts of the script that had the transition animations in it (i.e., 'sex_1to2_w', 'sex_1to2_p', sex_2to3_p, etc.)But perhaps I'm looking at it the wrong way. Thanks for the help! Link to comment Share on other sites More sharing options...
deltaCJ Posted November 18, 2017 Share Posted November 18, 2017 It looks like the animations are set to 1.0 second then it switches, try making it so when the animation time is 2.0 seconds go to the cleo file and press ctrl + f and search: 1TO2 and you should find it. But it's better off you wait for ZAZ as it's his own mod Link to comment Share on other sites More sharing options...
KCAO Posted November 18, 2017 Share Posted November 18, 2017 Just tried that too, and it also didn't change anything. Can't help but feel like I'm missing something. Anyway, thanks for trying! Yeah, Zaz can probably give us more insight Link to comment Share on other sites More sharing options...
ZAZ Posted November 21, 2017 Author Share Posted November 21, 2017 I've been trying to include the transition animations between sex positions instead of having them zip into each one. But it already works with transition animations and what means zip into each one? Also, enable frame limiter to watch it in a propper way I focused on the parts of the script that had the transition animations in it (i.e., 'sex_1to2_w', 'sex_1to2_p', sex_2to3_p, etc.) But perhaps I'm looking at it the wrong way. There're 3 positions in the script that have these codes, because the complete animation algorithm is available 3 times, for 3 different situations CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
KCAO Posted November 22, 2017 Share Posted November 22, 2017 But it already works with transition animations and what means zip into each one? Also, enable frame limiter to watch it in a propper way Just tot be clear here, the mini-game animations, which are SEX_1_P, SEX_2_P, etc. are all working perfectly. The animations that I am referring to are the ones which are supposed to play when you press 'shift'. You are right in that there are supposed to be 3 transition animations, but they do not play. Instead, the models snap into the next position of the mini-game when you press the shift key. The animation files are present in the game and in your script. My question is how to access them. Link to comment Share on other sites More sharing options...
ZAZ Posted November 22, 2017 Author Share Posted November 22, 2017 You are right in that there are supposed to be 3 transition animations, but they do not play. Yes they do. But they're very short and quick. For the player_actor you can't really see a change. For the girl you can see that arms and legs rotate quick, from doggy to missionary pose and also from the other front pose to doggy pose CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
KCAO Posted November 22, 2017 Share Posted November 22, 2017 Yes they do. But they're very short and quick. For the player_actor you can't really see a change. For the girl you can see that arms and legs rotate quick, from doggy to missionary pose and also from the other front pose to doggy pose See that's exactly what I'm referring to. There is actually an animation that should take about 1-1.5 seconds when switching positions. This should be in there IN PLACE of the quick rotation animation. If you look into the sex.ifp file, you will see that these animations exist under: SEX_1TO2_P SEX_1TO2_W SEX_2TO3_P SEX_2TO3_W SEX_3TO1_P SEX_3TO1_W These are the animations I'm looking to replace that short and quick transition. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now