Jump to content

Money pickup


Recommended Posts

Hello, I was wondering, that how to make money pickup.. With respawn :P

I tried code what was in mta development, but didn't work.

So, I don't wanna money drop, just pickup

I maked nice money pot script which you have to find, but how can I do money pickup which give 10k

Link to comment

Yes, I tried..

There's codes what I tried:

createPickup ( -2056.58, -184.65, 225.32, 1274, 10000, respawnTime = 30000 )

and also:

<pickup id="pickup (money) (1212)" amount="10000" posX="2479.5717773438" posY="-1657.3337402344" posZ="13.326832771301" respawn="30000" type="money" />

And there was also one, but I can't find it anymore :D

So i'm tried createPickup.

Link to comment
createPickup ( -2056.58, -184.65, 225.32, 1274, 10000, respawnTime = 30000 )

local money = createPickup ( -2056.58, -184.65, 225.32, 3, 1274, 30000 )
function pickupUse ( player )
givePlayerMoney ( player, 10000 )
end
addEventHandler ( "onPickupUse", money, pickupUse )

You forgot the type of the pickup, which must be 'custom' and 'amount' only works for health, armor or weapon pickups so you can't just put it in there like that, however you can attach an event handler to the pickup so when a player steps on it, you give them 10k. If you want to be able to pick it up while in a car too then use "onPickupHit" instead.

Link to comment

It's a bug. The pickup will appear when it's streamed in. Go far away from the pickup location and come back, you will see it. The only solution would be to create the pickup in the same place and delete the one that respawns.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...