Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. 'sourcePlayer' no esta definido, cambialo por 'thePlayer'.
  2. Castillo

    GridList

    Ambas funciones tienen ejemplos, dale click y te enviara a la pagina de la wiki.
  3. Castillo

    GridList

    Usa el evento: onClientGUIClick y las funciones: guiGridListGetSelectedItem guiGridListGetItemText
  4. Well, that's kinda obvious, all you did was make the function return true.
  5. Oh sorry, I thought you were using file functions to later replace the mod, my bad.
  6. bone_attach usa IDs de huesos, proba con otro.
  7. No estoy seguro, podrias intentar usar otro hueso.
  8. Es porque los huesos de algunos skin son diferentes a los del resto.
  9. Yeah, that will happen, you need to resize it according to the distance.
  10. local tx, ty, tz = 1955.03369, -1855.28638, 13.54688 local maximumDistance = 50 addEventHandler ( "onClientRender", root, function ( ) local x, y, z = getElementPosition ( localPlayer ) local sx, sy = getScreenFromWorldPosition(tx, ty, tz) if ( getDistanceBetweenPoints2D ( x, y, tx, ty ) <= maximumDistance ) then dxDrawImage ( sx, sy-50, 100, 100, "2.png" ) end end )
  11. Obtene el contenido del archivo, y escribi lo nuevo en una nueva linea, ejemplo: local content = "Hello World!" newContent = content .."\nHow are you today?" fileWrite ( myFile, newContent )
  12. Yo lo probe y funciona perfectamente.
  13. El problema que detecte es que si el archivo no existe, vos no lo estas creando. VentanaP2 = guiCreateWindow(0.29, 0.34, 0.40, 0.36, "Panel de actualizacion ", true) guiWindowSetSizable(VentanaP2, false) lblDesc = guiCreateLabel(0.02, 0.20, 0.16, 0.07, "Descripcion: ", true, VentanaP2) guiSetFont(lblDesc, "clear-normal") MemoDesc = guiCreateMemo(0.24, 0.20, 0.72, 0.75, "", true, VentanaP2) btnGuardar2 = guiCreateButton(0.02, 0.72, 0.20, 0.09, "Guardar", true, VentanaP2) guiSetFont(btnGuardar2, "default-bold-small") guiSetProperty(btnGuardar2, "NormalTextColour", "FF08FB03") btnCerrar2 = guiCreateButton(0.02, 0.85, 0.20, 0.09, "Cerrar", true, VentanaP2) guiSetFont(btnCerrar2, "default-bold-small") guiSetProperty(btnCerrar2, "NormalTextColour", "FFFD0000") guiSetVisible(VentanaP2, false) function btnGuardarP2 ( ) -- Guardamos la información en la GUI con el botón if ( not fileExists ( "archivoAct/arcAct.txt" ) ) then -- Si no existe el archivo... archivo2 = fileCreate ( "archivoAct/arcAct.txt" ) -- Lo creamos else archivo2 = fileOpen ( "archivoAct/arcAct.txt", false ) end if fileWrite ( archivo2, guiGetText ( MemoDesc ) ) then outputChatBox ( "Testbueno" ) fileClose ( archivo2 ) else outputChatBox ( "TextMal" ) end guiSetVisible ( VentanaP2 , false ) -- si la ventana es visible se cierra showCursor ( false ) --Desactiva el cursor addEventHandler ( "onClientRender", root, dx ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root, dx ) end ,3000, 1 ) end addEventHandler ( "onClientGUIClick", btnGuardar2, btnGuardarP2, false ) -- Al hacer clic funciona el boton
  14. Read what TAPL posted, or else you'll have a security problem.
  15. What does "username" and "password" return? use outputChatBox to find that out.
  16. local username, password = loadDataFromXml ( ) if ( username ~= "" and password ~= "" ) then guiCheckBoxSetSelected ( LoginPanel.checkbox[1], true ) guiSetText ( LoginPanel.edit[1], tostring ( username ) ) guiSetText ( LoginPanel.edit[2], tostring ( password ) ) end Try it.
  17. You do know that if you create a blip, then anybody can destroy it when they unmark someone? aswell as that your "tempdata.marked" data is global, means it's being set to the player you mark directly, the data is being shared by everyone.
  18. Why don't you use downloadFile function?
  19. https://community.multitheftauto.com/in ... ls&id=8146 https://community.multitheftauto.com/in ... ls&id=1926
  20. That's because you created the vehicle client side, if you do that, you won't be able to use it. You need to create the vehicle server side, to do that, you need to use triggers, meaning triggerServerEvent.
  21. In which script is the code that creates the GUI? Also, you must use the event "onClientMarkerHit", since "onMarkerHit" is server side.
×
×
  • Create New...