Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

Happy Holidays from the GTANet team!

[VC] Question from the begineer.


sebejszczyn
 Share

Recommended Posts

sebejszczyn

Hello. I recently started doing some CLEO simple scripts in Sanny Builder. I successfully managed how to make weapon pickup, but everytime I save game and not pickup weapon, they are multiplied. For example when I set ammo for 10 after 3 saves I will got 30 at one pick. How can I fix that?

I tried to make save pickup, too. It's working, but when saving ends, game crashes and after that I can't load it because of constant crashing. Here's what I've got for now:

 

// This file was decompiled using VCSCM.ini published on 2021-05-25
{$CLEO .cs}

wait 1000 
[email protected] = 1119.14 // @ = float 
[email protected] = -173.27 // @ = float 
[email protected] = 61.77 // @ = float 
[email protected] = 1121.0 // @ = float 
[email protected] = -179.32 // @ = float 
[email protected] = 61.77 // @ = float 
[email protected] = 90.0 // @ = float 
Pickup.Create([email protected], 5224, 3, [email protected], [email protected], [email protected])

:NONAME_94
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
jf @NONAME_209 
if 
   Pickup.Picked_up([email protected])
jf @NONAME_209 
if 
  $ONMISSION == 0 // $ == int 
jf @NONAME_150 
03D8: show_save_screen 

:NONAME_150
wait 0 
Actor.PutAt($PLAYER_ACTOR, [email protected], [email protected], [email protected])
Actor.Angle($PLAYER_ACTOR) = [email protected]
Player.CanMove($PLAYER_CHAR, True)
wait 1000 
Pickup.Create([email protected], 1277, 3, [email protected], [email protected], [email protected])
090D: 

:NONAME_209
jump @NONAME_94 
terminate_this_script 

 

Anyone can help with that? I will be very gratefull. Cheers!

Edited by sebejszczyn
Link to comment
Share on other sites

ArmanCan
On 8/8/2022 at 10:08 PM, sebejszczyn said:

I successfully managed how to make weapon pickup

 

Why did you create a weirdly prepared a pickup instead of using a normal pickup opcode?

 

032B: $2000 = create_weapon_pickup #COLT45 15 ammo 34 at -228.4 -1318.2 9.1 
0215=1,destroy_pickup %1d%

 

 Well if i remember correctly multiply only happens if you don't relocate the default weapons properly.. that means you have to destroy your desired pickup first and than you can create the same weapon again with different/same coordinates and ammo/spawn type..

 

In your case i think your approach is wrong...🙂

 

Talking about your other problem.. i've prepared a savegame pickup script for San Andreas which i've inspired from ZAZ.. I think it's also compatible for Vice City..i'm copying it right now...

 

Spoiler
{$CLEO .cs}

thread 'SAVE'
wait 1000

//BARBARA 
0A95: enable_thread_saving  // [email protected], [email protected], [email protected] = x,y,z coords for pickup
0007: [email protected] = -1389.9764 
0007: [email protected] = 2649.3208 
0007: [email protected] = 55.9844 // [email protected], [email protected], [email protected] = x,y,z coords and [email protected] = z_angle for put_actor $PLAYER_ACTOR at 
0007: [email protected] = -1394.1938 
0007: [email protected] = 2649.5498 
0007: [email protected] = 55.8732
0007: [email protected] = 90.0
0213: [email protected] = create_pickup 1277 type 3 at [email protected] [email protected] [email protected]
//O570: [email protected] = create_asset_radar_marker_with_icon 35 at [email protected] [email protected] [email protected]
//O18B: show_on_radar [email protected] 2

//00BC: show_text_highpriority GXT 'fem_on' time 3000 flag 1
while true
wait 0   
if      Player.Defined($PLAYER_CHAR)   
then if
0214:   pickup [email protected] picked_up
then if
0038:   $ONMISSION == 0
then
03D8: show_save_screen
end
wait 0
00A1: put_actor $PLAYER_ACTOR at [email protected] [email protected] [email protected]            
0173: set_actor $PLAYER_ACTOR Z_angle_to [email protected]           
01B4: set_player $PLAYER_CHAR can_move 1
wait 1000           
0213: [email protected] = create_pickup 1277 type 3 at [email protected] [email protected] [email protected]
090D: highlight_all_inactive_gang_zones_as_available_for_gangwars           
//00BC: show_text_highpriority GXT 'fem_ok' time 1000 flag 1
end
end
end

 

