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: Lorain - 2016. Február 26. - 16:04:16

Cím: Mire jó ez a script?!
Írta: Lorain - 2016. Február 26. - 16:04:16
Mire használható ez a kis script?
 
function checkData(dataName, oldValue)
if getElementType(source) == \"player\" then
  if dataName == \"bankmoney\" then
   local newValue = getElementData(source, \"bankmoney\")
   if oldValue == \"nil\" then
    local oldValue = \"~New Value~\"
   end
   if client == \"nil\" then
    local client = \"server\"
   end
   if isElement(client) then
    outputDebugString(\"Old Bankmoney for \"..getPlayerName(source)..\" \"..tostring(oldValue)..\" New value \"..tostring(newValue)..\" changed by: \"..tostring(getResourceName(sourceResource))..\" User changed by: \"..tostring(getPlayerName(client)))
   else
    outputDebugString(\"Old Bankmoney for \"..getPlayerName(source)..\" \"..tostring(oldValue)..\" New value \"..tostring(newValue)..\" changed by: \"..tostring(getResourceName(sourceResource))..\" User changed by: \"..tostring(client))
   end
  end
end
end
addEventHandler(\"onElementDataChange\", getRootElement(), checkData)
Cím: Mire jó ez a script?!
Írta: kundlam - 2016. Február 27. - 18:01:41
Lekérdez valami bankmoney cuccot, majd debugstringbe kiírja(/debugscript 3-ban láthatod)