Jump to content

scienziato-pazzo

Members
  • Posts

    108
  • Joined

  • Last visited

Everything posted by scienziato-pazzo

  1. GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.label[1] = guiCreateLabel(1229, 56, 140, 48, "00:00", false) end ) My resolution is 1440x900.
  2. 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.
  3. 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.
  4. 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.
  5. I setted + instead of -, but it doesn't work.
  6. 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?
  7. Problem solved. I missed the onClientGUIClick parameters on the function. Anyway thanks.
  8. 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.
  9. It returns a string with the value "left".
  10. 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?
  11. Ooooh, thanks. But what's the difference between ?? and ?.
  12. Yes, but for example here (https://wiki.multitheftauto.com/wiki/DbQuery) I saw the "?" and the "??", but how do they work?
  13. I saw the "?" operator, and the "??" operator, but how it works?
  14. 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?
  15. Hi, anyone knows what's the event where a player clicks in the row of a gridList?
  16. 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?
  17. Hi, I've got a lua script with a variable that makes a guiGridList. But how I can use this variable in all functions?
  18. Yes I used this instructions (for example in dbQuery the SELECT function) but how I can retrieve a field with dbPoll or dbQuery?
  19. Hi, how to retrieve a field in a MySQL database?
  20. Why he will leave? Anyways good script
×
×
  • Create New...