-
Posts
749 -
Joined
-
Last visited
-
Days Won
1
Everything posted by FlyingSpoon
-
Sorry "Master Scripter" no one is perfect like you. I'm still learning SQL scripting. Plus, I haven't scripted for a very long time, so it's a learning process. Also, giving hate to roleplay communities? I'm sure everyone is entitled to their own opinion. As well as that, this section is for helping not for giving your :~ty hate. It was a question I asked, simple. Update: I've figured it out how to delete rows, it's fine.
-
Amazing, thank you so much. One last question, if I make a button e.g.- delBtn = guiCreateButton( x, y ,z, "Delete", mainWin) How would I make it so, if the player clicks on one of the grid list item, and press delete, and it removes it from the DB/Gridlist at the same time?
-
Okay I've got 4 columns, ID, Name, Vehicle and Description. I want to display all of that from my database using mysql_query, how would I do that? CLIENT SIDE ------ function showStats() mainWn = guiCreateWindow(0.30, 0.15, 0.42, 0.69, "Las Barrancas Garage - View Orders", true) guiWindowSetMovable(mainWn, false) guiWindowSetSizable(mainWn, false) gridList = guiCreateGridList(0.02, 0.05, 0.96, 0.83, true, mainWn) guiGridListAddColumn(gridList, "ID", 0.2) guiGridListAddColumn(gridList, "Name", 0.2) guiGridListAddColumn(gridList, "Vehicle", 0.2) guiGridListAddColumn(gridList, "Description", 0.2) btnClose = guiCreateButton(0.77, 0.90, 0.21, 0.08, "Close", true, mainWn) end I want to display it onto my gridlist, I'm not sure how to do it, my friend helped me last time but I've forgotten. My MySQL table is called 'stats' - columns = id (auto_increment/primary) , name, vehicle, desc
-
How would I make it so, if the text goes out of the render target it disappears, like while scrolling up and down.
-
Can I have an example maybe? I don't get the dxDrawImage part, I did that on my own code, or did I do it wrong?
-
Not sure how I would do that, first time using render targets.
-
local x, y = guiGetScreenSize() local myRenderTarget = dxCreateRenderTarget(381, 419, true) local offset = 0 showCursor(true) function lobby() if myRenderTarget then dxSetRenderTarget( myRenderTarget, true ) dxSetRenderTarget() dxDrawRectangle(432 , 134 , 381, 419, tocolor(0, 0, 0, 164), false) --- DX Background dxDrawImage(432, 134, 381, 419, myRenderTarget, 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("THIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT\nTHIS IS SOME RANDOM TEXT", 443, 149+offset, 803, 537, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawRectangle(878, 70, 22, 530, tocolor(68, 68, 68, 255), false) -- DX Scroll end end addEventHandler("onClientRender", root, lobby) function scrollUP() offset = offset - 5 end function scrollDOWN() offset = offset + 5 end bindKey("mouse_wheel_up","down",scrollUP) bindKey("mouse_wheel_down","down",scrollDOWN) How can I make it so, it doesn't just scroll out of the screen and scrolls only until the end of the 'DX Background' and disappears, and how do I make the 'DX Scroll' so the person can click on the rectangle and scroll up and down using or using the scroll on their mouse.
-
I've got this script, I've edited the main chat, but commands dont work anymore, like ./reconnect ./disconnect ./quit etc, How can I enable them again? When I type, it just outputs the message e.g. RayZ says: /reconnect addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"t","down","chatbox","Say") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"t","down","chatbox","Say") end end) function sayChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local players = getPlayerName(player) nick = tostring ( players ):gsub( "_", " " ); for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) and isPedInVehicle ( player ) then outputChatBox("[Vehicle] "..nick.." says: "..msg,v,255,255,255,true) elseif isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox(""..nick.." says: "..msg,v,255,255,255,true) end end outputServerLog("[Local]: "..nick.." says: ".. msg) end addCommandHandler("Say", sayChat)
-
(Line 2) attempt to index global 'connection' (a userdata value)
-
Don't work But result is returned as 0 when logged in
-
I've used -1 too, still lags out the server. And there's not outputs to the debug either. It works perfectly fine for 1 or 2 players. But once 3+ players join and they click on 'Login' nothing actually happens, and it just crashes the server. I have a pretty powerful host, so I know host isn't an issue.
-
Yeah it runs, still crashes the server. Just freezes.
-
serverContainer.loginClient = function(user, pass) local qh = dbQuery(serverContainer.connection,'SELECT * FROM mybb_users WHERE username = ?',user) local result, row, errmsg = dbPoll ( qh, 5000 ) if row < 0 then for id, result in ipairs(result) do local salt = result['salt'] local username = result['username'] local password = result['password'] if salt and username and password then local newPass = md5(md5(salt):lower()..md5(pass):lower()):lower() if newPass == password then triggerClientEvent(source,'onClientSuccessfullyLogin',source) userData("success", player, user, pass) end end end end end addEvent('onClientLogins', true) addEventHandler('onClientLogins', root, serverContainer.loginClient) 'if row <0' : Attempt to compare number with nill - Server lags, and times out each time someone logs in. Any ideas?
-
21: attempt to perform arithemtic on upvalue 'y' (a nil value) 20: Bad argument @'dxDrawRectangle' [Expected vector2 at argument 1, got boolen] 18: Bad argument @'interpolateBetween' [Expected easing-type at argument 8, got none]
-
Well it's my first time using interpolate, not really sure where to start - addEventHandler("onClientRender", root, function() dxDrawRectangle(390, 173, 422, 424, tocolor(0, 0, 0, 217), false) dxDrawRectangle(390, 169, 422, 21, tocolor(52, 78, 208, 255), false) dxDrawText("Welcome to the server\nWelcome\nEnjoy\nSome random text", 424, 241, 752, 558, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end ) This is my code. I want to swipe it in from the right to the centre.
-
dxDrawRectangles and some dxDrawText's
-
What if I want to move multiple DX, what would be the easiest way using this function?
-
How do I animate a couple of DX things together, like swipe smoothly from the right to the centre of the screen, any examples?
-
That was random, I am trying to get my DX to fit on all screens.
-
Tried it, same problem.
-
I used GUIEditor, and set some images and DX to relative so it fits on others screens. But it appears very weird and distorted. How can I make it so it fits on everyone's screen - local screenW, screenH = guiGetScreenSize() dxDrawImage(screenW * 0.1727, screenH * 0.1833, screenW * 0.1953, screenH * 0.3472, "img1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.4047, screenH * 0.1833, screenW * 0.1953, screenH * 0.3472, "img2.png, 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.6414, screenH * 0.1833, screenW * 0.1953, screenH * 0.3472, "img3.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.2898, screenH * 0.5306, screenW * 0.1953, screenH * 0.3472, "img4.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.5227, screenH * 0.5306, screenW * 0.1953, screenH * 0.3472, "img5.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
-
local texts = { {"Text 1"}, {"Text 2"}, {"Text 3"}, {"Text 4"}, {"Text 5"}, } dxDrawText("", screenW * 0.3555, screenH * 0.7014, screenW * 0.6414, screenH * 0.8403, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) How would I set a timer for 8 seconds, to go through all the texts in the 'texts table' ?
-
PugetServers | CHEAP GAMESERVERS | NOW Offering 50% DISCOUNT
FlyingSpoon replied to PugetServers's topic in Hosting solutions
Come on stop hating, people are trying to make a living here. I am loving the service so far, it's not been a problem for me. I've had a Scripting Server and for at least a while now, and I've seen no lag, or down-time. It's really fast even though it's in the US. -
PugetServers | CHEAP GAMESERVERS | NOW Offering 50% DISCOUNT
FlyingSpoon replied to PugetServers's topic in Hosting solutions
** BUMP ** Great service, love their hosting, reliable fast, and so far no problems. Ultra fast, even though I live far from the United States, pings are stable and can hold many players. Great service, would recommend.
