Hello I need help,
how can I script money to Classic Deathmatch on the cdm_ls.map !
I would buy things, gut without money it doesn't go!
This is what i have created:
function createBankAccount ( player, commandName )
cash = getPlayerMoney ( player )
--
playname = xmlLoadFile("playname.xml")
info = xmlCreateFile ( "playname.xml", "info" ) -- create the file "playname.xml" which looks like ""
xmlNodeSetAttribute ( info, "user" ) -- add a subnode , now we got ""
local banknode = xmlFindSubNode(playname, "user", 0)
xmlNodeSetAttribute(banknode, "bank", tostring(cash))
--xmlNodeSetValue ( bank, tostring( cash ) ) -- change the value, "0" --do not use
xmlSaveFile ( info ) -- save the file
xmlUnloadFile( info ) -- unload it after use
outputChatBox ("Banking...")
end
addCommandHandler ("bank", createBankAccount )