Jump to content

Lormateve

Members
  • Content Count

    39
  • Joined

  • Last visited

Everything posted by Lormateve

  1. Previously I had a resource, that in the podia within the game, to know what texture they were in a radius of X meters. That is to say that the name of all the DFF appeared before me, and I did not have to search for the name or id of the object manually.
  2. What I wanted to do, was that the user to buy a certain accessory color and object, that is saved and at the beginning, not only can see it, but also can see others. Server: function Cortina1(paintjobID, color) local vehicle = getPedOccupiedVehicle( client ) local player = client if ( vehicle ) then local pos = {getElementPosition( vehicle )} Cortinapuesta = createObject( 1000, pos[1], pos[2], pos[3] ) attachElements( Cortinapuesta, vehicle, 0, 0, 0, 0, 0, 0 ) triggerClientEvent (root, "setShader", resourceRoot, paintjobID, color) end end addEvent("PonerCo
  3. It worked, It's a lot of help, you mean, thank you. Now what I have left is to create a database so that when they enter or leave is stored in the car, THANK YOU !!
  4. In case of passing text "red" it would no longer be to use the paintjobID, since it is an empty value. Anyway when passing the TriggerClientEvent, it does not work, and I can not understand why. Client and Server addEventHandler("onClientGUIClick", guiRoot, --VENTANA2 = CORTINAS > Completas > Turquesas function () local getGui = guiGetVisible(Ventana2) if source == Boton9a then triggerServerEvent("PonerCortina", resourceRoot, paintjobID, color) --This does not work local color = "nada" PrecioCortinasCompletas = 3500 PrecioTotal = PrecioCortinasCompletas guiSetTex
  5. Cortinas = dxCreateTexture ( "cortinasRojas.png" ) engineRemoveShaderFromWorldTexture (shader_cars,"cortinas", getPedOccupiedVehicle ( player )) shader_cars , tec = dxCreateShader ( "shader.fx" ) engineApplyShaderToWorldTexture (shader_cars,"cortinas", getPedOccupiedVehicle ( player )) dxSetShaderValue (shader_cars,"TX0",CortinasRojas) this is the color red for example, you are right, because there is no connection with the server so that all users can see it, it does not work out, try many ways, but no way it went well
  6. Now I understood what he was referring to, but things have not changed, it still does not work Look, in this code if it works, but the only problem is that other people can not see the color that I chose, but they see the same, the root color Server Side function Cortina1() local vehicle = getPedOccupiedVehicle( source ) if ( vehicle ) then local pos = {getElementPosition( vehicle )} Cortinapuesta = createObject( 1000, pos[1], pos[2], pos[3] ) attachElements( Cortinapuesta, vehicle, 0, 0, 0, 0, 0, 0 ) end end addEvent("PonerCortina", true) a
  7. When the object must be created, it does not in server side Server side function Cortina1(paintjobID) outputChatBox ("..") local vehicle = getPedOccupiedVehicle( source ) local player = client if ( vehicle ) then local pos = {getElementPosition( vehicle )} Cortinapuesta = createObject( 1000, pos[1], pos[2], pos[3] ) attachElements( Cortinapuesta, vehicle, 0, 0, 0, 0, 0, 0 ) triggerClientEvent (root, "setShader", resourceRoot, paintjobID) end end addEvent("PonerCortina", true) addEventHandler("PonerCortina", resourceRoot, Cortina1)
  8. De acuerdo, muchas gracias. Si cambia de color, pero solamente para el cliente.
  9. It still does not work. The curtains do not appear in the vehicle. Semi Full client addEventHandler("onClientGUIClick", guiRoot, --VENTANA2 = CORTINAS > Completas > Turquesas function (paintjobID) local getGui = guiGetVisible(Ventana2) if source == Boton9a then triggerServerEvent("PonerCortina", resourceRoot, paintjobID) outputChatBox ("Llego a trigger") PrecioCortinasCompletas = 3500 PrecioTotal = PrecioCortinasCompletas guiSetText(BotonTOTAL2, PrecioCortinasCompletas) local paintjobID = 1 end end) function addPaintjob2(paintjobI
  10. I tried several ways to make the communication between client and server, but I can not get to the shop that I am armed, my idea is to make different curtains for groups, and each has a color, I can not get that when the person chooses the object who wants to buy, everyone can see the curtain that I would buy in a different color ... The other problem is how to keep it, it has me really disconnected, thank you for your attention. -- Client Side addEventHandler("onClientGUIClick", guiRoot, --VENTANA2 = CORTINAS > Completas > Turquesas function (player) local getGui = guiGetVisi
×
×
  • Create New...