melao Posted August 31, 2009 Share Posted August 31, 2009 Hi Zaz Can you help me in 1 thing? I use this Mod and I wanted to change a few things like adding a gear display and changing to another texture if player is in a certain vehicle. Can you help me, sice you created the speedometer mod? Link to comment Share on other sites More sharing options...
ZAZ Posted August 31, 2009 Share Posted August 31, 2009 Hi Zaz Can you help me in 1 thing? I use this Mod and I wanted to change a few things like adding a gear display and changing to another texture if player is in a certain vehicle. Can you help me, sice you created the speedometer mod? I'm not very motivated to work again on that mod but I can show you how to display the gears. CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
melao Posted August 31, 2009 Author Share Posted August 31, 2009 I'm not very motivated to work again on that mod but I can show you how to display the gears. Ok The gears is a good thing the texture I'll go try by myself. Link to comment Share on other sites More sharing options...
ZAZ Posted August 31, 2009 Share Posted August 31, 2009 (edited) I'm not very motivated to work again on that mod but I can show you how to display the gears. Ok The gears is a good thing the texture I'll go try by myself. Here's a simple script to show the gear. Its an extraction of this speedometer In the script below I used the textur of the original LD_DUAL.txd {$CLEO .cs}:Gearshow_1 03A4: name_thread "GEARSH":Gearshow_20001: wait 0 ms 00D6: if and00DF: actor $PLAYER_ACTOR driving 84A7: not actor $PLAYER_ACTOR driving_boat 004D: jump_if_false @Gearshow_2 0811: [email protected] = actor $PLAYER_ACTOR car // versionC 0390: load_txd_dictionary "LD_DUAL"038F: load_texture "Health" as 17 // Load dictionary with 0390 first038F: load_texture "power" as 18 // Load dictionary with 0390 first0001: wait 1000 ms 0002: jump @Gearshow_3 :Gearshow_30001: wait 0 ms if00DF: actor $PLAYER_ACTOR driving 004D: jump_if_false @Gearshow_230AB8: get_vehicle [email protected] current_gear_to [email protected] 02E3: [email protected] = car [email protected] speed 0013: [email protected] *= 1.2 000B: [email protected] += 40.0 // floating-point values00D6: if 0 0021: [email protected] > 41.0 // floating-point values 004D: jump_if_false @Gearshow_703F0: enable_text_draw 1074B: draw_texture 17 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 2550340: set_text_draw_color 0 0 0 0033F: set_text_draw_letter_width_height 0.6 2.5045A: text_draw_1number 537.0 415.0 'NUMBER' [email protected]// value0002: jump @Gearshow_8:Gearshow_7074B: draw_texture 18 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 255:Gearshow_8 0002: jump @Gearshow_3:Gearshow_230001: wait 0 ms 03F0: enable_text_draw 0 0391: release_txd_dictionary0002: jump @Gearshow_2 Edited August 31, 2009 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
melao Posted August 31, 2009 Author Share Posted August 31, 2009 Thx Zaz Here, have a cookie Link to comment Share on other sites More sharing options...
ZAZ Posted August 31, 2009 Share Posted August 31, 2009 Thx Zaz Here, have a cookie wait, I saw that the script still include the speedometer calculation instead 02E3: [email protected] = car [email protected] speed 0013: [email protected] *= 1.2 000B: [email protected] += 40.0 // floating-point values 00D6: if 0 0021: [email protected] > 41.0 // floating-point values 004D: jump_if_false @Gearshow_7 it needs only this: 02E3: [email protected] = car [email protected] speed if0021: [email protected] > 1.0 // floating-point values 004D: jump_if_false @Gearshow_7 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
melao Posted August 31, 2009 Author Share Posted August 31, 2009 it's possible to replace the number text with a image of that number? Link to comment Share on other sites More sharing options...
ZAZ Posted September 1, 2009 Share Posted September 1, 2009 it's possible to replace the number text with a image of that number? yes, but you must find or make your own textures I used the textures of LD_Dual as dummies {$CLEO .cs}:Gearshow_1 03A4: name_thread "GEARSH":Gearshow_20001: wait 0 ms 00D6: if and00DF: actor $PLAYER_ACTOR driving 84A7: not actor $PLAYER_ACTOR driving_boat 004D: jump_if_false @Gearshow_2 0811: [email protected] = actor $PLAYER_ACTOR car // versionC 0390: load_txd_dictionary "LD_DUAL"038F: load_texture "rockshp" as 12 // Load dictionary with 0390 first038F: load_texture "ex1" as 13 // Load dictionary with 0390 first038F: load_texture "ex2" as 14 // Load dictionary with 0390 first038F: load_texture "ex4" as 15 // Load dictionary with 0390 first038F: load_texture "light" as 16 // Load dictionary with 0390 first038F: load_texture "Health" as 17 // Load dictionary with 0390 first038F: load_texture "power" as 18 // Load dictionary with 0390 first0001: wait 1000 ms 0002: jump @Gearshow_3 :Gearshow_30001: wait 0 ms if00DF: actor $PLAYER_ACTOR driving 004D: jump_if_false @Gearshow_230AB8: get_vehicle [email protected] current_gear_to [email protected] 02E3: [email protected] = car [email protected] speed 00D6: if 0 0021: [email protected] > 1.0 // floating-point values 004D: jump_if_false @[email protected] == 0jf @Gearshow_403F0: enable_text_draw 1074B: draw_texture 17 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 255jump @Gearshow_3:[email protected] == 1jf @Gearshow_503F0: enable_text_draw 1074B: draw_texture 16 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 255jump @Gearshow_3:[email protected] == 2jf @Gearshow_603F0: enable_text_draw 1074B: draw_texture 15 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 255jump @Gearshow_3:[email protected] == 3jf @Gearshow_703F0: enable_text_draw 1074B: draw_texture 14 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 255jump @Gearshow_3:[email protected] == 4jf @Gearshow_803F0: enable_text_draw 1074B: draw_texture 13 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 255jump @Gearshow_3:[email protected] == 5jf @Gearshow_303F0: enable_text_draw 1074B: draw_texture 12 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 255jump @Gearshow_3:Gearshow_903F0: enable_text_draw 1074B: draw_texture 18 position 545.0 429.0 scale 15.5 15.5 angle 0.0 color_RGBA 255 255 255 255 0002: jump @Gearshow_3:Gearshow_230001: wait 0 ms 03F0: enable_text_draw 0 0391: release_txd_dictionary0002: jump @Gearshow_2 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
melao Posted September 1, 2009 Author Share Posted September 1, 2009 Thx ZAZ you own. Here, have a cookie 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