-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
You should use dbExec for INSERT as you aren't selecting anything, therefore there will not be any return and you will not have to use dbFree nor dbPoll. If you used dbQuery for INSERT, you will also need to use dbFree as this showed in wiki example. I don't know what will happen if you didn't used dbFree, but i think the database could be locked or something.
-
This is just to make you able to put the string after the comma. So this: dbExec( connection, "UPDATE `??` SET `??`=?", tableName, columnName, columnValue ) Is the same as this: dbExec( connection, "UPDATE `tableName` SET `columnName`=columnValue" )
-
هههههههههههههههههه البندر لو تجلس معه من اليوم لين 20 سنة قدام ما راح يقتنع نفس سالفه النجوم و اتوقع للحين ما اقتنع
-
شوف هو يقول لازم يعني يقصد اجباري عشان يطلق سي بق لازم يسوي الأعدادات بينما في الحقيقة الأعدادات مالها علاقة، ذي يستخدمونها النوبات الي ما يعرفون يسون سي بق
-
http://lua-users.org/wiki/StringLibraryTutorial
-
-- Server Side -- bTimes = {} addEventHandler("onBan", root, function() if getElementType(source) == "player" then bTimes[source] = bTimes[source] and ((bTimes[source] or 0) + 1) or bTimes[source] = 1 if bTimes[source] >= 3 then banPlayer(source, false, false, true, root, "سبب الباند") end end end) addEventHandler("onPlayerQuit", root, function() if bTimes[source] then bTimes[source] = nil end end)
-
وش دخل الأعدادات!!!
-
لا اول شي تصوب بعدين تفك التصويب بعدين تطلق بعدين تفك زر الطلق بعدين تضغط سي بعدين تفك السي و بعدين تصوب و هكذا كل ذا تسويه بسرعة و تكرر ولا تنسى تمسك زر الأسهم عشان ما يجلس اللاعب
-
exports.scoreboard:addScoreboardColumn("Money") function setMoney() local Serial = getPlayerSerial(source) local data = dbPoll(dbQuery(server, "SELECT money FROM accounts WHERE serial = ?", Serial), -1) if data and type(data) == "table" and #data > 0 then setPlayerMoney(source, data[1]["money"]) setElementData(source, "Money", data[1]["money"]) else dbExec(server, "INSERT INTO accounts VALUES (?, ?)", Serial, "0") setElementData(source, "Money", 0) end end addEventHandler("onPlayerJoin", root, setMoney) Use UPDATE if you want change existing value. http://www.w3schools.com/sql/sql_update.asp
-
No, When you select the row there might be more than one row so we select the first row in the table which [1].
-
exports.scoreboard:addScoreboardColumn("Money") function setMoney() local Serial = getPlayerSerial(source) local data = dbPoll(dbQuery(server, "SELECT money FROM accounts WHERE serial = ?", Serial), -1) if data and type(data) == "table" then setPlayerMoney(source, data[1]["money"]) setElementData(source, "Money", data[1]["money"]) end end addEventHandler("onPlayerJoin", root, setMoney)
-
local data = dbPoll(dbQuery(server, "SELECT 'money' FROM 'accounts' WHERE serial = '"..serial.."' "), -1) setPlayerMoney(player, data[1]["money"])
-
So how would i setPlayerMoney when retrieving this information? local playermoney = dbQuery ( server, "SELECT 'money' FROM 'accounts' WHERE serial = '"..serial.."' " )
-
You can use WHERE clause to select specific row. http://www.w3schools.com/sql/sql_where.asp
-
I don't understand, can you post your code?
-
Have you already got the MySQL connected? dbConnect If you want to get certain value you need to use SELECT. http://www.w3schools.com/sql/sql_select.asp
-
aim + fire + c + aim + fire + c + aim + fire + c + و كذا
-
The table will not be updated, you should move the table inside the function.
-
addEventHandler ( "onClientRender", root, function ( ) if ( guiGetVisible ( GUIEditor.window[1] ) ) then local TotalPlayer = #getElementsWithinColShape(getElementColShape(marker), "player") guiSetText ( GUIEditor.label[1], "player: "..TotalPlayer) end end )
-
The right event would be onClientResourceStart.
