BiieL Posted November 4, 2010 Share Posted November 4, 2010 (edited) Hi men, i'm new my english sucks too, i have "made" a smoke code, to when i press a Key create smoke in player, but i'm never did a cleo script but i Script PAWN, so if anyone can help me to do the "Turn on and turn off" on this smoke mod: // This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'SINE' [email protected] = 0.0 :SINE_21wait 0 if Player.Defined($PLAYER_CHAR)else_jump @SINE_21 if 0AB0: key_pressed 32 else_jump @SINE_21 02F6: [email protected] = cosine [email protected] // (float) [email protected] *= 0.0 02F7: [email protected] = sine [email protected] // (float) [email protected] *= 0.0 [email protected] *= -2.0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset [email protected] [email protected] 0.2 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 0.1 0.6 0.0 1.0 size 0.2 last_factor 0.5 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 0.0 0.0 0.9 1.0 size 0.1 last_factor 0.2 [email protected] += 0.0 if [email protected] > 354.0 else_jump @SINE_21 [email protected] = 0.0 jump @SINE_21 now with this script, when the player press Space create a smoke in the ass, i wanna with a key turn on and turn off, and if possible put the smoke on the foot (right or left, or two) if anyone script cleo and Pawn explain to me like Pawn scripts Thanks EDIT: here the preview Edited November 4, 2010 by BiieL Link to comment Share on other sites More sharing options...
BnB Posted November 4, 2010 Share Posted November 4, 2010 02F6: [email protected] = cosine [email protected] // (float)[email protected] *= 0.002F7: [email protected] = sine [email protected] // (float)[email protected] *= [email protected] *= -2.0[...][email protected] += [email protected] > 354.0else_jump @[email protected] = 0.0 Why do you put that? 1. If you multiply a num with 0 you will get 0 2. [email protected] will never be 354.0 Link to comment Share on other sites More sharing options...
BiieL Posted November 4, 2010 Author Share Posted November 4, 2010 i have taked this code from the cleo tutorials and edited the RGBA color, so i never edited Cleo so i didn't know if i could delete this part ... Link to comment Share on other sites More sharing options...
ZAZ Posted November 4, 2010 Share Posted November 4, 2010 i have taked this code from the cleo tutorials and edited the RGBA color, so i never edited Cleo so i didn't know if i could delete this part ... yes, you deleted and changed something copy the script again from the tut CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
BiieL Posted November 4, 2010 Author Share Posted November 4, 2010 no, please, only tell me about turn on and turn off Link to comment Share on other sites More sharing options...
yair1221 Posted November 4, 2010 Share Posted November 4, 2010 maybe you can just attach the smoke particle to the actor? it will make things a bit easier...though im not sure if ALL particles can be attached to it... then you can just use 064C: make_particle [email protected] visible and 064E: stop_particle [email protected] at key press... Link to comment Share on other sites More sharing options...
BiieL Posted November 4, 2010 Author Share Posted November 4, 2010 don't worked Link to comment Share on other sites More sharing options...
Deji Posted November 5, 2010 Share Posted November 5, 2010 yair1221's post is more useless and dumb than this one. Link to comment Share on other sites More sharing options...
yair1221 Posted November 5, 2010 Share Posted November 5, 2010 hhh, is there no way to attach ANY particle to an actor? i know SOME particles are impossible to attach to an OBJECT...so maybe there are only some particles thread 'SINE' :SINE_21wait 0 if Player.Defined($PLAYER_CHAR)else_jump @SINE_21 if 0AB0: key_pressed 32 else_jump @SINE_21 wait 500repeatwait 004C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.2 -0.1 -3.0//no need for sine and cosine here, these are offset coords, not world coords... 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.2 -0.1 -3.0095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 0.1 0.6 0.0 1.0 size 0.2 last_factor 0.5 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 0.0 0.0 0.9 1.0 size 0.1 last_factor 0.2 // i didnt want to change things there, but i thought you wanted it exactly like the other...right? well just change the paremeters...until 0ab0: 32wait 1000jump @SINE_21 Link to comment Share on other sites More sharing options...
Deji Posted November 5, 2010 Share Posted November 5, 2010 There's not much relation between CLEO and PAWN, besides through SAMP... but PAWN has much less features than CLEO.. {$CLEO .cs}//-------------MAIN---------------0000::SINEwait 0 0256: player 0 defined // really, not needed.. but w/e...else_jump @SINE 0AB0: key_pressed 0x20else_jump @SINE0247: load_model 3003while 8248: not model 3003 available wait 0end0107: [email protected] = create_object 3003 at 0.0 0.0 0.00107: [email protected] = create_object 3003 at 0.0 0.0 0.0// Edit the below "offset" values, if needed.. which will change the position of the smoke from the chars foot.070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 9 16 perform_animation "NULL" IFP_file "NULL" time 1 // right foot070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 10 16 perform_animation "NULL" IFP_file "NULL" time 1 // left foot// Deji's secret "make attached object invisible" code.. shhh!077E: get_active_interior_to [email protected] 8039: not [email protected] == 1else_jump @Hide_20566: link_object [email protected] to_interior 10566: link_object [email protected] to_interior 1jump @FootSmoke0566: link_object [email protected] to_interior 20566: link_object [email protected] to_interior 2:FootSmokewhile 0AB0: key_pressed 0x20 wait 0 // increase time slightly if you need less thick smoke or something.. 01BB: store_object [email protected] position_to [email protected] [email protected] [email protected] 01BB: store_object [email protected] position_to [email protected] [email protected] [email protected] 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 0.1 0.6 0.0 1.0 size 0.2 last_factor 0.5 // left foot 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 0.0 0.0 0.9 1.0 size 0.1 last_factor 0.2 // right footend0682: detach_object [email protected] 0.0 0.0 0.0 collision_detection 00108: destroy_object [email protected] @SINE Link to comment Share on other sites More sharing options...
BiieL Posted November 7, 2010 Author Share Posted November 7, 2010 (edited) give a error so i have edited ... so it's compiled but it's need to stay pressing the key and it's creating only in right foot ... look what's now ! {$CLEO .cs}//-------------MAIN---------------0000::SINEwait 0 0256: player 0 defined // really, not needed.. but w/e...else_jump @SINE 0AB0: key_pressed 32else_jump @SINE0247: load_model 3003while 8248: not model 3003 available wait 0end0107: [email protected] = create_object 3003 at 0.0 0.0 0.00107: [email protected] = create_object 3003 at 0.0 0.0 0.0// Edit the below "offset" values, if needed.. which will change the position of the smoke from the chars foot.070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 9 16 perform_animation "NULL" IFP_file "NULL" time 1 // right foot070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 10 16 perform_animation "NULL" IFP_file "NULL" time 1 // left foot// Deji's secret "make attached object invisible" code.. shhh!077E: get_active_interior_to [email protected] 8039: not [email protected] == 1else_jump @Hide_20566: link_object [email protected] to_interior 10566: link_object [email protected] to_interior 1jump @FootSmoke0566: link_object [email protected] to_interior 20566: link_object [email protected] to_interior 2:FootSmokewhile 0AB0: key_pressed 32 wait 0 // increase time slightly if you need less thick smoke or something.. 01BB: store_object [email protected] position_to [email protected] [email protected] [email protected] 01BB: store_object [email protected] position_to [email protected] [email protected] [email protected] 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 0.1 0.6 0.0 1.0 size 0.2 last_factor 0.5 // left foot 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 0.0 0.0 0.9 1.0 size 0.1 last_factor 0.2 // right footend:Hide_20682: detach_object [email protected] 0.0 0.0 0.0 collision_detection 00108: destroy_object [email protected] @SINE i don't really like script cleo because cleo don't have "{" and "}" men, and if is it possible: Get the player anim and if anim is from parachute.ifp do that actions with turn on and turn off ... Edited November 7, 2010 by BiieL Link to comment Share on other sites More sharing options...
BiieL Posted November 14, 2010 Author Share Posted November 14, 2010 no more one ? Link to comment Share on other sites More sharing options...
BiieL Posted November 17, 2010 Author Share Posted November 17, 2010 ok, sry double post, but it's possible use RGBA and on_bone in the particles ? and whats means "flag 1" Link to comment Share on other sites More sharing options...
Deji Posted November 17, 2010 Share Posted November 17, 2010 "flag" is just another way of saying "we_dont_know_what_it_does_so_we_are_gonna_just_call_it_flag". We're trying to get rid of as many of these for the database and replace them with their proper names. RGBA doesn't work for particles. on_bone isn't directly supported, but as with the code I posted above.. you can attach an object on any bone and then attach a particle to the object. Link to comment Share on other sites More sharing options...
BiieL Posted November 22, 2010 Author Share Posted November 22, 2010 (edited) oh, this is good, but i wanna make a smoke colorful and with turn on and off i have made the smoke and on_bone, but now i wanna turn on and off because now to see the smoke it's needed press and hold a key but if you know if have any colorful, black, or blue-green particle like a smoke tell me Edited November 22, 2010 by BiieL Link to comment Share on other sites More sharing options...
Nahiyan Posted November 22, 2010 Share Posted November 22, 2010 You can adjust the RGBA for that. If you want it red then set RGBA to 255.0 0.0 0.0 255.0 RGBA stands for Red, Green, Blue, Alpha. Alpha is visibility/transparancy. If its 0 then you won't be able to see it. You can make the smoke thick by making Alpha higher. Understood? Link to comment Share on other sites More sharing options...
BiieL Posted November 23, 2010 Author Share Posted November 23, 2010 yeah, thanks to explian anythings ... 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