Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    not working

    addEventHandler ( "onResourceStart", resourceRoot, function ( ) for index,table in pairs(vehicles) do local marker = createMarker(table.x, table.y, table.z, "cylinder", 2, table.r, table.g, table.b, 100) setElementData(marker, "vehiclemarker-role", table.Roles) setElementData(marker, "vehiclemarker-vehicles", table.vehicles) setElementData(marker, "vehiclemarker-rotation", table.rotation) vehicle[marker] = table.Roles local position = table.x..", "..table.y..", "..table.z..", "..table.rotation..", " local color1 = table.vehR1..", "..table.vehG1..", "..table.vehB1..", " local color2 = table.vehR2..", "..table.vehG2..", "..table.vehB2..", " setElementData(marker, "vehiclemarker-position", position) setElementData(marker, "vehiclemarker-color1", color1) setElementData(marker, "vehiclemarker-color2", color2) addEventHandler("onMarkerHit", marker, onPlayerVehicleMarkerHit) end end ) function onPlayerVehicleMarkerHit(player) local role = getElementData(source, "vehiclemarker-role") local vehicles = getElementData(source, "vehiclemarker-vehicles") local rotation = getElementData(source, "vehiclemarker-rotation") if (not isElement(player)) then return end if (getElementType(player) ~= "player") then return end if (getElementData(player, dataToFindPlayersJob) == role or role == "ALL") then if (isPedInVehicle(player)) then return end local position = getElementData(source, "vehiclemarker-position") local color1 = getElementData(source, "vehiclemarker-color1") local color2 = getElementData(source, "vehiclemarker-color2") local posX, posY, posZ, rotation = unpack(split(position, ",")) local r, g, b = unpack(split(color1, ",")) local r2, g2, b2 = unpack(split(color2, ",")) triggerClientEvent(player, "jobvehicles.showVehicleGUI", root, vehicles, rotation, posX, posY, posZ, rotation, r, g, b, r2, g2, b2) else outputChatBox("This marker is reserved for '"..role.."'", player, 250, 0, 0) end end Try it.
  2. Still, you can't do what you was doing there, dxDrawRectangle returns "true", doesn't return any element, you can't use it as parent for GUI elements.
  3. Castillo

    not working

    I mean, post the code which you say it bugs.
  4. Castillo

    not working

    What do you mean? post how you tried to do it.
  5. Castillo

    not working

    for index,table in pairs(vehicles) do local marker = createMarker(table.x, table.y, table.z, "cylinder", 2, table.r, table.g, table.b, 100) setElementData(marker, "vehiclemarker-role", table.Roles) setElementData(marker, "vehiclemarker-vehicles", table.vehicles) setElementData(marker, "vehiclemarker-rotation", table.rotation) vehicle[marker] = table.Roles local position = table.x..", "..table.y..", "..table.z..", "..table.rotation..", " local color1 = table.vehR1..", "..table.vehG1..", "..table.vehB1..", " local color2 = table.vehR2..", "..table.vehG2..", "..table.vehB2..", " setElementData(marker, "vehiclemarker-position", position) setElementData(marker, "vehiclemarker-color1", color1) setElementData(marker, "vehiclemarker-color2", color2) addEventHandler("onMarkerHit", marker, onPlayerVehicleMarkerHit) end Put that inside a function executed by a "onResourceStart" event.
  6. We don't give support with leaked scripts. Topic locked.
  7. Castillo

    Tops text

    self.gui['title'] = guiCreateLabel(0, 2, sizeX, 30, '', false, self.gui['container'] ) Try changing the position from that one.
  8. function startStream_Handler(player,streamURL) Remove that "player" argument, since you are just passing the streamURL argument.
  9. Then, just send the result of guiGetText as an argument at triggerServerEvent and define it server side.
  10. Which means that you execute the function that contains the outputChatBox from the client side using triggerServerEvent?
  11. And that outputChatBox is inside a function which is triggered from the client side?
  12. Where is "streamURL" defined at?
  13. It doesn't support HEX codes, you'll have to edit the dxText library to add it.
  14. Castillo

    SOLVED!

    I tested that single script, maybe you got something else messing around.
  15. We don't give support with leaked scripts. Topic locked.
  16. Castillo

    respawn

    Esta mal, porque "source" no esta definido en "cuandoMuere".
  17. Your meta.xml: The path you are using: logo = guiCreateStaticImage(0.2, 0.35, 0.6, 0.3, "logo.png", true) See the problem? you are using "logo.png" not "client/logo.png".
  18. Castillo

    [SQL]

    Do you mean SQL or MySQL?
  19. Castillo

    [SQL]

    Of what game mode are you talking about?
  20. Castillo

    SOLVED!

    The code I posted above worked for me, when I left the server, it destroyed the team.
  21. Castillo

    SOLVED!

    No, look, when that player is about to leave, the only player that is there is him, so it destroys it.
  22. Castillo

    Some Problems

    Use: guiGridListClear
×
×
  • Create New...