
Animan99
Members-
Posts
43 -
Joined
-
Last visited
Everything posted by Animan99
-
and how to make memo like dxSetRenderTarget? and how to make a memo scrollable?
-
I have a problem. i have the chat part with GUI and this is my problem: http://kepfeltoltes.hu/150623/mta-scree ... es.hu_.png you can see some messages are out of the phone. i can do with dxSetRenderTarget but its GUI and i dont know how to do that are the messages are scrollable and inside the phone. Please, help me Thanks
-
this is my full code contains the part i need
-
Hi. I am working on a phone system, doing the chat part right now. I want my GUI shown for my partner i am talking with. I tried this method, dont work. function gui() for k, v in ipairs(getElementsByType ("player")) do if getElementData(localPlayer, "phone") == "goingCall" and getElementData (v, "phone") == "goingCall" then guiCreateLabel(--labelstuff) -- should draw the label, only draws for the local player end end end THX for your help
-
ok, then what is your problem? i showed you how to add number in table and write out the table numbers.
-
add a number to the table like this: local numberTable = {} addEventHandler("onClientGUIClick", Button1, function() if #numberTable < 6 then table.insert(numberTable, 1) end end) i dont know why are you using edit box, just simply write out with a label. You can write out like this: addEventHandler("onClientRender", root, function() dxDrawText(table.concat(numberTable), --rest of dxText) end) Or you can use guilabel or set the text of the edit box without onClientRender.
-
I just solved it Thx for your help guys i have a few more question, ill ask later.
-
my next problem is i cannot destroy the GUI When i click on the send button, creates a GUI label. if i try to destroy it, the last label dissapears, the rest of messages are stay there.
-
I made it with GUI, but i cannot destroy it. When i click on the send button, creates a GUI label. if i try to destroy it, the last label dissapears, the rest of messages are stay there. Thanks for your help
-
This isn't my problem. My problem with the loop, because i use for loop to get the value of the tables and if i use this, the messages are all moves. i want that when i send a message that message down from the previous one. All the messages are in one table, that is why i ant separate them from eachother.
-
if you can tell me another way of making this chat part, it will good, but i have no idea how to do this.
-
When i use this, both messages are moves in the table. i want always the last moves down from the previous 10 pixels.
-
it loops through callMessages table, and i dont know how to separate them. Can you explain it, how to use in my code ?
-
when i send a message it moves correctly, but when i send another one, the second and the first message are at the same position, i want that the second msg move down 10 px from the previous one. http://kepfeltoltes.hu/150622/mta-scree ... es.hu_.png on the photo you can see the 2 messages are at the same pos. Sorry for my bad english, hope you can understand now. (Yes, sends to everyone, i didn't finished it yet)
-
Hi. I am writing my own (First) phone system, i am learning LUA about 2 months. I advance nicely with the phone, but i have a little problem with the chat part. When i click on the "send" button, this code runs: -- this code adds a value to the table, that i will loop through in the next code. function sendCallMSG(msg) for _, player in pairs(getElementsByType("player")) do targetPlayer = player msgFrom = getElementData(localPlayer, "phoneNumber") msgTo = getElementData(targetPlayer, "phoneNumber") theMsg = tostring(msg) callMessages[#callMessages + 1] = theMsg setElementData(targetPlayer, "char.tempCall", {msgFrom, msgTo, theMsg}) renderData.msgCounter = renderData.msgCounter + 1 --renderData.currentRow = renderData.currentRow + 1 break end end And the second code loops the "callMessages" table, and write out the value: if getElementData(localPlayer, "phone") == "goingCall" then dxDrawImage(X, Y + 35, Width, Height, "files/ongoingcall.png") renderData.smsLatestLine = renderData.currentRow + renderData.maxRow - 1 for k,v in ipairs(callMessages) do if k >= renderData.currentRow then if k <= renderData.smsLatestLine and v then renderData.smsDrawX = X + 70 renderData.smsDrawY = Y + 125 + (renderData.sorokKozKihagyas * (renderData.uzenetSzamolo - 1)) -- this is the important thing, this moves the value, but my problem is when i click again the send button all the values are moving with this. I want that the values are move 10 pixels down from the previous value, but all the messages are moving. if vanUjSzoveg == true then renderData.smsDrawY = renderData.uzenetSzamolo * 10 end dxDrawText(string.gsub(v, "_", " "), renderData.smsDrawX, renderData.smsDrawY, 50, 0, tocolor(255, 255, 255, 255), 2, "arial", "left", "top", false, true, true) end end end end So, basically, I want that the values are move 10 pixels down from the previous value. Thank you, i will be so glad if you guys can help me
-
Actually working, Thanks!
-
I tried this, and my MTA is crashed. Thanks for trying to help, but it is not working
-
Hello guys! I need help. I am writing a simple marker-job, and it is working fine. My problem is, when i hit the last marker, the job is over. I mean, i want to do, that when i hit the last marker and earn money, then the code begins again from the start. (i hope you understand, i am pretty bad at english ) so, i made an example code, because my whole job script is way to complicated to understand (for me, not you) and it is easier if you explain it for this code. (i googled it found nothing.) Here is my example code: (client side) marker1 = createMarker(1213.9326171875, -1340.8984375, 13.571063995361, "cylinder", 2, 255, 0, 0, 150) marker2 = createMarker(1214.1376953125, -1309.7197265625, 13.557456016541, "cylinder", 2, 255, 0, 0, 150) marker3 = createMarker(1214.1376953125, -1309.7197265625, 13.557456016541, "cylinder", 2, 255, 0, 0, 150) function hit1 (thePlayer) if thePlayer == getLocalPlayer() then destroyElement(marker1) end end function hit2 (thePlayer) if thePlayer == getLocalPlayer() then destroyElement(marker2) end end function hit3 (thePlayer) if thePlayer == getLocalPlayer() then -- then the code starts again from the beginning. end end addEventHandler("onClientMarkerHit", marker1, hit1) addEventHandler("onClientMarkerHit", marker2, hit2) addEventHandler("onClientMarkerHit", marker3, hit3) so, if i am hit the third marker, i want the whole script starts from the beginning, so there will be 1st and 2nd marker visible, hope you understand, and you can help me, Thanks.