Szerző Téma: Hiba a kóddal  (Megtekintve 842 alkalommal)

Hiba a kóddal
« Dátum: 2014. Március 31. - 20:57:19 »
0
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 = getPlayerMoney(thePlayer)
if (safemoney < hackmoney) then
setPlayerMoney(thePlayer, safemoney)
sendMessageToAdmins(\"Moneyhack gyanú: \"..getPlayerName(thePlayer))
return true
else
return false
end
end

 
Sziasztok, ezzel a scriptel mi lehet a gond? Hibát jelez állandóan :S
Hiba:
 
Bad argument @ \'getElementData\' [Exepted element at argument 1, got a boolean value]
Bad argument @ \'getElementType\' [Exepted element at argument 1, got a boolean value]

 
Egyépként shodown modot használok.

Hiba a kóddal
« Válasz #1 Dátum: 2014. Április 01. - 15:28:09 »
0
Ahol használva van, ott a játékos változója bele van írva / jó változó van bele írva?

Hiba a kóddal
« Válasz #2 Dátum: 2014. Március 31. - 20:57:19 »
0
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 = getPlayerMoney(thePlayer)
if (safemoney < hackmoney) then
setPlayerMoney(thePlayer, safemoney)
sendMessageToAdmins(\"Moneyhack gyanú: \"..getPlayerName(thePlayer))
return true
else
return false
end
end

 
Sziasztok, ezzel a scriptel mi lehet a gond? Hibát jelez állandóan :S
Hiba:
 
Bad argument @ \'getElementData\' [Exepted element at argument 1, got a boolean value]
Bad argument @ \'getElementType\' [Exepted element at argument 1, got a boolean value]

 
Egyépként shodown modot használok.

Hiba a kóddal
« Válasz #3 Dátum: 2014. Április 01. - 15:28:09 »
0
Ahol használva van, ott a játékos változója bele van írva / jó változó van bele írva?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal