Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Please be aware that this is not a tutorial request forum! Use the appropriate topic for the effect.
ZAZ

[SA] ~ CLEO Script Tutorial ~

Recommended Posts

santosvagos

Hi @ZAZ , recently i read your cleo tutorial on your website to make pickup script for added weapons but it caused bug which made CJ fall from the sky after completing some missions , especially 'nike and ak ' mission when CJ got out Binco store . I really need your help .

Share this post


Link to post
Share on other sites
ZAZ
On 8/10/2019 at 2:23 PM, santosvagos said:

Hi @ZAZ , recently i read your cleo tutorial on your website to make pickup script for added weapons but it caused bug which made CJ fall from the sky after completing some missions , especially 'nike and ak ' mission when CJ got out Binco store . I really need your help .

show the script, post it here

Share this post


Link to post
Share on other sites
santosvagos
6 hours ago, ZAZ said:

show the script, post it here

Thank you for your reply . Here is the script . 
 

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
032B: [email protected] = create_weapon_pickup 12401 15 ammo 60 at 2534.151367 -1700.671021 13.382813  110.921104
032B: [email protected] = create_weapon_pickup 12402 15 ammo 60 at 2531.899170 -1694.335571 13.572453  31.333500
032B: [email protected] = create_weapon_pickup 12403 15 ammo 60 at 2516.801514 -1710.537354 13.510969  92.073944 
032B: [email protected] = create_weapon_pickup 12404 15 ammo 60 at 2513.222900 -1699.728882 13.415293  224.421219
032B: [email protected] = create_weapon_pickup 12405 15 ammo 60 at 2536.599609 -1705.414673 13.382813  89.090385
032B: [email protected] = create_weapon_pickup 12406 15 ammo 60 at 2513.323242 -1700.497559 13.414183  230.638931
032B: [email protected] = create_weapon_pickup 12407 15 ammo 60 at 2522.737061 -1632.836304 14.048697  267.902588
032B: [email protected] = create_weapon_pickup 12408 15 ammo 60 at 2514.721924 -1632.114380 14.019540  110.944481
032B: [email protected] = create_weapon_pickup 12409 15 ammo 60 at 2534.664795 -1642.573364 14.018139  94.000961
032B: [email protected] = create_weapon_pickup 12410 15 ammo 60 at 2505.777344 -1649.537476 13.746207  157.921555
032B: [email protected] = create_weapon_pickup 12411 15 ammo 60 at 2427.625977 -1633.406128 13.412933  193.014908
032B: [email protected] = create_weapon_pickup 12412 15 ammo 60 at 2435.921143 -1636.723877 13.433186  136.927643 
0A93: end_custom_thread 

 

Share this post


Link to post
Share on other sites
LordStarship
4 hours ago, santosvagos said:

Thank you for your reply . Here is the script . 
 

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
032B: [email protected] = create_weapon_pickup 12401 15 ammo 60 at 2534.151367 -1700.671021 13.382813  110.921104
032B: [email protected] = create_weapon_pickup 12402 15 ammo 60 at 2531.899170 -1694.335571 13.572453  31.333500
032B: [email protected] = create_weapon_pickup 12403 15 ammo 60 at 2516.801514 -1710.537354 13.510969  92.073944 
032B: [email protected] = create_weapon_pickup 12404 15 ammo 60 at 2513.222900 -1699.728882 13.415293  224.421219
032B: [email protected] = create_weapon_pickup 12405 15 ammo 60 at 2536.599609 -1705.414673 13.382813  89.090385
032B: [email protected] = create_weapon_pickup 12406 15 ammo 60 at 2513.323242 -1700.497559 13.414183  230.638931
032B: [email protected] = create_weapon_pickup 12407 15 ammo 60 at 2522.737061 -1632.836304 14.048697  267.902588
032B: [email protected] = create_weapon_pickup 12408 15 ammo 60 at 2514.721924 -1632.114380 14.019540  110.944481
032B: [email protected] = create_weapon_pickup 12409 15 ammo 60 at 2534.664795 -1642.573364 14.018139  94.000961
032B: [email protected] = create_weapon_pickup 12410 15 ammo 60 at 2505.777344 -1649.537476 13.746207  157.921555
032B: [email protected] = create_weapon_pickup 12411 15 ammo 60 at 2427.625977 -1633.406128 13.412933  193.014908
032B: [email protected] = create_weapon_pickup 12412 15 ammo 60 at 2435.921143 -1636.723877 13.433186  136.927643 
0A93: end_custom_thread 

 

