Szerző Téma: ZEROMTA 99millió helyett 999milliárd  (Megtekintve 1434 alkalommal)

ZEROMTA 99millió helyett 999milliárd
« Dátum: 2015. Május 03. - 12:24:04 »
0 Show voters
Sziasztok!Hogyan tudom megoldani azt ,hogy 99millió helyett a játékosnak 999milliárd-ja lehet ?

ZEROMTA 99millió helyett 999milliárd
« Válasz #1 Dátum: 2015. Május 03. - 12:42:15 »
0 Show voters
ElementDatával tudod megcsinálni.

ZEROMTA 99millió helyett 999milliárd
« Válasz #2 Dátum: 2015. Május 03. - 12:45:00 »
0 Show voters
És ezt leírnád ,hogy hol tudom átírni?((zeroban))

ZEROMTA 99millió helyett 999milliárd
« Válasz #3 Dátum: 2015. Május 03. - 13:28:15 »
0 Show voters
Azt hiszem zeroban a global/money_globals.lua vagy valami hasonló és ott a különféle funkciókban, mint pl. A hasMoney, giveMoney, takeMoney. És kész is.

ZEROMTA 99millió helyett 999milliárd
« Válasz #4 Dátum: 2015. Május 03. - 15:37:24 »
0 Show voters
Bocsi ,hogy ilyen értetlen vagyok de bemásolnád azt a kódot es elmondanád melyiket irjam at?Vagy leirnad hanyadik sor.~telo.

ZEROMTA 99millió helyett 999milliárd
« Válasz #5 Dátum: 2015. Május 03. - 19:27:39 »
0 Show voters
Ha átalakítod a Zerot akkor így néz ki:
 

mysql = exports.mysql
function giveMoney(thePlayer, amount)
amount = tonumber( amount ) or 0
if amount == 0 then
return true
elseif thePlayer and isElement(thePlayer) and amount > 0 then
amount = math.floor( amount )
if tonumber(amount) > 0 then
end
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"money\", getMoney( thePlayer ) + amount, false )
if getElementType(thePlayer) == \"player\" then
   mysql:query_free(\"UPDATE characters SET money = money + \" .. amount .. \" WHERE id = \" .. getElementData( thePlayer, \"dbid\" ) )
   setElementData(thePlayer, \"money\", amount)
elseif getElementType(thePlayer) == \"team\" then
   mysql:query_free(\"UPDATE factions SET bankbalance = bankbalance + \" .. amount .. \" WHERE id = \" .. getElementData( thePlayer, \"id\" ) )
end
return true
end
return false
end
function takeMoney(thePlayer, amount, rest)
amount = tonumber( amount ) or 0
if amount == 0 then
return true, 0
elseif thePlayer and isElement(thePlayer) and amount > 0 then
amount = math.ceil( amount )
local money = getMoney( thePlayer )
if rest and amount > money then
   amount = money
end
if amount == 0 then
   return true, 0
elseif hasMoney(thePlayer, amount) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"money\", money - amount, false )
   if getElementType(thePlayer) == \"player\" then
      mysql:query_free(\"UPDATE characters SET money = money - \" .. amount .. \" WHERE id = \" .. getElementData( thePlayer, \"dbid\" ) )
      setElementData(thePlayer, \"money\", amount)
      local ujpenz = getMoney( thePlayer )
      if ujpenz > 0 then
      end
   elseif getElementType(thePlayer) == \"team\" then
      mysql:query_free(\"UPDATE factions SET bankbalance = bankbalance - \" .. amount .. \" WHERE id = \" .. getElementData( thePlayer, \"id\" ) )
   end
   return true, amount
end
end
return false, 0
end
function setMoney(thePlayer, amount, onSpawn)
amount = tonumber( amount ) or 0
if thePlayer and isElement(thePlayer) and amount >= 0 then
amount = math.floor( amount )
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"money\", amount, false )
 
if tonumber(amount) > 0 then
end
if getElementType(thePlayer) == \"player\" then
   if not onSpawn then
      mysql:query_free(\"UPDATE characters SET money = \" .. amount .. \" WHERE id = \" .. getElementData( thePlayer, \"dbid\" ) )
   end
   setElementData(thePlayer, \"money\", amount)
elseif getElementType(thePlayer) == \"team\" then
   mysql:query_free(\"UPDATE factions SET bankbalance = \" .. amount .. \" WHERE id = \" .. getElementData( thePlayer, \"id\" ) )
end
return true
end
return false
end
function hasMoney(thePlayer, amount)
amount = tonumber( amount ) or 0
if thePlayer and isElement(thePlayer) and amount >= 0 then
amount = math.floor( amount )
return getMoney(thePlayer) >= amount
end
return false
end
function getMoney(thePlayer, nocheck)
if not nocheck then
checkMoneyHacks(thePlayer)
end
return getElementData(thePlayer, \"money\") or 0
end
function checkMoneyHacks(thePlayer)
if not getMoney(thePlayer, true) or getElementType(thePlayer) ~= \"player\" then return end
local safemoney = getMoney(thePlayer, true)
local hackmoney = getElementData(thePlayer, \"money\")
if (safemoney < hackmoney) then
setElementData(thePlayer, \"money\", safemoney)
sendMessageToAdmins(\"Moneyhack gyanú: \"..getPlayerName(thePlayer))
return true
else
return false
end
end

ZEROMTA 99millió helyett 999milliárd
« Válasz #6 Dátum: 2015. Május 04. - 16:24:27 »
0 Show voters
Sajnos nekem így nem működik vvel a kóddal .nem kérdezi le a pénzt és nem is tudok giveolni

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal