SolvedSpawning Money

Posts 1–7 of 7 · Page 1 of 1
Spawning Money
Hello,

I just wanted to ask if someone knows how to spawn 40k moneybags and I don't want to know what menu it does i want the source code to spawn one. It would be pretty nice if it would be C++ code and I would also pay for it if needed.
For everyone that still doesn't know

Code:
Vector3 ENTPOS = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 0);
static Any prop_bag = GAMEPLAY::GET_HASH_KEY("prop_money_bag_01");
STREAMING::REQUEST_MODEL(prop_bag); //Request the shitty Model so that 40k spawns are possible
if (STREAMING::HAS_MODEL_LOADED(prop_bag))
{
    OBJECT::CREATE_AMBIENT_PICKUP(GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_CASE"), ENTPOS.x, ENTPOS.y, ENTPOS.z + 1, 0, 40000, prop_bag, 0, 1);
    STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(prop_bag);
}
@Royce Close thread pls!!!
Quote Originally Posted by BigBrainAFK View Post
For everyone that still doesn't know

Code:
Vector3 ENTPOS = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 0);
static Any prop_bag = GAMEPLAY::GET_HASH_KEY("prop_money_bag_01");
STREAMING::REQUEST_MODEL(prop_bag); //Request the shitty Model so that 40k spawns are possible
if (STREAMING::HAS_MODEL_LOADED(prop_bag))
{
    OBJECT::CREATE_AMBIENT_PICKUP(GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_CASE"), ENTPOS.x, ENTPOS.y, ENTPOS.z + 1, 0, 40000, prop_bag, 0, 1);
    STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(prop_bag);
}
@Royce Close thread pls!!!
I would like to convert this code to .lua?
Quote Originally Posted by Porco Aranha View Post
I would like to convert this code to .lua?
I don't code LUA normally. Pls someone correct me if I am wrong but this should work
Code:
ENTPOS = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), 0)
local prop_bag = GAMEPLAY.GET_HASH_KEY("prop_money_bag_01")
STREAMING.REQUEST_MODEL(prop_bag)
if STREAMING.HAS_MODEL_LOADED(prop_bag) then
    OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_CASE"), ENTPOS.x, ENTPOS.y, ENTPOS.z + 1, 0, 40000, prop_bag, 0, 1)
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(prop_bag)
end
Quote Originally Posted by BigBrainAFK View Post
I don't code LUA normally. Pls someone correct me if I am wrong but this should work
Code:
ENTPOS = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), 0)
local prop_bag = GAMEPLAY.GET_HASH_KEY("prop_money_bag_01")
STREAMING.REQUEST_MODEL(prop_bag)
if STREAMING.HAS_MODEL_LOADED(prop_bag) then
    OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_CASE"), ENTPOS.x, ENTPOS.y, ENTPOS.z + 1, 0, 40000, prop_bag, 0, 1)
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(prop_bag)
end
It did not really work.

-------

attempt to index global 'ENTITY' <a nil value> ....
Quote Originally Posted by Porco Aranha View Post
It did not really work.

-------

attempt to index global 'ENTITY' <a nil value> ....
Like I said I'm not a LUA coder so I don't know how you call natives in the LUA_SDK

- - - Updated - - -

Quote Originally Posted by Porco Aranha View Post
It did not really work.

-------

attempt to index global 'ENTITY' <a nil value> ....
Try this one
Code:
ENTPOS = natives.ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), 0)
local prop_bag = natives.GAMEPLAY.GET_HASH_KEY("prop_money_bag_01")
natives.STREAMING.REQUEST_MODEL(prop_bag)
if natives.STREAMING.HAS_MODEL_LOADED(prop_bag) then
    natives.OBJECT.CREATE_AMBIENT_PICKUP(natives.GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_CASE"), ENTPOS.x, ENTPOS.y, ENTPOS.z + 1, 0, 40000, prop_bag, 0, 1)
    natives.STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(prop_bag)
end
It depends on which GTA Lua you are using so I can't script it without knowing what plugin u use.
Quote Originally Posted by BigBrainAFK View Post
Like I said I'm not a LUA coder so I don't know how you call natives in the LUA_SDK

- - - Updated - - -



Try this one
Code:
ENTPOS = natives.ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), 0)
local prop_bag = natives.GAMEPLAY.GET_HASH_KEY("prop_money_bag_01")
natives.STREAMING.REQUEST_MODEL(prop_bag)
if natives.STREAMING.HAS_MODEL_LOADED(prop_bag) then
    natives.OBJECT.CREATE_AMBIENT_PICKUP(natives.GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_CASE"), ENTPOS.x, ENTPOS.y, ENTPOS.z + 1, 0, 40000, prop_bag, 0, 1)
    natives.STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(prop_bag)
end
It depends on which GTA Lua you are using so I can't script it without knowing what plugin u use.
I am using GTALua 1.1.1. now instead of 'ENTITY' was 'PLAYER'
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us