Jump to content

ikvindmooi

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by ikvindmooi

  1. Oh yeh, didn't think about that xd, thank you.
  2. Hello, I do have a question about calling an exports. I have an export to add profiles to an xml file the export is: exports.XML:addProfileToXML(id, username); Now I want to use this export event in an javascript function, but it is not triggering the function. It does work if I try to export it clientside but it doesn't in js. I tried using it with or without the "exports.XML:" but it doesnt work mta.triggerEvent("exports.XML:addProfileToXML", id, username); mta.triggerEvent("addProfileToXML", id, username);
  3. I do have one more question. I do have the panel working, but this looks kinda ugly when it's changing directly. I want it like going smooth. I guess I have to use timers for that but I don't know how to imply that in the script. Like it adds +5 for 3/4 seconds then stop every time I click the button. Anyone can help me? EDIT: I fixed the part that it's going more smooth but now it doesn't stop. it keeps rotating. EDIT2: NVM I fixed it myself with setTimer and killTimer
  4. Thanks guys! @IIYAMA Ik snap het al door de voorbeelden, alsnog bedankt.
  5. Yes that would be better, but it's not a loading thing, I'm just trying to make like a game where you need to find the right path. like when you click on it it turns a bit something like this: but instead of the pieces sliding it will turn and you need to find the right way. EDIT: Offtopic: Is it possible to add different scale's in dxDrawText? Like at the text part the first letters will be bigger then the rest, or i need to make two different texts
  6. I was looking for the second methode, thanks it worked, but this one is only with 2 options i want 3/4 options like it's go in a circle, i guess you can't do that with this because there's just 2 options, true and false. I got this so far,
  7. Hello guys, I'm trying to make a panel where you can rotate a circle image when you click space key so I have this image I want like when you click on 'space' the image will rotate like 90 degrees. I tried some ways by my own with rot = 21+90 and stuff but it didn't work. I don't know how to attach the bindkey with the rotation anyone can help me out? Thanks.
  8. That login is just an button, i have another functiom which draws the panel itself. This one draws the the panel for when i click on the login button
  9. nvm fixed it. it was the dxDrawRectangle at the other function its postGUI was true
  10. Hello, I do have a question about a panel I've made in DX. I want this panel to show at the center of the screen at every resolution but i can not manage to get it. Now it does show up and it works, but it's not at the same place at the middle. at lowest resolution its in the middle, but with higher resolutions it is opening at the left side of the screen. I did tried to make a new local guiGetScreenSize and add it to the DX GUI then the GUI does work but the color does not change when i get to the login text. EDIT: There's no error in debug. Thanks, Held
  11. I've got another question. I got a panel, and some buttons. These are supposed to open a panel when you click at one it also works. But, I want it for example if you click on LS button the ls panel appear, but if you click on LV button, LS panel will disappear and the LV one will appear. Script i've so far. This opens the panel but when you click on the other one that one opens as well, but i want the previous one closed if you click on another one.
  12. And what about Login, onPlayerLogin command is only for server side.
  13. EDIT:: I've got another problem.. debug: lua:4: attempt to call global 'drawPanel' (a nill value) I've moved the eventhandlers to the clientside. When I die that error comes and when I login as well. The codes so far. ServerSide: ClientSide: I've read that I need to use SetTimer, but I don't know how I can apply it to the script.
  14. hello guys, I'm creating a panel which should appear when you died or when you log in the server. But what I've tried didnt work. Someone can tell me how it should be? There are 2 warnings with debug lua:8 Bad argument @ 'addEventHandler' [Expected function at argument 3, got none] lua:20 Bad argument @ 'addEventHandler' [Expected function at argument 3, got none] function drawPanel() dxDrawImage(306, 186, 399, 344, "wdspawn.png", 0, 0, 0, tocolor(0, 0, 0, 160), false) dxDrawText("Spawn", 405, 334, 605, 378, tocolor(255, 255, 255, 255), 1.30, "bankgothic", "center", "top", false, false, true, false, false) end local drawingPanel = false addEventHandler ( "onPlayerLogin", root ) function () if not drawingPanel then drawPanel() drawingPanel = true else drawPanel() drawingPanel = false end end addEventHandler( "onPlayerWasted", root ) function () if not drawingPanel then drawPanel() drawingPanel = true else drawPanel() drawingPanel = false end end
  15. Try this: jobPanel = guiCreateWindow (344, 146, 342, 458, "Pizza Job", false) guiWindowSetSizable (jobPanel, false) jobMemo = guiCreateMemo (16, 30, 312, 384, "Here is the basic Info about Pizza! ->\n\nCurrent Job Head -> Mann\n\n------------ Finding The Job ------------\n\n - To find the pizza job see the Pizza Icon on the . map(F11). \n\n------------ Doing The Job -------------\n\n - You will get a and must deliver the pizza at the Green Marker on the Map(F11). \n\n - On Delivery you will get your salary! \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" /> \n\n------------ Others ------------\n\n - For more Information you can contanct our staff online!\n\n - You can also contanct the Job Head!", false, jobPanel) guiMemoSetReadOnly (jobMemo, true) jobButton = guiCreateButton (211, 423, 117, 20, "Close", false, jobPanel) guiSetVisible (jobPanel, false) function closePanel (button, state) if button == "left" and state == "up" then guiSetVisible( jobPanel, false ) showCursor ( false ) end end addEventHandler ( "onClientGUIClick", jobButton, closePanel, false ) function openPanel() if ( guiGetVisible ( jobPanel ) == true ) then guiSetVisible ( jobPanel, false ) showCursor ( false ) else guiSetVisible (jobPanel, true ) showCursor ( true ) end end addCommandHandler("panel", openPanel, false, false )
  16. Hello guys, I got a problem because I'm trying to create a button which will allow you to hide your tag and show it. But it doesn't work, there's also no debug or error. Can someone maybe help me? PS: To check if it's even working I've added a outputchatbox, and the only thing it was saying is 'Tags Showing' but not Tag's hiding. function onPanelHideTagButtonClicked ( btn, state) if btn ~= "left" or state ~= "up" then return end if setPlayerNametagShowing ( player, true) then setPlayerNametagShowing ( player, false) outputChatBox('Tags Hiding') else setPlayerNametagShowing ( player, true) outputChatBox('Tags Showing') end end panel.btn.hidetag = guiCreateButton(643, 358, 745, 386, "", false) guiSetAlpha(panel.btn.hidetag, 0) guiSetVisible(panel.btn.hidetag, false) addEventHandler("onClientGUIClick", panel.btn.hidetag, onPanelHideTagButtonClicked, false) I also got a question 2: I want also a button to hide my blip and show it again. I've searched around but couldnt find it, Can someone who can explain me or show me? Thanks in advance, Held.
  17. God damn does this look even a LITTLE bit like that one, dude get some glasses please. If this is the same like that one seriously you got no brain then. Sorry for my behaviour Mine: Your: EDIT: Im not gonna even use any "ON" and "OFF" command. So it's completely different lol.
  18. Thanks it worked, And how do I set that the homescreen opens directly when you type /panel and not a blank screen?
  19. I want text as tabs, can someone help me how I can do this the best? for example This is what should happen when you click on Home And this when you click on Player
  20. thanks mate it worked;)
  21. Thanks, it opens now but I want it to open when I type /panel how do i fix that What I've changed function draw() basis = dxDrawRectangle(491, 297, 497, 263, tocolor(23, 23, 23, 255), true) dxDrawRectangle(481, 279, 517, 28, tocolor(55, 55, 55, 255), true) dxDrawText("Player", 487, 350, 622, 383, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) dxDrawText("Weapon", 487, 383, 622, 416, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) dxDrawText("Vehicle", 487, 416, 622, 449, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) dxDrawText("Home", 487, 317, 622, 350, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) dxDrawText("X", 968, 279, 998, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) dxDrawText("X", 481, 279, 511, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) dxDrawText("Hello,", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("Binds", 487, 482, 622, 515, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) home = guiCreateButton(487, 317, 135, 33, "", false) guiSetAlpha(home, 0.00) vehicle = guiCreateButton(487, 416, 135, 33, "", false) guiSetAlpha(vehicle, 0.00) weapon = guiCreateButton(487, 383, 135, 33, "", false) guiSetAlpha(weapon, 0.00) player = guiCreateButton(487, 350, 135, 33, "", false) guiSetAlpha(player, 0.00) binds = guiCreateButton(487, 482, 135, 33, "", false) guiSetAlpha(binds, 0.00) guiSetVisible ( basis, false ) showcursor (true) end addEventHandler("onClientRender",root,draw)
  22. ikvindmooi

    dx panel

    Hello guys, I got a problem i made a panel with dx but I can't make it open with the command /panel. Theres also no errors at debug. Heres the code. basis = dxDrawRectangle(491, 297, 497, 263, tocolor(23, 23, 23, 255), true) dxDrawRectangle(481, 279, 517, 28, tocolor(55, 55, 55, 255), true) dxDrawText("Player", 487, 350, 622, 383, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) dxDrawText("Weapon", 487, 383, 622, 416, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) dxDrawText("Vehicle", 487, 416, 622, 449, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) dxDrawText("Home", 487, 317, 622, 350, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) dxDrawText("X", 968, 279, 998, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) dxDrawText("X", 481, 279, 511, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) dxDrawText("Hello,", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("Binds", 487, 482, 622, 515, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) home = guiCreateButton(487, 317, 135, 33, "", false) guiSetAlpha(home, 0.00) vehicle = guiCreateButton(487, 416, 135, 33, "", false) guiSetAlpha(vehicle, 0.00) weapon = guiCreateButton(487, 383, 135, 33, "", false) guiSetAlpha(weapon, 0.00) player = guiCreateButton(487, 350, 135, 33, "", false) guiSetAlpha(player, 0.00) binds = guiCreateButton(487, 482, 135, 33, "", false) guiSetAlpha(binds, 0.00) guiSetVisible ( basis, false ) function open() if ( guiGetVisible ( basis ) == true ) then guiSetVisible ( basis, false ) showCursor(false) else then guiSetVisible ( basis, true ) showCursor(true) end end addCommandHandler ("anony", open)
×
×
  • Create New...