Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MySQLConnection = dbConnect( "mysql", "dbname=ZEIStats;host=127.0.0.1", "root", "ESTO NO IMPORTA ._.", "share=0" )
- function updateRows()
- if MySQLConnection then
- dbExec(MySQLConnection,"DELETE FROM Scoreboard")
- for index, value in ipairs( getElementsByType("player")) do
- if isGuestAccount(getPlayerAccount(value)) then return end
- local Nombre = getPlayerName(value)
- local Trabajo = getElementData(value,"Trabajo") or "N/A"
- local Grupo = getElementData(value,"Grupo") or "N/A"
- local Dinero = getPlayerMoney(value)
- local ZombieKills = getAccountData(getPlayerAccount(value),"ZEIStats.ZKills") or 0
- local Pais = getElementData(value,"country") or "N/A"
- local Ping = getPlayerPing(value)
- local r,g,b = getPlayerNametagColor(value)
- local Color = r..','..g..','..b
- dbExec( MySQLConnection, "INSERT INTO Scoreboard VALUES (?,?,?,?,?,?,?,?)", Nombre, Trabajo, Grupo, Dinero, Pais, ZombieKills, Ping, Color )
- end
- end
- end
- setTimer(updateRows,120000,0)
- updateRows()
Advertisement
Add Comment
Please, Sign In to add comment