GTA Közösség - A magyar GTA fórum

Multi Theft Auto (MTA) => MTA: Szerverfejlesztés => Archívum => A témát indította: asdpudingasd - 2014. Október 16. - 09:42:24

Cím: /givemoney bug
Írta: asdpudingasd - 2014. Október 16. - 09:42:24
Hello! Valamiért nem müködik a /givemoney se a /setmoney. Mit tegyek?  a Segítségeteket előre köszönöm!
function setMoney(thePlayer, commandName, target, money)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
   local money = tonumber((money:gsub(\",\",\"\")))
   if not (target) then
      outputChatBox(\"SYNTAX: /\" .. commandName .. \" [Partial Player Nick] [Money]\", thePlayer, 255, 194, 14)
   else
      local username = getPlayerName(thePlayer)
      local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, target)
      if targetPlayer then
         exports.logs:dbLog(thePlayer, 4, targetPlayer, \"SETMONEY \"..money)
         exports.global:setMoney(targetPlayer, money)
         outputChatBox(targetPlayerName .. \" now has \" .. exports.global:formatMoney(money) .. \" $.\", thePlayer)
         outputChatBox(\"Admin \" .. username .. \" set your money to \" .. exports.global:formatMoney(money) .. \" $.\", targetPlayer)
      end
   end
end
end
addCommandHandler(\"setmoney\", setMoney, false, false)
function giveMoney(thePlayer, commandName, target, money)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
   local money = tonumber((money:gsub(\",\",\"\")))
   if not (target) then
      outputChatBox(\"SYNTAX: /\" .. commandName .. \" [Partial Player Nick] [Money]\", thePlayer, 255, 194, 14)
   else
      local username = getPlayerName(thePlayer)
      local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, target)
      if targetPlayer then
         exports.logs:dbLog(thePlayer, 4, targetPlayer, \"GIVEMONEY \" ..money)
         exports.global:giveMoney(targetPlayer, money)
         outputChatBox(\"You have given \" .. targetPlayerName .. \" $\" .. exports.global:formatMoney(money) .. \".\", thePlayer)
         outputChatBox(\"Admin \" .. username .. \" has given you $\" .. exports.global:formatMoney(money) .. \".\", targetPlayer)
      end
   end
end
end
addCommandHandler(\"givemoney\", giveMoney, false, false)
Cím: /givemoney bug
Írta: Toxic - 2014. Október 16. - 09:51:33
Logban mit ír?
Cím: /givemoney bug
Írta: Xenius - 2014. Október 16. - 18:10:02
A hiba oka: Valhalla
Cím: /givemoney bug
Írta: skyLine - 2014. Október 16. - 18:54:57
Azért valami [code*] tagek közé berakhattad volna, mert így elég átláthatatlan.
Cím: /givemoney bug
Írta: Toxic - 2014. November 06. - 18:58:42
[mod]Elavult, zárom.[/mod]