Jump to content

boro

Members
  • Posts

    231
  • Joined

  • Last visited

Everything posted by boro

  1. boro

    wtf error

    Hi all i have in console this error [20:37:50] ERROR: While updating account with 'UPDATE userdata SET value='739', type=3 WHERE userid=1843 AND key='Kills'': database is locked. What is this ? And how fix it? Ty all for help
  2. boro

    Warning

    Wat is bad please help [19:36:04] WARNING: login/login_serv.lua:11: Bad argument @ 'setAccountData' [Expected account at argument 1, got boolean] [19:36:04] WARNING: login/login_serv.lua:12: Bad argument @ 'logIn' [Expected account at argument 2, got boolean] function on4XRegister ( player, user, pass, email ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else account = addAccount ( user, pass ) setAccountData ( account, "email", email) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "on4XRegister", true ) addEventHandler( "on4XRegister", getRootElement(), on4XRegister )
  3. Ok this must work server function damagefade () for key, player in ipairs(getElementsByType( "player")) do local hp = getElementHealth(player) if(hp<=30)then fadeCamera ( player, false, 1.0, 255, 0, 0 ) setTimer ( fadeCamera, 500, 1, player, true, 0.5 ) else setTimer ( fadeCamera, 500, 1, player, true, 0.5 ) end end end setTimer ( damagefade, 2000, 0, player )
  4. Ah ok function damagefade () if getElementHealth(source) <30 then fadeCamera ( source, false, 1.0, 255, 0, 0 ) setTimer ( fadeCamera, 500, 1, source, true, 0.5 ) else setTimer ( fadeCamera, 500, 1, source, true, 0.5 ) end end setTimer ( damagefade, 2000, 0, source )
  5. Try this Server function damagefade ( attacker, weapon, bodypart, loss ) fadeCamera ( source, false, 1.0, 255, 0, 0 ) setTimer ( fadeCamera, 500, 1, source, true, 0.5 ) end addEventHandler ( "onPlayerDamage", getRootElement (), damagefade )
  6. yes this help you local screenX,screenY = guiGetScreenSize() function pic() if not picdraw then guiCreateStaticImage( screenX - 377, 38, 232/2, 232/2, "pic/pic.ong") picdraw = true end end
  7. You mean without else ? local screenX,screenY = guiGetScreenSize() function pic() if not picdraw then guiCreateStaticImage( screenX - 377, 38, 232/2, 232/2, "pic/pic.ong") picdraw = true end end
  8. local screenX,screenY = guiGetScreenSize() function pic() if not picdraw then guiCreateStaticImage( screenX - 377, 38, 232/2, 232/2, "pic/pic.ong") picdraw = true else outputChatBox ("pic drawed") end end
  9. boro

    Help fileIsEOF

    Now i test it but this dont work (no errors or warnings)
  10. boro

    Help fileIsEOF

    Yes i try this function but it dont work and mod dont are loaded this dont work function onDownloadFinish ( file, success ) if ( source == resourceRoot ) then - if ( success ) then if ( file == "solider.txd" and file == "solider.dff" ) then engineImportTXD(engineLoadTXD("solider.txd"), 16) engineReplaceModel(engineLoadDFF("solider.dff", 0), 16) outputChatBox("soliderload") end end end end addEventHandler ( "onClientFileDownloadComplete", getRootElement(), onDownloadFinish )
  11. boro

    Help fileIsEOF

    ok and how i check when is file completely downloaded ? because if file dont are checked and dont are loaded correctly then dont work help MIKI
  12. this function createexp() end addEventHandler ( "onVehicleExplode", getRootElement(), createexp ) and this help you local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ-1, 6, source )
  13. boro

    Help fileIsEOF

    i try this function but this dont work good
  14. boro

    Help fileIsEOF

    Hi all i have created this load script but debug say warning WARNING: solider/replace.lua:10: Bad argument @ 'fileIsEOF' [Expected scriptfile at argument 1, got string 'solider.txd' ] This script work but why is showed this warning ??? please help fileIsEOF i use for check if is file completely downloaded. addEventHandler("onClientResourceStart",resourceRoot, function () downloadFile ( "solider.txd" ) downloadFile ( "solider.dff" ) soliderload = setTimer(solider, 60000, 0, source) end ) function solider () if fileExists("solider.txd") and fileExists("solider.dff") and fileIsEOF("solider.txd") and fileIsEOF("solider.dff") then engineImportTXD(engineLoadTXD("solider.txd"), 16) engineReplaceModel(engineLoadDFF("solider.dff", 0), 16) killTimer ( soliderload ) outputChatBox("soliderload") else outputChatBox("soliderload dont are loaded") end end
  15. boro

    Question Download

    Ok i check your old posts And i have now this script but still dont work, in meta i have set download to false and old downloaded mod is deleted and still nothing what is bad now ? local screenWidth,screenHeight = guiGetScreenSize() local downloadFiles = { "mods/alpha.txd", "mods/alpha.dff" } function downloadState() dxDrawText("Downloading... (0/2)",screenWidth,screenHeight,screenWidth,screenHeight,tocolor(255,255,255,255),1,"bankgothic") end --[[ This is handled in onClientPlayerSpawn for _, downFile in pairs( downloadFiles ) do downloadFile ( downFile ) downloadState() end ]] addEventHandler ( "onClientFileDownloadComplete", root, function ( file, success ) if ( success and fileExists ( "mods/alpha.dff" ) and fileExists ( "mods/alpha.txd" ) ) then local txdalp = engineLoadTXD ( "mods/alpha.txd" ) local dffalp = engineLoadDFF ( "mods/alpha.dff", 602 ) engineImportTXD ( txdalp, 602 ) engineReplaceModel ( dffalp, 602 ) removeEventHandler("onClientRender",root,downloadState) end end ) function checkIfPlayerAlreadyHasDownloaded() if ( fileExists("mods/alpha.dff") and fileExists("mods/alpha.txd")) then outputChatBox("Loading carmods...") local txdalp = engineLoadTXD ( "mods/alpha.txd" ) local dffalp = engineLoadDFF ( "mods/alpha.dff", 602 ) engineImportTXD ( txdalp, 602 ) engineReplaceModel ( dffalp, 602 ) else outputChatBox("client has no carmods, and has triggered the download!") for _, downFile in pairs( downloadFiles ) do downloadFile ( downFile ) addEventHandler ( "onClientRender", root, downloadState ) end end end addEventHandler("onClientPlayerSpawn", localPlayer, checkIfPlayerAlreadyHasDownloaded )
  16. boro

    Chatbox Smileys

    So i find this script here https://community.multitheftauto.com/ind ... ls&id=8453 Work good
  17. boro

    Question Download

    Hm i check it but all still dont work for me and this script is good idea ? dont make it some lag on server ? function downloadOnSpawn ( ) engineImportTXD(engineLoadTXD("pcj600.txd"), 461) engineReplaceModel(engineLoadDFF("pcj600.dff", 0), 461) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), downloadOnSpawn ) I download mods only if is player spawn
  18. boro

    Question Download

    I try this but it dont work alpha mod dont are loaded local screenWidth,screenHeight = guiGetScreenSize() local downloadFiles = { { "mods/alpha.txd" }, { "mods/alpha.dff" }, } function downloadState() dxDrawText("Downloading... (0/2)",screenWidth,screenHeight,screenWidth,screenHeight,tocolor(255,255,255,255),1,"bankgothic") end addEventHandler("onClientRender",root,downloadState) for _, downFile in pairs( downloadFiles ) do downloadFile ( downFile[1] ) downloadState() end addEventHandler ( "onClientFileDownloadComplete", resourceRoot, function ( file, success ) if ( success ) then -- alpha if ( file == "mods/alpha.txd" and fileExists("mods/alpha.dff") ) or ( file == "mods/alpha.dff" and fileExists("mods/alpha.txd") ) then local txdalp = engineLoadTXD ( "mods/alpha.txd" ) local dffalp = engineLoadDFF ( "mods/alpha.dff", 602 ) engineImportTXD ( txdalp, 602 ) engineReplaceModel ( dffalp, 602 ) removeEventHandler("onClientRender",root,downloadState) end end end ) function checkIfPlayerAlreadyHasDownloaded() if ( fileExists("mods/alpha.dff") and fileExists("mods/alpha.txd")) then outputChatBox("Loading carmods...") local txdalp = engineLoadTXD ( "mods/alpha.txd" ) local dffalp = engineLoadDFF ( "mods/alpha.dff", 602 ) engineImportTXD ( txdalp, 602 ) engineReplaceModel ( dffalp, 602 ) else outputChatBox("client has no carmods, and has triggered the download!") for _, downFile in pairs( downloadFiles ) do downloadFile ( downFile[1] ) downloadState() end end end addEventHandler("onClientPlayerSpawn",root,checkIfPlayerAlreadyHasDownloaded)
  19. Hi i have idea for start downloading players mod when is player spawned is it possible ? Example function downloadOnSpawn ( ) engineImportTXD(engineLoadTXD("pcj600.txd"), 461) engineReplaceModel(engineLoadDFF("pcj600.dff", 0), 461) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), downloadOnSpawn )
  20. boro

    Chatbox Smileys

    Hi all is any way to create script for showing png images in chatbox messages ? i want create Smileys command script (/happy /worry /crazy /clever ) but i dont know how make it. Someone help me ?
  21. Hi all i have script, this script work good but in console show it this line WARNING: markers/carsmarkers.lua:55: Bad argument @ 'getElementModel' [Expected element at argument 1, got boolean What is bad ? addEventHandler( "onColShapeLeave", safecol,function(hitPlayer,thePlayer,theVehicle, id) if getElementType(hitPlayer)== "player" then local vehicle = getPedOccupiedVehicle ( hitPlayer ) if getElementModel ( vehicle, 522 ) then -- THIS IS LINE 55 setElementModel ( vehicle, 481 ) end end if getElementType(hitPlayer)== "player" then local skin = getElementModel (hitPlayer) if nonKillables[skin] then triggerClientEvent (hitPlayer, "onTriEvent", root, "text" ) toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "vehicle_fire", true) else killPed (hitPlayer,hitPlayer) end end end)
×
×
  • Create New...