Edited by ArmanCan
Link to comment
Share on other sites

sebejszczyn
Posted (edited)
12 minutes ago, ArmanCan said:

 

Why did you create a weirdly prepared a pickup instead of using a normal pickup opcode?

 

032B: $2000 = create_weapon_pickup #COLT45 15 ammo 34 at -228.4 -1318.2 9.1 
0215=1,destroy_pickup %1d%

 

 Well if i remember correctly multiply only happens if you don't relocate the default weapons properly.. that means you have to destroy your desired pickup first and than you have to create the same weapon again with different/same coordinates and ammo/spawn type..

 

In your case i think your approach is wrong...🙂

 

For now I only did something like this:

 

Pickup.Create([email protected], 268, 15, -226.55, -1266.78, 32.16)
Pickup.Create([email protected], 267, 15, 874.04, -798.32, 20.68)
Pickup.Create([email protected], 261, 15, -390.32, -264.88, 22.16)
032B: [email protected] = create_weapon_pickup 271 15 ammo 8 at 518.82 -378.81 19.24 
032B: [email protected] = create_weapon_pickup 289 15 ammo 100 at -214.98 218.92 17.53 
032B: [email protected] = create_weapon_pickup 275 15 ammo 40 at -58.44 -444.1 32.02 
032B: [email protected] = create_weapon_pickup 275 15 ammo 40 at 1129.78 -180.2 61.77 
032B: [email protected] = create_weapon_pickup 278 15 ammo 30 at -29.83 -603.85 42.27 
032B: [email protected] = create_weapon_pickup 286 15 ammo 21 at -1431.36 138.51 64.77

When I'm trying to put Your's

0215=1,destroy_pickup %1d%"

Sanny don't want to compile it.

 

I'll check Your save script soon and see if it works. Thanks for reply!

Edited by sebejszczyn
Link to comment
Share on other sites

ArmanCan
On 8/9/2022 at 12:40 AM, sebejszczyn said:
032B: 13@ = create_weapon_pickup 271 15 ammo 8 at 518.82 -378.81 19.24 

 

I think you are mixing up something and you are assigning same local variable to different weapons.. Messing with weapons is tricky and corrupt your other pickups/savefile.. I highly advise you to delete some unwanted useless pickups first (Adrenalines are pretty much good to destroy/use) and than use their variables in order to create a new weapon.. for example this is again San Andreas script created by me 🙂

 

Spoiler
{$CLEO .cs}
// Grove4Life.txt

thread "Grove4Life"
wait 3000

:Loop
wait 0

00D6: if 
0038:   $ONMISSION == 0 
004D: jump_if_false @Loop 

00D6: if 
0ADC:   test_cheat "GROVE"
004D: jump_if_false @Loop 

0ACE: show_formatted_text_box "Grove 4 L-I-F-E Nigga!!"
                 
0215: destroy_pickup $3218 
0215: destroy_pickup $3217
0215: destroy_pickup $3210
0215: destroy_pickup $3209
0215: destroy_pickup $3213
0215: destroy_pickup $3208
0215: destroy_pickup $3206
0215: destroy_pickup $3236
0215: destroy_pickup $3266
0215: destroy_pickup $3271
0215: destroy_pickup $3294
0215: destroy_pickup $3285