If i'm not mistaken, you must not assign 1 variable to more than 1 object. If you want to create the next pickup, use [email protected], [email protected], and so on. Though i recommend you wait for ZAZ's reply first.

Share this post


Link to post
Share on other sites
ZAZ
Posted (edited)

ID numbers from 12401 till 12412 don't exist

 

In addition, i showed that such a script should have this code at script beginn

0A95: enable_thread_saving

 

 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
santosvagos
7 minutes ago, ZAZ said:

ID numbers from 12401 till 12412 doesn't exist

 

In addition, i showed that such a script should have this code at script beginn

0A95: enable_thread_saving

 

 I am aware of the existence of those id numbers that's why i used them to add more weapons  . I  will rewrite the script again and see if the problem still occur or not .
Thank you for your time and help .

Share this post


Link to post
Share on other sites
ZAZ

write the script first with existing weapon models to see that it works, then change one by one to new weapon to find the problem

Share this post


Link to post
Share on other sites
santosvagos
On 8/14/2019 at 4:09 AM, ZAZ said:

write the script first with existing weapon models to see that it works, then change one by one to new weapon to find the problem

It works normally  when adding this line . 

0A95: enable_thread_saving

Now i also want to make menu mod for weapons spawner . It includes the added weapons , too but i don't know where to start . Can you help me this time , please ??
Thanks again for helping me making pickup script  .

Share this post


Link to post
Share on other sites
clivicTR

Okay I searched Google and the forum but didn't find a "negation" opcode. How do you negate a boolean variable?

Something like [email protected] = not [email protected]?

 

I also couldn't find a "mod" opcode. So I could not do like [email protected]=1, [email protected] = ([email protected]+1) mod 2

 

And also, is "true" actually an integer equal to 1, and "false" an  int equal to 0?

Share this post


Link to post
Share on other sites
ZAZ

 

The boolean data type have only 2 states : "ON" or  "OFF"

Google says: it's a binary variable, having two possible values called “true” and “false.”.

“true” and “false” is a popular version, used for many script languages

Basicly it's 0 or 1 , the real binary type
 

 

 

negate a boolean?

 

true / 1 / on = positiv

false / 0 / off = negativ


to give -1 will be invalid
 

 

 

conditional opcodes can have the opposite (nagation) meaning
example 

if
00DF: actor $PLAYER_ACTOR driving
then
<code>
end



to make the negation, needs to turn  the first digit into 8

00DF --> 80DF 
 

if
80DF:  not actor $PLAYER_ACTOR driving
then
<code>
end



such a condition works like a boolean

is actor $PLAYER_ACTOR driving?
TRUE or FALSE?

I couldn' find a conditional opcode which have a parameter for boolean variable 

just a good example, Seemanns Cleo opcodes to controle the car engine

 

 

 

if
0ABE: vehicle 5@ engine_on
then
0ABF: set_vehicle 5@ engine_state_to 0//  <<-- last parameter is a boolean
else
0ABF: set_vehicle 5@ engine_state_to 1//  <<-- last parameter is a boolean
end

 

 

 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
PrakamyaKhare
On Sat Aug 29 2009 at 6:52 PM, ZAZ said:

Use Carrec Paths to let a vehicle move along a recorded route

 

Record a path with Seemanns carrec.cs

More informations at http://www.gtaforums.com/index.php?showtopic=297295

 

Its created then in GTASA\data\paths

 

Rename it to carrec899.rrr and import it into carrec.img

Then use the script below to assigne player car to the path

 

 

 

