Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      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

[Lua] Spawn 2k - 40k Money Bags Script?


Gre3nPois0n
 Share

Recommended Posts

Gre3nPois0n

Somebody can make me a 2k - 40k Script, i pretty mutch new at Scripting and Coding :)

Credits for the Maker for sure.

Gre3nPois0n

GTA5 23Mod Menu v0.25 DEV5

Link to comment
Share on other sites

Not LUA, but I have C# code that does what you asked for, shouldn't be too hard to convert to lua.

                var pos = p.Character.Position;                var hash = Function.Call<int>(Hash.GET_HASH_KEY, "PICKUP_MONEY_CASE");                var model = new Model(0x113FD533); // prop_money_bag_01                 model.Request(1000);                Function.Call(Hash.CREATE_AMBIENT_PICKUP, hash, pos.X, pos.Y, pos.Z, 0, 40000, 0x113FD533, false, true);                model.MarkAsNoLongerNeeded();
Link to comment
Share on other sites

This is what I've done in my Lua Trainer:

function Trainer.AddCash()    local playerPed = PLAYER.PLAYER_PED_ID()    local player = PLAYER.GET_PLAYER_PED(playerPed)    local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)     if (playerExists) then    local playerPosition = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), false)         OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_MED_BAG"), playerPosition.x, playerPosition.y, playerPosition.z, 0, 500000, 1, false, true)		 Trainer.updateMenus("Cash Added", nil)	endend

And spawn cash only:

local cash = {}function cash.unload()endfunction cash.init()endfunction cash.tick()    local playerPed = PLAYER.PLAYER_PED_ID()    local player = PLAYER.GET_PLAYER_PED(playerPed)    local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)     if (get_key_pressed(Keys.YOURFAVOURITEKEYHERE)) and (playerExists) then    local playerPosition = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), false)         OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_MED_BAG"), playerPosition.x, playerPosition.y, playerPosition.z, 0, 40000, 1, false, true)	 endendreturn cash

And here are the names for the pickups:

PICKUP_MONEY_VARIABLEPICKUP_MONEY_CASEPICKUP_MONEY_WALLETPICKUP_MONEY_PURSEPICKUP_MONEY_DEP_BAGPICKUP_MONEY_MED_BAGPICKUP_MONEY_PAPER_BAGPICKUP_MONEY_SECURITY_CASE
Edited by Unknown_Modder
Link to comment
Share on other sites

Unknown Modder, is there any Way? to Spawn Money next to you?

Of course! :cool: (Sorry for the late answer)

local cash = {}function cash.unload()endfunction cash.init()endfunction cash.tick()local playerPed = PLAYER.PLAYER_PED_ID()    local player = PLAYER.GET_PLAYER_PED(playerPed)    local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)    if (get_key_pressed(Keys.YOURFAVOURITEKEYHERE)) and (playerExists) then    local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 3.5, 0.0);    OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_PAPER_BAG"), coords.x, coords.y, coords.z, 0, 40000, 1, false, true)        endendreturn cash

You can easily change the position of the cash spawn by changing the red marked numbers in this line (XYZ coords)

local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 3.5, 0.0);

and the amount of cash by changing the 40000 in this line

OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_PAPER_BAG"), coords.x, coords.y, coords.z, 0, 40000, 1, false, true)

Edited by Unknown_Modder
Link to comment
Share on other sites

MrGTAmodsgerman

Ich habe nen detailiertes Money Menu geschrieben ich werde es bald veröffentlichen falls du danach gesucht hast.

Link to comment
Share on other sites

@MrGTAmodsgerman LUA, ASI oder NET?

 

EDIT: Hab's gerade bei GTAinside.com gesehen :pp

Edited by Unknown_Modder
Link to comment
Share on other sites

This is way too easy..

Scan area for bullets owned by your ped

Locate the bullet in this scan

Drop pickup

Add the bullet position to an array so your script does not drop anymore cash for this bullet vector.

You would have to make an array that drops array items > 100 so that the game will not lag

if array.length > 99

Array.removeat(0)

end if

Edited by Enumerator
Link to comment
Share on other sites

  • 3 weeks later...

What do i do if i want to check has that pickup been collected?

 

So what is the p0 part in HAS_PICKUP_BEEN_COLLECTED(p0) ?

 

:)

Link to comment
Share on other sites

What do i do if i want to check has that pickup been collected?

 

So what is the p0 part in HAS_PICKUP_BEEN_COLLECTED(p0) ?

 

:)

It's used in place of a parameter.

Link to comment
Share on other sites

 

What do i do if i want to check has that pickup been collected?

 

So what is the p0 part in HAS_PICKUP_BEEN_COLLECTED(p0) ?

 

:)

It's used in place of a parameter.

 

Yeeeeeeeeeeeaaaaaah! i can undestand that, lol :D But i was asking what type it was.. But i already did some research on r* scripts and i figured it out myself.. it was the hash of the pickup created, but that HAS_PICKUP_BEEN_COLLECTED() dont even work for ambient or normal pickups.. i think it works just for that create_pickup_rotate, cause it used with that in R* scripts.. But if anyone wants to check if pickup has been collected, you can do that by create_pickup (not with ambient_pickup) and then calling

OBJECT::DOES_PICKUP_OBJECT_EXIST()

Edited by GRANDHEIST
Link to comment
Share on other sites

sorry for the late answer but try this

 

Vector3 mycoords = GET_ENTITY_COORDS(GET_PLAYER_PED(selectedClient), true);
REQUEST_MODEL(289396019);
if (HAS_MODEL_LOADED(289396019) != 1)
{
WAIT(0);
}
else if (HAS_MODEL_LOADED(289396019) == 1)
{
CREATE_AMBIENT_PICKUP(3463437675, mycoords.x, mycoords.y, mycoords.z, 0, 40000, 289396019, 0, 1);
SET_MODEL_AS_NO_LONGER_NEEDED(289396019);
}
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.