Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. The server must have the drive by script, and it should automatically bind it when you join the server.
  2. Why do you say "revive" as if the community was dead? it's pretty damn alive I would say. As far as I know, GTA IV had a lot of technicall problems, which made it hard to create a good MP mod.
  3. Eso es porque la variable 'tank' sigue teniendo un valor, cambia el: if tank then a: if isElement ( tank ) then Y tambien deberias poner la variable 'tank' en el valor 'nil', asi: destroyElement ( tank ) tank = nil
  4. Acabo de probar el script que yo te di, y funciona perfectamente.
  5. You can inject mouse moves/clicks with: injectBrowserMouseDown injectBrowserMouseUp injectBrowserMouseMove injectBrowserMouseWheel.
  6. Subi el recurso a algun sitio, tipo mediafire, y postea el link.
  7. local w, h = guiGetScreenSize( ) local isShaderEnabled = false addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) onBloodChange ( "blood" ) end ) function renderEffect2 ( ) dxSetRenderTarget ( ) dxUpdateScreenSource ( screenSrc2 ) dxDrawImage ( 0, 0, w, h, screenShader2 ) end function enableBlackWhite ( enable ) if ( enable ) then if ( isShaderEnabled ) then return end screenShader2 = dxCreateShader ( "blackwhite.fx" ) screenSrc2 = dxCreateScreenSource ( w, h ) if ( screenShader2 and screenSrc2 ) then dxSetShaderValue ( screenShader2, "BlackWhiteTexture", screenSrc2 ) addEventHandler ( "onClientHUDRender", getRootElement( ), renderEffect2 ) end else if ( screenShader2 and screenSrc2 ) then destroyElement ( screenShader2 ) destroyElement ( screenSrc2 ) screenShader2, screenSrc2 = nil, nil removeEventHandler ( "onClientHUDRender", getRootElement( ), renderEffect2 ) end end isShaderEnabled = enable end function onBloodChange ( dataName ) if ( dataName == "blood" ) then local blood = ( tonumber ( getElementData ( localPlayer, "blood" ) ) or 0 ) if ( blood < 2000 ) then enableBlackWhite ( true ) else enableBlackWhite ( false ) end end end addEventHandler ( "onClientElementDataChange", localPlayer, onBloodChange ) Probalo.
  8. Set their descriptions to "DELETE", so we can know they are yours.
  9. Ese codigo activara el shader cuando el element data "blood" sea menor que 2000, no igual que.
  10. Desktop: CPU: Intel Core i5 3570 3.4GHz RAM: 16 GB GPU: GTX 970 Factory Overclocked Hard Drives: 4 TB, 1 TB and 256 GB SSD Notebook: CPU: Intel Core i3 3110M 2.4GHz RAM: 4 GB GPU: HD Graphics 4000 Hard Drive: 640 GB
  11. He was asking for exported functions list or a page with info about this:
  12. That wiki page is not for these scripts, it's for this resource: https://community.multitheftauto.com/index.php?p= ... ls&id=4871
  13. It's "addCommandHandler" not "addComandHandler".
  14. There's no reason to delete the topic, as it might help someone with a similar problem.
  15. El MTA paradise no utiliza las cuentas del MTA si no me equivoco. Lo que podes hacer es, que al intentar crear el personaje, cuente cuantos creaste hasta ahora.
  16. local theResult, numRows = dbPoll ( isPlayerInClan, -1 ) if ( numRows == 0 ) then -- your code end
  17. You need to use dbQuery + dbPoll to check if something is already in the database.
  18. Castillo

    playSound

    I guess the website is not working, and failing to convert the video to audio only.
  19. Castillo

    Help xml

    Storing data of the player in XML is not a really good idea, since the file will get bigger and bigger with each new player. I would recommend you to use account data or SQL/MySQL to store the player exp and level.
  20. You could try setting a timer to check, instead of just after leaving.
  21. function createANewObject(objID, x, y, z, rotx, roty, rotz) dunnewObj = createObject(objID, x, y, z, rotx, roty, rotz) local name = tostring(getPlayerName(source)) setTimer(function () local newcolshape = createColTube(x, y, z - 3, 10, 7) setElementData(newcolshape, "col.group", "".. name) setElementData(newcolshape, "col.gate", dunnewObj) end, 5000, 1) outputChatBox("Colshape will be created in 5 seconds, please move away from the gate!", source, 255, 255, 0) setElementDoubleSided(dunnewObj, true) outputChatBox("Name: " .. name) exports.mysqlconfig:exec("INSERT INTO objects (plrName, serial, x, y, z, rotx, roty, rotz, id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", name, getPlayerSerial(source), x, y, z, rotx, roty, rotz, objID) end addEvent("createNewObject", true) addEventHandler("createNewObject", root, createANewObject) addEventHandler("onColShapeHit", root, function(player, matchingDimension) local name = getElementData(source, "col.group") if (tostring(name) == tostring(getPlayerName(player))) then local gate = getElementData(source, "col.gate") if (gate) then local isOpen = getElementData(gate, "gate.open") --local plrInCol = getElementsWithinColShape(source, "player") --local vehInCol = getElementsWithinColShape(source, "vehicle") if (isOpen == false) then local gx, gy, gz = getElementPosition(gate) local gz = gz + 3 moveObject(gate, 1200, gx, gy, gz, 0, 0, 0, "OutBounce") setElementData(gate, "gate.open", true) end end end end ) addEventHandler("onColShapeLeave", root, function(player, matchingDimension) local name = getElementData(source, "col.group") if (tostring(name) == tostring(getPlayerName(player))) then local gate = getElementData(source, "col.gate") if (gate) then local plrInCol = getElementsWithinColShape(source, "player") local vehInCol = getElementsWithinColShape(source, "vehicle") outputChatBox("1: " .. tostring(#plrInCol) .. ", 2: " .. tostring(#vehInCol), player) if (not tonumber(#plrInCol) >= 1 or tonumber(#vehInCol) >= 1) then local gx, gy, gz = getElementPosition(gate) gz = gz - 3 moveObject(gate, 1200, gx, gy, gz, 0, 0, 0, "OutBounce") setElementData(gate, "gate.open", false) end end end end )function createANewObject(objID, x, y, z, rotx, roty, rotz) dunnewObj = createObject(objID, x, y, z, rotx, roty, rotz) local name = tostring(getPlayerName(source)) setTimer(function () local newcolshape = createColTube(x, y, z - 3, 10, 7) setElementData(newcolshape, "col.group", "".. name) setElementData(newcolshape, "col.gate", dunnewObj) end, 5000, 1) outputChatBox("Colshape will be created in 5 seconds, please move away from the gate!", source, 255, 255, 0) setElementDoubleSided(dunnewObj, true) outputChatBox("Name: " .. name) exports.mysqlconfig:exec("INSERT INTO objects (plrName, serial, x, y, z, rotx, roty, rotz, id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", name, getPlayerSerial(source), x, y, z, rotx, roty, rotz, objID) end addEvent("createNewObject", true) addEventHandler("createNewObject", root, createANewObject) addEventHandler("onColShapeHit", root, function(player, matchingDimension) local name = getElementData(source, "col.group") if (tostring(name) == tostring(getPlayerName(player))) then local gate = getElementData(source, "col.gate") if (gate) then local isOpen = getElementData(gate, "gate.open") --local plrInCol = getElementsWithinColShape(source, "player") --local vehInCol = getElementsWithinColShape(source, "vehicle") if (isOpen == false) then local gx, gy, gz = getElementPosition(gate) local gz = gz + 3 moveObject(gate, 1200, gx, gy, gz, 0, 0, 0, "OutBounce") setElementData(gate, "gate.open", true) end end end end ) addEventHandler("onColShapeLeave", root, function(player, matchingDimension) local name = getElementData(source, "col.group") if (tostring(name) == tostring(getPlayerName(player))) then local gate = getElementData(source, "col.gate") if (gate) then local plrInCol = getElementsWithinColShape(source, "player") local vehInCol = getElementsWithinColShape(source, "vehicle") outputChatBox("1: " .. tostring(#plrInCol) .. ", 2: " .. tostring(#vehInCol), player) if ( #plrInCol == 0 and #vehInCol == 0 ) then local gx, gy, gz = getElementPosition(gate) gz = gz - 3 moveObject(gate, 1200, gx, gy, gz, 0, 0, 0, "OutBounce") setElementData(gate, "gate.open", false) end end end end ) Try that.
×
×
  • Create New...