Jump to content

scienziato-pazzo

Members
  • Posts

    108
  • Joined

  • Last visited

Everything posted by scienziato-pazzo

  1. Thanks! Now it works!
  2. GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.label[1] = guiCreateLabel(1229, 56, 140, 48, "00:00", false) end ) My resolution is 1440x900.
  3. I used 1229 instead of 100 and 56. EDIT: Now it works, because I wrote Weight instead of Height, but it's a wrong position.
  4. I used it, but I want the position for all resolutions. It doesn't work. I tried the code written in the third post, but it doesn't work.
  5. Thanks, it works, but only if I leave screenWidth/2 - and screenHeight/2 - . The same if I write + instead of -, but it's a wrong position. Why? If I do this, it sets a wrong position for the text.
  6. I setted + instead of -, but it doesn't work.
  7. Hi, I wrote this client script: showPlayerHudComponent("clock", false) function updateHud() --outputChatBox("function test") -- It works local screenWidth, screenHeight = getScreenSize() --[[local realtime = getRealTime() local hour = realtime.hour local minute = realtime.minute]]-- dxDrawText("00:00", screenWidth/2 - 1229, screenHeight/2 - 56, screenWidth, screenHeight) end --function timeHudF() addEventHandler("onClientRender", getRootElement(), updateHud) --end --addEventHandler("timeHud", getRootElement(), timeHudF) The function is called, but dxDrawText doesn't work. Why?
  8. Problem solved. I missed the onClientGUIClick parameters on the function. Anyway thanks.
  9. They are setted by another script, and that script works. There is one column and n rows, because the another script is an iterator that retrieves the players from a Database and insert them into the GridList.
  10. It returns a string with the value "left".
  11. Hi, I wrote this code: selectpgbutt = guiCreateButton(700, 400, 150, 40, "SELEZIONA", false) function spawnaPg(itemselected) triggerServerEvent("spawnaPersonaggio", getLocalPlayer(), itemselected) end itemselected = guiGridListGetItemText ( listapersonaggi, guiGridListGetSelectedItem ( listapersonaggi ), 1 ) addEventHandler("onClientGUIClick", selectpgbutt, spawnaPg, false) But the value of the variable itemselected is left. Why?
  12. Ok, thanks.
  13. Ooooh, thanks. But what's the difference between ?? and ?.
  14. Yes, but for example here (https://wiki.multitheftauto.com/wiki/DbQuery) I saw the "?" and the "??", but how do they work?
  15. I saw the "?" operator, and the "??" operator, but how it works?
  16. Hi, I want to format a string with a custom value from another string. Usually on other languages, like C++, I saw %s, but how to do it on LUA?
  17. Hi, anyone knows what's the event where a player clicks in the row of a gridList?
  18. Ok thanks.
  19. Hi, I've got a question: if I use "createPed" in a client script, the ped is visible only from the player that execute this script or it's visible from all players?
  20. Hi, I've got a lua script with a variable that makes a guiGridList. But how I can use this variable in all functions?
  21. Yes I used this instructions (for example in dbQuery the SELECT function) but how I can retrieve a field with dbPoll or dbQuery?
  22. Hi, how to retrieve a field in a MySQL database?
  23. Why he will leave? Anyways good script
×
×
  • Create New...