Jump to content

Help please (TakePlayerMoney


zezim

Recommended Posts

Posted (edited)

Hey guys, sup

who can help me with this problem?

I wanted to withdraw all the money the player has in his hand. I was trying to do that, but I couldn't.

                        local value = math.random(0, 5000);
						
						if (getPlayerMoney(receiver) <>= value) then
						takePlayerMoney(receiver, value)
						end
-- and
						
						if (getPlayerMoney(receiver) >= value) then
						takePlayerMoney(receiver, value)
						end

I can't take all the player's money. I don't want to take a specific or random value, I want to take every value.

Who can help me pls?

Note: i can't do it =(

local value = (1, 2500)
						if (getPlayerMoney(receiver) >= value) then
						takePlayerMoney(receiver, value)
						end

--
local value = (1, 2500)
						if (getPlayerMoney(receiver) >= value) then
						takePlayerMoney(receiver, value)
                        setPlayerMoney(receiver, 0)
						end

 

Edited by zezim
  • Moderators
Posted

Moving this into the Scripting section!

Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime - Lao Tzu

Posted
18 hours ago, zezim said:

i wanna get all money in the hands

do this

local value = getPlayerMoney(receiver)
takePlayerMoney(receiver, value)

 

You gone learn today.

I work my ass off, but I still can't pay tho.

Posted (edited)

<>= this is not a valid operator!

 

what do you mean by "in his hands" ?

Edited by Tekken

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

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...