Dice
Members-
Posts
103 -
Joined
-
Last visited
Everything posted by Dice
-
blackband1 = engineLoadTXD("bandblack.txd") engineImportTXD(blackband1,30217) banddff = engineLoadDFF("bandana.dff",30217) engineReplaceModel(banddff,30217) Why is this crashing? regarding this https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs
-
Thanks TAPL works great. I don't get the dummy variable tho.
-
function sendListToPlayer() tbl = guiGridListGetSelectedItems ( newrlist ) for k,v in pairs ( tbl ) do selName = guiGridListGetItemText ( newrlist, tbl[k].row, 1 ) selUrl = guiGridListGetItemText ( newrlist, tbl[k].row, 2 ) outputChatBox ( selName .. " " .. selUrl ) end end example problem, when function executes if the selName is "who" and selUrl is "where" then it ouputs who where who where even though i only have one item selected. again i know why it is happening but i dont know how to fix it. I have 2 columns and multiple rows, I want to input the items selected in a table as so. the problem is, they keep printing more than once. and the reason is , because for every item seleceted. It does guiGridListGetItemText 4 times if 2 rows are selected because ( 1 row, 1 column ) and ( 1 row, 1 column ). but I don't want it to do that. I only want it to do it once and output it once.
-
Thank U! btw destroyElement is not fine.
-
what? That's not the problem here. It closes fine. The problem is i have so many windows open, once i close one it ignores the rest of them.
-
dialogs = {} function createAttentionDialog ( text ) index = index + 1 if not dialogs[index] then dialogs[index] = {} else return createAttentionDialog ( text ) end local screenW, screenH = guiGetScreenSize() -- tabs = #dialogs[index] + 1 dialogs[index].window = guiCreateWindow((screenW - 386) / 2, (screenH - 185) / 2, 386, 185, "Attention!", false) -- guiWindowSetSizable(dialogs[1].window, false) dialogs[index].okbutton = guiCreateButton(87, 127, 89, 24, "OK", false, dialogs[index].window) dialogs[index].lbl = guiCreateLabel(15, 27, 355, 85, text, false, dialogs[index].window) guiSetFont(dialogs[index].lbl, "clear-normal") guiLabelSetHorizontalAlign(dialogs[index].lbl, "center", true) guiLabelSetVerticalAlign(dialogs[index].lbl, "center") dialogs[index].cancelbutton = guiCreateButton(198, 127, 89, 24, "Cancel", false, dialogs[index].window) dialogs[index].chk = guiCreateCheckBox(128, 156, 117, 15, "Disable requests", false, false, dialogs[index].window) guiSetFont( dialogs[index].chk, "default-bold-small") addEventHandler ( "onClientGUIClick", dialogs[index].okbutton, function ( ) _destroyElement ( dialogs[index].window ) end ,false ) end A friend put me in charge of a part of a script. and i don't know how to make it so for each window it creates, i can press ok to close eacch one. Right now it works but i can only close the most current ones. the rest stay open adn when i press ok on them it says destroyElement ( bad pointer ). my friend patched _destroyElement so dont worry about that
-
for i = 1,#tab do outputChatBox ( tab[i][1] .. " " .. tab[i][2] ) end
-
yeah I know that method but the thing is, I am using table.insert so the sizes can vary, how can i make sure it gets it all.
-
example tab = { { "nme", "text"}, { "nme2", "text2"}, { "nme3", "text3"} } I want to print nme, txt for each table.
-
well it was a custom button, dxDraw wouldn't be the best. oh well thanks!
-
static images? not setElementRotation. What else can i use?
-
when maximize is clicked... setTimer ( function() local x, y = guiGetSize ( win, false ) if y <= 537 then guiSetSize ( win, x, y + 0.04, false ) end end, 50, 0 ) the code literally does nothing. would onClientRender do the trick?
-
Doesn't work! Everytime i use these functions it's the same problem
-
i know. this is clientsided btw. Test="12345"
-
That's it really. 'filename' is already in the file.
-
filesxml = xmlLoadFile ( "files.xml" ) if filesxml then aChild= xmlFindChild ( filesxml, "sav", 0 ) else aChild = xmlCreateFile ( "files.xml", "sav" ) xmlSaveFile ( aChild ) end function removething( gridlist, name, row, col ) guiGridListRemoveRow ( gridlist, row ) delete = xmlFindChild ( aChild, "filename", 0 ) -- bad argument here @ xmFindChild outputChatBox ( name .. " removed!" ) end in function removething. btw 'filename' gets created from another function it exists. The problem is aChild why does it keep doing bad argument here @ xmFindChild at line 12. I know it exists!!
-
function triggerSwarm( myName ) runningStreaks[player] = getPlayerFromName ( myName ) runningStreaks[player].x, runningStreaks[player].y, runningStreaks[player].z = getElementPosition ( runningStreaks[player] ) end I tested myName with outputChatBox and it passes from client to server successfully.
-
OK i cant figure this out..I been at it for awhile lol
-
trigonometry is not my thing anyone know wats uP? It does a slight curve but not in a circle for sure. function cycle() a, b, c, d, e, f = getCameraMatrix() local px, py, pz = getElementPosition(localPlayer) if not startAngle then startAngle = math.atan2 ( lx, ly ) end newAngle = startAngle + math.rad ( 360 ) nAx = math.sin ( newAngle ) * 0.2 + a nAy = math.cos ( newAngle ) * 0.2 + b setCameraMatrix(nAx, nAy, c, lx, ly, lz, 0, 0) sX, sY, wX, wY, wZ = getCursorPosition () hit, Bx, By, Bz, elementHit = processLineOfSight ( a, b, c, wX, wY, wZ ) setElementPosition ( targetMarker, Bx, By, Bz ) end
-
addEvent( "settings", true ) function dxSizeFromSettings(dxSize) newDxSize = tonumber(dxSize) end addEventHandler ( "settings", root, dxSizeFromSettings ) dxSize = get( "dxtextsize" ) triggerClientEvent ( "settings", root, dxSize ) function settingsOnJoin() triggerClientEvent ( source, "settings", source, dxSize ) end addEventHandler ( "onPlayerJoin", root, settingsOnJoin ) why does it keep fuckin saying that event is not added client sided
-
ok i still dont know how to do it.
-
Then how can this be done.
-
what will pngs do?? i cant create a shader unless its in a .fx format??