-
Posts
1,273 -
Joined
-
Last visited
-
Days Won
1
Everything posted by GTX
-
Are you sure? Maybe it's under the rectangle.
-
Example: Server: local logs = executeSQLQuery("SELECT * FROM logs") if #logs > 0 then triggerClientEvent("addLogs", root, logs) end Client: function addLogs(logs) for i, v in ipairs(logs) do guiGridListSetItemText(GridList, guiGridListAddRow(GridList), plrName, v.name, false, false) guiGridListSetItemText(GridList, guiGridListAddRow(GridList), plrMsg, v.message, false, false) end end addEvent("addLogs", true) addEventHandler("addLogs", root, addLogs)
-
function logginbtn(button,state) if (button == "left" and state == "up") then if (source == loginbtn) then loggingMenu() addEventHandler("onClientRender", root, dxlogin) end end end addEventHandler("onClientGUIClick", getRootElement(), logginbtn) This?
-
Nope, that code I sent you will return Lua array and you'll have to send it to client and then loop through it.
-
I read it more well than you. Do you want to show the buttons or no? Because I understood you so. Or your English sucks.
-
bindKey("F7", "down", "window")
-
Put your coordinates. EDIT: Marker = createMarker(x, y, z, "cylinder", 4.0, 255, 0, 0, 255)
-
You have 3 examples on wiki, although I don't prefer using interpolation on a GUI. This example is the closest: local g_Window = nil addCommandHandler("window", function () if g_Window then return end g_Window = {} local screenWidth, screenHeight = guiGetScreenSize() g_Window.windowWidth, g_Window.windowHeight = 400, 315 local left = screenWidth/2 - g_Window.windowWidth/2 local top = screenHeight/2 - g_Window.windowHeight/2 g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, "Interpolation on GUI", false) g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, "Close", false, g_Window.window) guiWindowSetSizable(g_Window.window, false) guiWindowSetMovable(g_Window.window, false) guiSetEnabled(g_Window.window, false) guiSetVisible(g_Window.window, false) g_Window.startTime = getTickCount() g_Window.startSize = {0, 0} g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight} g_Window.endTime = g_Window.startTime + 1000 addEventHandler("onClientRender", getRootElement(), popWindowUp) end) function on_closeBtn_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end if not g_Window then return end showCursor(false) guiSetEnabled(g_Window.window, false) guiWindowSetMovable(g_Window.window, false) local screenWidth, screenHeight = guiGetScreenSize() local posX, posY = guiGetPosition(g_Window.window, false) g_Window.startTime = getTickCount() g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight} g_Window.startCenter = { posX + g_Window.windowWidth/2, posY + g_Window.windowHeight/2, } g_Window.endSize = {0, 0} g_Window.endTime = g_Window.startTime + 1000 g_Window.endCenter = { screenWidth, screenHeight } addEventHandler("onClientRender", getRootElement(), popWindowDown) end function popWindowUp() local now = getTickCount() local elapsedTime = now - g_Window.startTime local duration = g_Window.endTime - g_Window.startTime local progress = elapsedTime / duration local width, height, _ = interpolateBetween ( g_Window.startSize[1], g_Window.startSize[2], 0, g_Window.endSize[1], g_Window.endSize[2], 0, progress, "OutElastic") guiSetSize(g_Window.window, width, height, false) local screenWidth, screenHeight = guiGetScreenSize() guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false) if not guiGetVisible(g_Window.window) then guiSetVisible(g_Window.window, true) guiBringToFront(g_Window.window) end if now >= g_Window.endTime then guiSetEnabled(g_Window.window, true) guiBringToFront(g_Window.window) removeEventHandler("onClientRender", getRootElement(), popWindowUp) addEventHandler("onClientGUIClick", g_Window.closeBtn, on_closeBtn_clicked, false) showCursor(true) guiWindowSetMovable(g_Window.window, true) end end function popWindowDown() local now = getTickCount() local elapsedTime = now - g_Window.startTime local duration = g_Window.endTime - g_Window.startTime local progress = elapsedTime / duration local width, height, _ = interpolateBetween ( g_Window.startSize[1], g_Window.startSize[2], 0, g_Window.endSize[1], g_Window.endSize[2], 0, progress, "InQuad") guiSetSize(g_Window.window, width, height, false) local centerX, centerY, _ = interpolateBetween ( g_Window.startCenter[1], g_Window.startCenter[2], 0, g_Window.endCenter[1], g_Window.endCenter[2], 0, progress, "InQuad") guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false) if now >= g_Window.endTime then removeEventHandler("onClientRender", getRootElement(), popWindowDown) destroyElement(g_Window.window) g_Window = nil end end
-
That will return a table, send it to client and then loop through it and add them to gridlist.
-
You mean how to fetch data? executeSQLQuery("SELECT * FROM logs")
-
How about post some code? Use triggerServerEvent -- Request data for client triggerClientEvent -- Send data from server to client guiSetText -- When data is sent to client, edit the texts
-
Firstly, wrong section. Secondly, no one will make script for you for free. Thirdly, if you can't find anything on community, you'll have to do script by yourself or ask for paid scripter (I doubt anyone will script it for free)
-
function onCommand(playerA, command, playerB) playerB = findPlayer(playerB) local xA, yA, zA = getElementPosition(playerA) local xB, yB, zB = getElementPosition(playerB) if getDistanceBetweenPoints3D(xA, yA, zA, xB, yB, zB) <= 10 then setElementFrozen(playerB, true) end end addCommandHandler("freezeB", onCommand) function findPlayer(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end
-
As your title says, interpolateBetween guiSetSize guiSetPosition
-
isObjectInACLGroup triggerClientEvent dxDrawImage
-
Why did you create new topic? And your code makes no sense. local markerSize = get"markerSize" addEventHandler("onResourceStart", resourceRoot, function() triggerClientEvent("receiveSettings", root, markerSize) end ) local MarkerSize = -0.1 addEvent("receiveSettings", true) addEventHandler("receiveSettings", root, function(markerSize) MarkerSize = markerSize end ) <meta> <info author="Michael" type="script" name="" description="" /> <script src="effect_c.lua" type="client" /> <script src="effect_s.lua" /> <settings> <setting name="*markerSize" value="markerSize" friendlyname="" group="" accept="" examples="" desc="" /> </settings> </meta>
-
It's quite easy, create a table like executeSQLQuery("CREATE TABLE IF NOT EXISTS logs (name TEXT, message TEXT)") Then you can insert the logs with executeSQLQuery("INSERT INTO logs (name, message) VALUES(?, ?)", getPlayerName(player), message)
-
Is blip even created? Your code looks fine, I can't help you from here.
-
From what I see, the blip should be deleted. Debug your code like getElementType(getElementData(source, "blp"))
-
Your database table is not created. Person who made this script should know the structure, ask him.
-
Just create buttons, once you click on the button (onClientGUIClick), use guiSetText and edit the editbox. Try to do it. Why don't you use createBlip server side where onPlayerWasted is?
-
It means you don't have table created. And read what I told you, don't just put the line I gave you somewhere. Your second error means you are not passing a player, but a string. Use getPlayerFromName