0001: wait 0
032B: $3218 = create_weapon_pickup #ROCKETLA type 3 ammo 99999 at 2552.25 -1295.1 1061.0
032B: $3217 = create_weapon_pickup #HEATSEEK type 3 ammo 99999 at 2549.75 -1295.1 1061.0
032B: $3210 = create_weapon_pickup #MINIGUN type 3 ammo 99999 at 2549.75 -1292.7 1061.0
032B: $3209 = create_weapon_pickup #SATCHEL type 3 ammo 99999 at 2560.0 -1295.8 1061.0 
032B: $3213 = create_weapon_pickup #DESERT_EAGLE type 3 ammo 99999 at 2558.0 -1295.8 1061.0 
032B: $3208 = create_weapon_pickup #MP5LNG type 3 ammo 99999 at 2558.0 -1298.8 1061.0 
032B: $3206 = create_weapon_pickup #SHOTGSPA type 3 ammo 99999 at 2560.0 -1298.8 1061.0 
032B: $3236 = create_weapon_pickup #M4 type 3 ammo 99999 at 2560.0 -1302.8 1061.0 
032B: $3266 = create_weapon_pickup #SNIPER type 3 ammo 99999 at 2558.0 -1302.8 1061.0 
Pickup.Create($3271, #BAT, 3, 2576.0, -1280.7, 1065.3)
Pickup.Create($3294, #GUN_VIBE1, 3, 2579.0, -1282.5, 1065.3)
Pickup.Create($3285, #GUN_DILDO1, 15, 2582.7, -1282.5, 1065.3)

0A93: terminate_this_custom_script

I've destroyed some canes, flowers and created new pickups...As you also noticed i've put a cheat code in order to make it safe 🙂

Edited by ArmanCan
Link to comment
Share on other sites

ArmanCan

Well.. i don't like to post a second comment but here we go..

 

Quote
Pickup.Create([email protected], 268, 15, -226.55, -1266.78, 32.16)
Pickup.Create([email protected], 267, 15, 874.04, -798.32, 20.68)
Pickup.Create([email protected], 261, 15, -390.32, -264.88, 22.16)
032B: [email protected] = create_weapon_pickup 271 15 ammo 8 at 518.82 -378.81 19.24 
032B: [email protected] = create_weapon_pickup 289 15 ammo 100 at -214.98 218.92 17.53 
032B: [email protected] = create_weapon_pickup 275 15 ammo 40 at -58.44 -444.1 32.02 
032B: [email protected] = create_weapon_pickup 275 15 ammo 40 at 1129.78 -180.2 61.77 
032B: [email protected] = create_weapon_pickup 278 15 ammo 30 at -29.83 -603.85 42.27 
032B: [email protected] = create_weapon_pickup 286 15 ammo 21 at -1431.36 138.51 64.77

 

 

Are they the only weapons that you want to create? If yes i can try something for you 😉

Link to comment
Share on other sites

sebejszczyn
Posted (edited)
10 hours ago, ArmanCan said:

Well.. i don't like to post a second comment but here we go..

 

 

Are they the only weapons that you want to create? If yes i can try something for you 😉

Yes, the only ones that I want is there :) I will be gratefull for any fix You can provide.

 

I made saving script working, I copied yours and changed coords for those I wanted, but game kept crashing. I deleted the last lines:

 

00A1: put_actor $PLAYER_ACTOR at [email protected] [email protected] [email protected]            
0173: set_actor $PLAYER_ACTOR Z_angle_to [email protected]

And everything is fine for now.

Edited by sebejszczyn
Link to comment
Share on other sites

ArmanCan
13 hours ago, sebejszczyn said:

Yes, the only ones that I want is there :) I will be gratefull for any fix You can provide.

 

 

{$CLEO .cs}
// sebejszczyn.txt

wait 3000

:Loop
wait 0

if 
0038:   $ONMISSION == 0 
004D: jump_if_false @Loop 

if 
0ADC:   test_cheat "SEBE"
004D: jump_if_false @Loop 

0ACE: show_formatted_text_box "Rise Against"
                 
0001: wait 0
Pickup.Create([email protected], #KATANA, 15, -226.55, -1266.78, 32.16) // You should always work with "Model Name" instead of "ID"
Pickup.Create([email protected], #MACHETE, 15, 874.04, -798.32, 20.68)
Pickup.Create([email protected], #GOLFCLUB, 15, -390.32, -264.88, 22.16)
032B: [email protected] = create_weapon_pickup #TEARGAS 15 ammo 8 at 518.82 -378.81 19.24 
032B: [email protected] = create_weapon_pickup #M60 15 ammo 100 at -214.98 218.92 17.53 
032B: [email protected] = create_weapon_pickup #PYTHON 15 ammo 40 at -58.44 -444.1 32.02 
032B: [email protected] = create_weapon_pickup #PYTHON 15 ammo 40 at 1129.78 -180.2 61.77 
032B: [email protected] = create_weapon_pickup #SHOTGSPA 15 ammo 30 at -29.83 -603.85 42.27 
032B: [email protected] = create_weapon_pickup #LASER 15 ammo 21 at -1431.36 138.51 64.77

0A93: terminate_this_custom_script

 

As i said above "multiply" only occurs if the same global variable assigned without destroying and because of that you may have to delete the existing one.. It seems you are creating new weapon pickups so you don't have to delete the existing ones 😉

 

spacer.png

 

I've tested your weapons.. It works great but you should be careful about coordinates.. Some of them are sitting in the middle of ocean/nowhere or the air 🙂

Edited by ArmanCan
Link to comment
Share on other sites

sebejszczyn
Posted (edited)
22 minutes ago, ArmanCan said:

 

{$CLEO .cs}
// sebejszczyn.txt

wait 3000

:Loop
wait 0

if 
0038:   $ONMISSION == 0 
004D: jump_if_false @Loop 

if 
0ADC:   test_cheat "SEBE"
004D: jump_if_false @Loop 

0ACE: show_formatted_text_box "Rise Against"
                 
0215: destroy_pickup $2080 //These are variables (Assigned numbers) from "Adrenaline".. They will be used for your desired weapons. 
0215: destroy_pickup $2081
0215: destroy_pickup $2083
0215: destroy_pickup $2084
0215: destroy_pickup $2085
0215: destroy_pickup $2086
0215: destroy_pickup $2088
0215: destroy_pickup $2089
0215: destroy_pickup $2090

0001: wait 0
Pickup.Create($2080, #KATANA, 15, -226.55, -1266.78, 32.16) // You should always work with "Model Name" instead of "ID"
Pickup.Create($2081, #MACHETE, 15, 874.04, -798.32, 20.68)
Pickup.Create($2083, #GOLFCLUB, 15, -390.32, -264.88, 22.16)
032B: $2084 = create_weapon_pickup #TEARGAS 15 ammo 8 at 518.82 -378.81 19.24 
032B: $2085 = create_weapon_pickup #M60 15 ammo 100 at -214.98 218.92 17.53 
032B: $2086 = create_weapon_pickup #PYTHON 15 ammo 40 at -58.44 -444.1 32.02 
032B: $2088 = create_weapon_pickup #PYTHON 15 ammo 40 at 1129.78 -180.2 61.77 
032B: $2089 = create_weapon_pickup #SHOTGSPA 15 ammo 30 at -29.83 -603.85 42.27 
032B: $2090 = create_weapon_pickup #LASER 15 ammo 21 at -1431.36 138.51 64.77

0A93: terminate_this_custom_script

 

As i said above "multiply" only occurs if the same global variable assigned without destroying and because of that you may have to delete some unwanted pickups..

 

spacer.png

 

I've tested your weapons.. It works great but you should be careful about coordinates.. Some of them are sitting in the middle of ocean/nowhere or the air 🙂

They are because I'm using them in GTA: Liberty City mod :) That could cause some of the crashes, too. Big thanks to You!

About a weapon names in the scripts - I tried to use them, but then Sanny Builder don't want to compile the script because some kind of error appears "Compiled file has no header, so the model name #KATANA can not be used. Use number ID instead.".

Edited by sebejszczyn
Link to comment
Share on other sites

ArmanCan
5 minutes ago, sebejszczyn said:

About a weapon names in the scripts - I tried to use them, but then Sanny Builder don't want to compile the script because some kind of error appears.

 

Is there any problem about my script? 🤔

Link to comment
Share on other sites

sebejszczyn
Posted (edited)
5 minutes ago, ArmanCan said:

 

Is there any problem about my script? 🤔

Yep, I tried to compile It and got the same error. When I changed back to weapon ID's everything's working fine.

Edited by sebejszczyn
Link to comment
Share on other sites

ArmanCan
30 minutes ago, sebejszczyn said:

Yep, I tried to compile It and got the same error. When I change back to weapon ID's everything's working fine.

 

Ok good.. actually i've confused you about weapons pickups because you have few options to play with them 🙂 For example..

 

032B: $2000 = create_weapon_pickup #COLT45 15 ammo 34 at -228.4 -1318.2 9.1

 

This is a Colt45 from the game..

  • "$2000" is the global variable of this weapon. Variable is a number (NOT ID) which assigned from the game and these numbers can be anything.
  • "15" is the Pickup Type. You can change to "3" in order to make it disposable..
  • "#COLT45" is the model name.. I think you've practised these already.. If you type "#" in Sanny you can access all these models..

- If you want to increase it's ammo or change it's pickup type (15) you have to delete it first..this is a simple example of it..

 

0215: destroy_pickup $2000
032B: $2000 = create_weapon_pickup #COLT45 15 ammo 34 at -228.4 -1318.2 9.1 

 

- If your intention to relocate the same weapon you are going to have to follow the same process above..

 

- You can also delete some unwanted pickups in order to get rid of it and use their variables for new weapons..

 

0215: destroy_pickup $2080 // That was an adrenaline pickup "Pickup.Create($2080, #ADRENALINE, 15, -37.7, -938.3, 10.5)"
032B: $2080 = create_weapon_pickup #COLT45 15 ammo 34 at -228.4 -1318.2 9.1 

 

- For new weapon pickups you don't have to do all of this. You can just create it with a local variable. Local variable is especially used for avoiding to assign a global variable. These numbers are always like this "[email protected]". There is a limit in this game and because of that you can only use to "[email protected]"  in one script 😉

 

032B: [email protected] = create_weapon_pickup #COLT45 15 ammo 34 at -228.4 -1318.2 9.1 

 

 

Apart from weapons you can also use these pickups as a source in order to play with them later..

 

Spoiler
Pickup.Create($2035, #CHNSAW, 2, 30.0, -1330.9, 13.0)
Pickup.Create($1999, #BAT, 2, 206.7, -1254.4, 12.0)
032B: $2000 = create_weapon_pickup #COLT45 15 ammo 34 at -228.4 -1318.2 9.1 
032B: $2001 = create_weapon_pickup #COLT45 15 ammo 34 at 340.5 -249.5 12.5 
032B: $2002 = create_weapon_pickup #CHROMEGUN 15 ammo 16 at 42.3 -959.2 21.8 
032B: $2003 = create_weapon_pickup #CHROMEGUN 15 ammo 16 at 568.9 -449.3 11.1 
032B: $2004 = create_weapon_pickup #TEC9 15 ammo 100 at 287.9 50.7 10.8 
032B: $2005 = create_weapon_pickup #GRENADE 15 ammo 4 at 362.2 -500.5 12.3 
Pickup.Create($2006, #CLEAVER, 15, 402.6, 102.5, 11.4)
032B: $2007 = create_weapon_pickup #RUGER 15 ammo 60 at 418.9 589.9 18.3 
Pickup.Create($2008, #KATANA, 15, 476.9, 1014.9, 19.2)
Pickup.Create($2009, #NITESTICK, 15, 402.4, -488.3, 12.4)
Pickup.Create($2011, #BRASSKNUCKLE, 15, 224.0, -1207.5, 11.0)
Pickup.Create($2012, #KNIFECUR, 15, 118.7, -1546.1, 10.8)
Pickup.Create($2013, #MACHETE, 15, 56.6, -459.3, 11.4)
032B: $2014 = create_weapon_pickup #UZI 15 ammo 60 at 5.4 -1277.0 10.4 
032B: $2036 = create_weapon_pickup #UZI 15 ammo 60 at 157.0 -895.3 12.3 
032B: $2010 = create_weapon_pickup #BOMB 15 ammo 4 at 556.6 207.4 14.5 
032B: $2015 = create_weapon_pickup #M4 15 ammo 60 at -32.8 1019.2 13.0 
032B: $2016 = create_weapon_pickup #UZI 15 ammo 60 at 17.3 1145.7 23.5 
Pickup.Create($2017, #GOLFCLUB, 2, 95.0, 279.2, 21.8)
032B: $2018 = create_weapon_pickup #FLAME 15 ammo 300 at -546.0 -418.9 9.8 
032B: $2019 = create_weapon_pickup #SNIPER 15 ammo 20 at -476.4 -571.2 12.9 
Pickup.Create($2020, #KATANA, 15, -554.11, -547.7, 10.7)
032B: $2021 = create_weapon_pickup #MOLOTOV 15 ammo 4 at -755.7 1347.5 11.8 
032B: $2022 = create_weapon_pickup #UZI 15 ammo 60 at -545.8 694.6 11.0 
032B: $2023 = create_weapon_pickup #M4 15 ammo 60 at -980.4 118.7 9.3 
032B: $2024 = create_weapon_pickup #M4 15 ammo 60 at -1221.0 -641.6 11.7 
032B: $2025 = create_weapon_pickup #SNIPER 15 ammo 20 at -742.1 -949.9 9.9 
032B: $2026 = create_weapon_pickup #ROCKETLA 15 ammo 4 at -995.1 -1178.1 13.6 
032B: $2027 = create_weapon_pickup #INGRAMSL 15 ammo 60 at -713.3 -1466.0 11.2 
032B: $2028 = create_weapon_pickup #FLAME 15 ammo 300 at -1015.1 -1392.9 11.5 
032B: $2029 = create_weapon_pickup #SHOTGSPA 15 ammo 14 at -1359.0 -742.2 14.9 
032B: $2030 = create_weapon_pickup #M60 15 ammo 100 at -1744.9 -288.9 29.7 
032B: $2031 = create_weapon_pickup #GRENADE 15 ammo 4 at -939.8 -464.9 10.9 
032B: $2032 = create_weapon_pickup #PYTHON 15 ammo 12 at -1182.7 -61.1 11.4 
032B: $2033 = create_weapon_pickup #BUDDYSHOT 15 ammo 10 at -1305.2 177.1 11.4 
032B: $2034 = create_weapon_pickup #LASER 15 ammo 14 at -1114.3 -602.0 26.0 
Pickup.Create($2037, #HEALTH, 1, -113.2, -975.7, 10.4)
Pickup.Create($2038, #HEALTH, 15, -225.1, -1158.1, 9.1)
Pickup.Create($2039, #HEALTH, 15, 456.2, -471.4, 16.6)
Pickup.Create($2040, #HEALTH, 15, 377.4, 467.7, 11.6)
Pickup.Create($2041, #HEALTH, 1, 469.6, 697.4, 11.7)
Pickup.Create($2042, #HEALTH, 15, 385.3, 1210.9, 19.4)
Pickup.Create($2043, #HEALTH, 1, 384.3, 756.6, 11.7)
Pickup.Create($2044, #HEALTH, 15, 10.7, 1099.0, 16.6)
Pickup.Create($2045, #HEALTH, 15, 85.3, 402.7, 19.8)
Pickup.Create($2046, #HEALTH, 15, -711.7, -501.7, 11.3)
Pickup.Create($2047, #HEALTH, 15, -404.0, -588.0, 11.6)
Pickup.Create($2061, #HEALTH, 2, -406.2503, -566.4947, 19.5804)
Pickup.Create($2048, #HEALTH, 15, -478.1, 1438.5, 16.1)
Pickup.Create($2049, #HEALTH, 15, -675.0, 1263.3, 25.1)
Pickup.Create($2050, #HEALTH, 15, -821.8, 1144.8, 26.1)
Pickup.Create($2051, #HEALTH, 15, -1139.4, 55.4, 11.2)
Pickup.Create($2052, #HEALTH, 15, -1290.9, 91.9, 26.9)
Pickup.Create($2053, #HEALTH, 1, -885.4, -483.4, 13.1)
Pickup.Create($2054, #HEALTH, 15, -925.1, -638.3, 16.0)
Pickup.Create($2055, #HEALTH, 15, -692.4, -1283.8, 11.1)
Pickup.Create($2056, #HEALTH, 15, -655.1, -1506.3, 8.1)
Pickup.Create($2057, #HEALTH, 15, -1399.4, -865.9, 20.9)
Pickup.Create($2058, #HEALTH, 1, -822.6, 1137.3, 12.4)
Pickup.Create($2059, #HEALTH, 1, -851.4, -78.8, 11.5)
Pickup.Create($2060, #HEALTH, 1, -834.2, 740.6, 11.3)
Pickup.Create($2062, #BODYARMOUR, 15, 4.9, -1239.2, 19.2)
Pickup.Create($2063, #BODYARMOUR, 15, 205.7, -885.7, 12.2)
Pickup.Create($2064, #BODYARMOUR, 15, 148.8, -349.9, 8.7)
Pickup.Create($2065, #BODYARMOUR, 15, 520.2, -171.2, 13.9)
Pickup.Create($2066, #BODYARMOUR, 15, 430.8, 162.1, 11.8)
Pickup.Create($2067, #BODYARMOUR, 15, 416.1, 517.7, 11.2)
Pickup.Create($2068, #BODYARMOUR, 15, 350.2, 884.8, 25.5)
Pickup.Create($2069, #BODYARMOUR, 15, 535.3, 1214.1, 18.9)
Pickup.Create($2070, #BODYARMOUR, 15, 42.8, 951.1, 11.0)
Pickup.Create($2071, #BODYARMOUR, 15, -70.8, 510.6, 11.6)
Pickup.Create($2072, #BODYARMOUR, 15, -1695.6, -289.4, 29.7)
Pickup.Create($2073, #BODYARMOUR, 15, -567.6, 1370.36, 16.4)
Pickup.Create($2074, #BODYARMOUR, 15, -921.9, 722.9, 11.0)
Pickup.Create($2076, #BODYARMOUR, 15, -1058.9, -240.6, 18.2)
Pickup.Create($2077, #BODYARMOUR, 15, -625.5, 622.2, 11.7)
Pickup.Create($2078, #BODYARMOUR, 15, -733.5, -1294.7, 12.4)
Pickup.Create($2079, #BODYARMOUR, 15, -1177.0, -915.3, 14.9)
Pickup.Create($2075, #BODYARMOUR, 15, -1171.0, -457.4, 10.7)
Pickup.Create($2080, #ADRENALINE, 15, -37.7, -938.3, 10.5)
Pickup.Create($2081, #ADRENALINE, 15, 471.1, -444.1, 10.6)
Pickup.Create($2082, #ADRENALINE, 15, 448.6, 16.6, 11.0)
Pickup.Create($2083, #ADRENALINE, 15, 425.6, 221.1, 16.2)
Pickup.Create($2084, #ADRENALINE, 15, 428.4, 947.5, 13.2)
Pickup.Create($2085, #ADRENALINE, 1, 385.6, 752.3, 11.7)
Pickup.Create($2086, #ADRENALINE, 15, -366.6, -500.3, 11.3)
Pickup.Create($2087, #ADRENALINE, 15, -342.2, -591.5, 36.9)
Pickup.Create($2088, #ADRENALINE, 15, -381.2, 1065.2, 13.0)
Pickup.Create($2089, #ADRENALINE, 15, -730.1, 1226.3, 24.2)
Pickup.Create($2090, #ADRENALINE, 15, -1095.1, 99.4, 12.3)
Pickup.Create($2091, #ADRENALINE, 15, -967.1, -62.6, 11.0)
Pickup.Create($2092, #ADRENALINE, 15, -1022.1, -547.0, 11.2)
Pickup.Create($2093, #ADRENALINE, 15, -882.0, 111.2, 9.3)
Pickup.Create($2094, #ADRENALINE, 1, -857.1, -83.6, 11.5)
Pickup.Create($2095, #ADRENALINE, 1, -839.0, 740.6, 11.3)

 

 

Edited by ArmanCan
Link to comment
Share on other sites

sebejszczyn

This is nice! I actually started getting things right and started to understand some of those 😄 Weapon script works now perfectly, even without the cheat in it. When I load saved game, the pickups finally don't stack at each other. I might write some more questions soon, as I start trying to get something more than just pickups 😀 Thank you so much for your time and help! Greetings!

Link to comment
Share on other sites

ArmanCan
1 minute ago, sebejszczyn said:

I might write some more questions soon, as I start trying to get something more than just pickups

 

I'm not so expert but.. sure.. ask me anytime 😃

Link to comment
Share on other sites

sebejszczyn

I have another, maybe little different question: How to change pickup and weapon corona colors? Is there any simple solution? I just want to bring back original colors and coronas for weapons and pickups in GTA:LC mod since I restored back original VC weapons to it.

Link to comment
Share on other sites

ArmanCan
1 hour ago, sebejszczyn said:

I have another, maybe little different question: How to change pickup and weapon corona colors? Is there any simple solution? I just want to bring back original colors and coronas for weapons and pickups in GTA:LC mod since I restored back original VC weapons to it.

 

I think it is hardcoded.. try to search on internet for mods or search on this forum for a solution.. sorry..🙂 

 

https://github.com/DK22Pac/plugin-sdk/tree/master/plugin_vc/game_vc

https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_vc/game_vc/CWeaponEffects.h

https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_vc/game_vc/CWeaponEffects.cpp

 

You can also dig this URL in order to find some useful stuff 😉

Edited by ArmanCan
Link to comment
Share on other sites

sebejszczyn
22 minutes ago, ArmanCan said:

 

I think it is hardcoded.. try to search on internet for mods or search on this forum for a solution.. sorry..🙂 

 

https://github.com/DK22Pac/plugin-sdk/tree/master/plugin_vc/game_vc

https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_vc/game_vc/CWeaponEffects.h

https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_vc/game_vc/CWeaponEffects.cpp

 

You can also dig this URL in order to find some useful stuff 😉

 

That's what I thought :) Thanks again for reply! I'll be back soon, I guess.

Link to comment
Share on other sites

sebejszczyn
Posted (edited)

I'm Sorry for doublepost, but I need some more help.
I managed with help from ArmanCan to make a save point in Salvatore's mansion in GTA liberty City Beta 4.0 mod. I was thinking about adding a garage in mansion. 
There is already fully functioning garage door with animation and stuff, but the door only works in missions. 
How can I make the garage opening normally and saving cars inside? I've searched for garage ID, door model and coordinates, and here's what I found:
 

 

Enum: GARAGE_MISSION_KEEPCAR_REMAINCLOSED

Garage name: frankie_garage

 

industNE.ide

536, SalvGarage, frankiesbase, 1, 100, 0


industNE.ipl

536, SalvGarage, 0, 1093.37, -183.262, 57.6481, 1, 1, 1, 0, 0, 0, 1

 

It have the same names of garage and door as original GTA 3, but of course the coordinates are different. I searched for script to make garage working, and found something like this(from what I read the opcode in VC is little different than 3 and SA):

 

:opcode_0299
// [email protected] - input param (garage handle)
[email protected] *= 0xA8  // size of each garage block
[email protected] += 0x812668  // add to beginning of garage block
05E0: [email protected] = read_memory [email protected] size 1 virtual_protect 0  // read garage type
if
    [email protected] == 11  // is garage type 11
then
    [email protected] += 1  // door state offset
    05E0: [email protected] = read_memory [email protected] size 1 virtual_protect 0  // read garage door state
    if
        [email protected] == 0  // is door closed
    then
        05DF: write_memory [email protected] size 1 value 3 virtual_protect 0  // open garage door
    end
    [email protected] -= 1
end
[email protected] += 5  // activation offset
05DF: write_memory [email protected] size 1 value 0 virtual_protect 0  // activate garage
05F6: ret 0

 

I'm little confused what put where in this code, I tried to put "SalvGarage" or "GARAGE_MISSION_KEEPCAR_REMAINCLOSED" name in the place of "[email protected]" - input param, but it doesn't seem to work. Any help will be greatly appreciated.

Edited by sebejszczyn
Link to comment
Share on other sites

ArmanCan
1 hour ago, sebejszczyn said:

I'm Sorry for doublepost, but I need some more help.
I managed with help from ArmanCan to make a save point in Salvatore's mansion in GTA liberty City Beta 4.0 mod. I was thinking about adding a garage in mansion. 
There is already fully functioning garage door with animation and stuff, but the door only works in missions. 
How can I make the garage opening normally and saving cars inside? I've searched for garage ID, door model and coordinates, and here's what I found:
 

 

Enum: GARAGE_MISSION_KEEPCAR_REMAINCLOSED

Garage name: frankie_garage

 

industNE.ide

536, SalvGarage, frankiesbase, 1, 100, 0


industNE.ipl

536, SalvGarage, 0, 1093.37, -183.262, 57.6481, 1, 1, 1, 0, 0, 0, 1

 

It have the same names of garage and door as original GTA 3, but of course the coordinates are different. I searched for script to make garage working, and found something like this(from what I read the opcode in VC is little different than 3 and SA):

 

:opcode_0299
// [email protected] - input param (garage handle)
[email protected] *= 0xA8  // size of each garage block
[email protected] += 0x812668  // add to beginning of garage block
05E0: [email protected] = read_memory [email protected] size 1 virtual_protect 0  // read garage type
if
    [email protected] == 11  // is garage type 11
then
    [email protected] += 1  // door state offset
    05E0: [email protected] = read_memory [email protected] size 1 virtual_protect 0  // read garage door state
    if
        [email protected] == 0  // is door closed
    then
        05DF: write_memory [email protected] size 1 value 3 virtual_protect 0  // open garage door
    end
    [email protected] -= 1
end
[email protected] += 5  // activation offset
05DF: write_memory [email protected] size 1 value 0 virtual_protect 0  // activate garage
05F6: ret 0

 

I'm little confused what put where in this code, I tried to put "SalvGarage" or "GARAGE_MISSION_KEEPCAR_REMAINCLOSED" name in the place of "[email protected]" - input param, but it doesn't seem to work. Any help will be greatly appreciated.

 

open a new request..Other people wont' be aware from this request.. 🙂

 

Gathering all of your requests under your first request won't be helpful also 😔

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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