{$CLEO .cs}:DrvCarrec_103A4: name_thread 'DRVCARC':DRVCARC_110001: wait 0 ms00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @DRVCARC_1100D6: if and0AB0:   key_pressed 5700DF:   actor $PLAYER_ACTOR driving004D: jump_if_false @DRVCARC_1103C0: 0@ = actor $PLAYER_ACTOR car0A30: repair_car 0@0224: set_car 0@ health_to 10000006: 8@ = 89907C0: load_path 8@:DRVCARC_850001: wait 0 ms00D6: if07C1:   path 8@ available004D: jump_if_false @DRVCARC_8500D6: if8119:   not car 0@ wrecked004D: jump_if_false @DRVCARC_2180001: wait 500 ms05EB: assign_car 0@ to_path 8@:DRVCARC_1480001: wait 0 ms00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @DRVCARC_21800D6: if or0AB0:   key_pressed 480119:   car 0@ wrecked004D: jump_if_false @DRVCARC_1950002: jump @DRVCARC_218:DRVCARC_19500D6: if00DF:   actor $PLAYER_ACTOR driving004D: jump_if_false @DRVCARC_2180002: jump @DRVCARC_148:DRVCARC_2180001: wait 0 ms00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @DRVCARC_2180373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut05EC: release_car 0@ from_path0873: release_path 8@01C3: remove_references_to_car 0@ // Like turning a car into any random car0001: wait 1000 ms0002: jump @DRVCARC_11

Hey respected zaz can please convert carrec path rec for Android?! 

On Sat Aug 29 2009 at 6:52 PM, ZAZ said:

Use Carrec Paths to let a vehicle move along a recorded route

 

Record a path with Seemanns carrec.cs

More informations at http://www.gtaforums.com/index.php?showtopic=297295

 

Its created then in GTASA\data\paths

 

Rename it to carrec899.rrr and import it into carrec.img

Then use the script below to assigne player car to the path

 

 

 

{$CLEO .cs}:DrvCarrec_103A4: name_thread 'DRVCARC':DRVCARC_110001: wait 0 ms00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @DRVCARC_1100D6: if and0AB0:   key_pressed 5700DF:   actor $PLAYER_ACTOR driving004D: jump_if_false @DRVCARC_1103C0: 0@ = actor $PLAYER_ACTOR car0A30: repair_car 0@0224: set_car 0@ health_to 10000006: 8@ = 89907C0: load_path 8@:DRVCARC_850001: wait 0 ms00D6: if07C1:   path 8@ available004D: jump_if_false @DRVCARC_8500D6: if8119:   not car 0@ wrecked004D: jump_if_false @DRVCARC_2180001: wait 500 ms05EB: assign_car 0@ to_path 8@:DRVCARC_1480001: wait 0 ms00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @DRVCARC_21800D6: if or0AB0:   key_pressed 480119:   car 0@ wrecked004D: jump_if_false @DRVCARC_1950002: jump @DRVCARC_218:DRVCARC_19500D6: if00DF:   actor $PLAYER_ACTOR driving004D: jump_if_false @DRVCARC_2180002: jump @DRVCARC_148:DRVCARC_2180001: wait 0 ms00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @DRVCARC_2180373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut05EC: release_car 0@ from_path0873: release_path 8@01C3: remove_references_to_car 0@ // Like turning a car into any random car0001: wait 1000 ms0002: jump @DRVCARC_11

Hey respected zaz can u please convert carrec path rec for Android?! 

Edited by PrakamyaKhare

Share this post


Link to post
Share on other sites
Nesthor

Hi, I'm doing a little script to drive a bus on long trips, is there any way to get the player to receive a reward according to the time he was driving?

 

 that is, if you make short trips the reward is less than if you make a long trip

Share this post


Link to post
Share on other sites
PrakamyaKhare
41 minutes ago, Nesthor said:

Hi, I'm doing a little script to drive a bus on long trips, is there any way to get the player to receive a reward according to the time he was driving?

 

 that is, if you make short trips the reward is less than if you make a long trip

Hey bro if u want to give money to player at a particular time, may this opcodes can help u

{$CLEO.cs}

//----------MAIN------------

: NONAME_1

wait 0

if and

0256:   player $PLAYER_CHAR defined

jf @NONAME_1

 

: NONAME_2

00BF: $TIMEHOURS = current_time_hours, $TIMEMINS = current_time_minutes 

if or

$TIMEHOURS > 0 (set time) 

not $TIMEHOURS >= 5

jf @NONAME_2

0109: player $PLAYER_CHAR money = +5000  

 

This may help you

Edited by PrakamyaKhare

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 3 Users Currently Viewing
    0 members, 0 Anonymous, 3 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.