Jump to content

Matevsz

Members
  • Posts

    197
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Matevsz

  1. Matevsz

    Speedometer

    at all times to the right
  2. Matevsz

    Speedometer

    hello, how to move the speedometer at the center of the screen? it is on the right side of c_XOffset = 10 c_YOffset = 10 c_ImageW = 200 c_ImageH = 200 c_BarW = 0 c_BarH = 0 c_BarYOffset = 70 function initGui() if disc then destroyElement(disc) end g_screenWidth, g_screenHeight = guiGetScreenSize() local scale if c_EnableScaling then scale = (g_screenWidth/1000 + g_screenHeight/850)/2 else scale = 1 end g_XOffset = round(c_XOffset*scale) g_YOffset = round(c_YOffset*scale) g_ImageW = round(c_ImageW*scale) g_ImageH = round(c_ImageH*scale) g_BarW = round(c_BarW*scale) g_BarH = round(c_BarH*scale) g_BarYOffset = round(c_BarYOffset*scale) disc = guiCreateStaticImage(g_screenWidth - g_ImageW - g_XOffset, g_screenHeight - g_ImageH - g_YOffset, g_ImageW, g_ImageH, "disc.png", false) x, y = guiGetPosition(disc, false) end
  3. Help 0 Errors and 0 errors in db3 Client:
  4. and how to make checking the field username and password field are not empty? editLogin = guiCreateEdit(1246, 417, 237, 34, "", false) editPassword = guiCreateEdit(1246, 468, 237, 34, "", false) guiEditSetMasked(editPassword, true)
  5. login, password = LoginFromXML() if not (login == "" or password == "") then guiCheckBoxGetSelected(save_account, true) guiSetText(edit_login, tostring(login)) guiSetText(edit_haslo, tostring(password)) else guiCheckBoxGetSelected(save_account, false) guiSetText(edit_login, tostring(login)) guiSetText(edit_haslo, tostring(password)) end end function LoginFromXML() local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "login", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end DB3: attempt to call global 'LoginFromXML a nil value
  6. I tried, DB3: 'end' expected to close 'function' at line 181, near 'else' 165 local login, password = loadLoginFromXML() 166 167 168 if not(login == "" or password == "") then 169 guiCheckBoxGetSelected(save_account, true) 170 guiSetText(edit_login, tostring(login)) 171 guiSetText(edit_password, tostring(password)) 172 else 173 guiCheckBoxGetSelected(save_account, false) 174 guiSetText(edit_login, tostring(login)) 175 guiSetText(edit_password, tostring(password)) 176 end 177 end 178 179 180 181 function loadLoginFromXML() 182 local xml_save_log_File = xmlLoadFile("Files/xml/userdata.xml") 183 if not xml_save_log_File then 184 xml_save_log_File = xmlCreateFile("Files/xml/userdata.xml", "login") 185 end 186 local usernameNode = xmlFindChild(xml_save_log_File, "login", 0) 187 local passwordNode = xmlFindChild(xml_save_log_File, "password", 0) 188 return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) 189 else 190 return "","" 191 end 192 xmlUnloadFile(xml_save_log_File) 193 end
  7. Hi, i have problem, DB3: expected near end line 177 165 local login, password = loadLoginFromXML() 166 167 168 if not(login == "" or password == "") then 169 guiCheckBoxGetSelected(save_account, true) 170 guiSetText(edit_login, tostring(login)) 171 guiSetText(edit_password, tostring(password)) 172 else 173 guiCheckBoxGetSelected(save_account, false) 174 guiSetText(edit_login, tostring(login)) 175 guiSetText(edit_password, tostring(password)) 176 end 177 end
  8. Matevsz

    dxDrawImage

    Hello, I am looking for a tutorial to 'dxDrawImage' How to set the cords that move eg. Right? or from corner to corner? And how to fix a bug that if we have the background and the photograph on it and if you click on the background of photographs of "hide behind the background"
  9. addEventHandler("onClientGUIClick", zdj4, ?
  10. How to do that when you click "zdj4" appear images of "--register"?
  11. Sorry, for my English Thanks, now the last thing buying a skin. function ChangeSkin(state) if state == "left" then local skin = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 2) setElementModel(ped, skin) end end addEventHandler("onClientGUIClick", getRootElement(getThisResource), ChangeSkin) function BuySkin(key, keyState) if keyState == "down" then showCursor(false) guiSetVisible(gridlist, false) setCameraTarget(getLocalPlayer(), getLocalPlayer()) setElementPosition(ped, 0, 0, 0) setElementModel(localPlayer, skin) end end bindKey("enter", "down", BuySkin) something like this?
  12. local ped = createPed(0, 0,0,0, 87.9990844) setElementInterior(ped, 18) addEventHandler("onClientResourceStart", resourceRoot, function() gridlist = guiCreateGridList(1350, 383, 236, 293, false) guiSetVisible(gridlist, false) end) function ShowGUI(hitPlayer) if hitPlayer == localPlayer then showCursor(true) guiSetVisible(gridlist, true) setElementPosition(ped, 180.10000610352, -88.199996948242, 1002) setCameraMatrix(174.46969604492, -88.212097167969, 1003.6256713867, 175.40690612793, -88.209663391113, 1003.2769165039) end end addEventHandler("onClientMarkerHit", markerKupnaSkina2, ShowGUI) function CloseGUI(key, keyState) if keyState == "down" then showCursor(false) guiSetVisible(gridlist, false) setCameraTarget(getLocalPlayer(), getLocalPlayer()) destroyElement(ped) end end bindKey("backspace", "down", CloseGUI) How Depress the "backspace" and I go back to that marker (ped) is no longer I used the wrong "destroyElement (ped)"?
  13. wow, thanks, I have another problem, because I have created ped, and it is changing skins, if you push "backspace" I used to "destroyElement (ped) and how once I enter the marker is no longer a
  14. Hello, I am trying to close the gridlist using the "backspace" when pressed nothing happens addEventHandler("onClientResourceStart", resourceRoot, function() gridlist = guiCreateGridList(1350, 383, 236, 293, false) guiSetVisible(gridlist, false) end) function CloseGUI(keyState) if keyState == "down" then showCursor(false) guiSetVisible(gridlist, false) setCameraTarget(getLocalPlayer(), getLocalPlayer()) end end bindKey("backspace", "down", CloseGUI) It is part of the code.
  15. Matevsz

    Skin

    I mean that we have the skin of id, eg. 7, enter the marker and begin to work get skin id eg. 54 when once again we enter the marker to get back your skin 7 and finish the job clothes = createPickup(-1886.7001953125, 2142.7001953125, 1.7999999523163, 3, 1275, 2000) function Job(hitElement) local skin = getElementModel(getLocalPlayer()) if skin == 97 then setElementModel(getLocalPlayer(), skin) outputChatBox("Finished job.", localPlayer) else setElementModel(getLocalPlayer(), 97) outputChatBox("Started job.", localPlayer") end end addEventHandler("onClientPickupHit", clothes, Job) everything works but not skin the player who had at the beginning
  16. Matevsz

    Skin

    Hello, how to remove skin player after the entry marker and leave the skin that was at the beginning? I ask for an example?
  17. ok I have done. Now that you press "backspace" I do not want to close the gui and other things? function Deselect(state) if state == "down" then showCursor(false) guiSetVisible(gridlist, false) guiSetVisible(image, false) setCameraTarget(getLocalPlayer(), getLocalPlayer()) destroyElement(ped) end end bindKey("backspace", "down", Deselect)
  18. function ChangeSkin(state) if state == "left" then local skin = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 2) setElementModel(ped, skin) end end addEventHandler("onClientGUIClick", gridlist, ChangeSkin) Error: DB3: bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
  19. Just that I have not yet, I know that you have to use: guiGridListGetSelectedItem and guiGridListSetItemText Could you give an example?
  20. Good already repaired with SetCameraMatrix, but thanks for your help, now the last thing how to do that when you select a skin from Gridlist, ped was wearing it?
  21. @Edit SetCameraMatrix already running, but as we enter the interior is "ped" already is and how I come to this marker shows setCameraMatrix but without the "ped"
  22. thanks !!! Now, why does not work SetCameraMatrix? ClientSide:
  23. I have a marker on the server side and client-side GUI, this code give side??
  24. I can't see gui and cursor in marker Screen: http://imgur.com/ITldW35
×
×
  • Create New...