Jump to content

/cash /cash other


Recommended Posts

EDITED

i need a script that does thw following

/cash (shows youre cash)

/cash player (shows other players cash)

i also want whn i type /cash, the you have ...$ will be announced public in the chatbox

this is what i got

addCommandHandler ( "cash",

function ( player, command )

local money = getPlayerMoney ( player ) --Grab the player's money

outputChatBox ( "You have $"..money, player, 0, 255, 0 )

end

)

Edited by Guest
Link to comment
Hey,i got one but i didnt want to make it public.So i give you the cash and you give me the dd/dm wins?

Ok?.But i have a little problem.it doesent saves the money.

if it doesnt work why dont post here so people can look at it

(the racewin script for dd/dm comes tommorow , only if it works)

Link to comment

What do you need ?

A way to save Players Money into a Account or just a simple Cash Script ?

like you join the server and on the right in middle there is little layer CASH: 0000

You can use Direct X Functions + getPlayerSerial.

But you need to save the Serial + Moneyamount somewhere,

try to use SQL Databases or the Account Stylesheet

Link to comment

And.. please stop posting 2, 6 or 250 million times in a row. There is an edit button, you can use that for adding information to your posts. Bumping should be used carefully, not every other second. These forums aren't active enough to ensure an answer within a couple of hours, especially when you don't even manage to ask your questions properly!

PLEASE, try to be patient.

As a general rule, you should bump at MOST once in 24 hours and use the edit button wherever you can..

Link to comment

Maybe this is what you are looking for:

addCommandHandler ( "cash",
function ( player, command, dude )
if dude then
local temp = getPlayerFromName(dude)
if temp then
outputChatBox("The player "..dude.." has $"..tostring(getPlayerMoney(temp)),player,0,255,0)
else
outputChatBox("Player "..dude.." not found",player,0,255,0)
end
else
outputChatBox("The player "..getPlayerName(player).." has $"..tostring(getPlayerMoney(player)), getRootElement(),0,255,0)
end
end
)

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