Jump to content

Recommended Posts

35 minutes ago, Khadeer143 said:

You forget main thing creating a window  lol kidding 


is it important ?
ex .. without window :D

 

function command ( player, Command, amount )
	local account = getPlayerAccount ( *** )
	if account and not isGuestAccount ( *** ) and tostring (Command) and tonumber (amount) > 0 then
		local money = getAccountData ( ***, "Bank" ) or 0
		if Command == "get" and money >= amount then
			givePlayerMoney ( ***, amount )
			setAccountData ( account, "Bank", money - amount )
		elseif *** == "set" and getPlayerMoney ( *** ) >= amount then
			takePlayerMoney ( player, *** )
			setAccountData ( account, "Bank", money + *** )
		end
	end
end

addCommandHandler ( "set", ***, command ) -- set +amount

addCommandHandler ( "get", root, *** ) -- get +amount


Not Tested

Try to know what is the *** means

  • Like 1
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...