Jump to content

[HELP] get player serial


freudo

Recommended Posts

That's my problem ;

getPlayerSerial [Expected player at argument ..]

local function createLocalTopTable(player,map)
	if isElement(player) then
		local table = {false}
		local pSerial = getPlayerSerial(player)
		outputChatBox(tostring(pSerial)) -- nil
		local query = dbQuery(DBConnection,"SELECT * FROM '??' WHERE serial = ? LIMIT 1", map, pSerial)
		local result, row, err = dbPoll(query,-1)
		if ( type ( result ) == "table" and #result > 0 or not result ) then 
				outputChatBox("buraya kadar geldin")
				if getElementData(player,"map").type == "Cross" or getElementData(player,"map").type == "Shooter" then
					outputChatBox("burası dd")
					local mark
					if getTopWins(result[1].wins,map) > 8 then
						mark = true
						outputChatBox("toptimes pozisyonun 8 den büyük")
					else
						outputChatBox("toptimes pozisyonun 8 den küçük")
						mark = false
					end
					table = {result[1].wins,result[1].name,result[1].date,result[1].flag,getTopWins(result[1].wins,map),mark}
				else
					outputChatBox("burası dm")
					local mark
					if getTopPos(result[1].timeMS,map) > 8 then
						mark = true
						outputChatBox("toptimes pozisyonun 8 den büyük")
					else
						outputChatBox("toptimes pozisyonun 8 den küçük")
						mark = false
					end
					table = {result[1].time,result[1].name,result[1].date,result[1].flag,getTopPos(result[1].timeMS,map),mark}
				end
		end
		return table
	end
end

 

Edited by barikat
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...