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Īnd 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 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
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |