Jump to content

darhal

Members
  • Posts

    582
  • Joined

  • Last visited

Everything posted by darhal

  1. nasser want to leak my scripts too .. not u
  2. First nasser I made this script by myself, Second there is no meta.xml when download the server Third, all my scripts are compiled Fourth, I dont use CSG scripts as I run SQL not MySQL 5, respect forums rules 6, u want leak zones script and it will never happen 7, u are hacker 8, u have all leaked scripted since u are hacker 9, it s no longer my server as I sold it and I m just developing it while get paid 10....etc
  3. 300 Download reached -- Uncompiled version Released enjoy all any bug please report here
  4. 1-Did u link your group system with this gate system ? 2-Did u do /gsave ?. 3- if u do all this and still no chance send me the s_settings code in a PM
  5. darhal

    [HELP]IVSE

    Report it to author since the entire code is compiled we can't do anything ..
  6. Trying to copy my /addbase resource ? lool I may publish it soon as my server failed and I m nothing
  7. Introduction : Hello All today I will represent a usefull script that update all you resources to a version in condition that you forget to upgrade all your server scripts to 1.5 or 1.4 or whatever and giving in console use /upgradeall to upgrade to 1.x on each server restart and bla bla so this resource will add this line or update it client="1.x" server="1.x"> it to all meta file in your server : How to use ? : Copy the code below and paste it in a resource ... AFTER ADDING TO META AND THOSE STUFF: You can choose the version to upgrade to by changing this first line in the code versionToUpdate = "1.x" -- THE VERSION THAT WE WILL UPDATE TO EG: 1.4 Go in-game and add admin rights to the resource (FOR LOADING ALL META FILES) after just do /updateall (INGAME OR VIA SERVER CONSOLE) wait some time to update all .. after updating all running resources will be restarted and well done . Source Code : versionToUpdate = "1.5.0" -- THE VERSION THAT WE WILL UPDATE TO -- Server side Resources = {} outputDebugString("LOADING resources:...", 0,55,167,220) local resourceTable = getResources() -- get a table of resources for resourceKey, resourceValue in ipairs(resourceTable) do -- iterate through the table and output each resource's name local name = getResourceName(resourceValue) table.insert(Resources, name) outputDebugString("Resource :"..name.." has been loaded successfully ...", 0,55,167,220) end outputDebugString(""..#resourceTable.." resources has been loaded successfully ...", 0,55,167,220) Working = false Current = 1 loading = false function forceLoad() if Resources[Current] then outputDebugString("[uPDATER] "..Resources[Current], 0,55,167,220) local xmlPatch = ":"..Resources[Current].."/meta.xml" local xmlFile = xmlLoadFile(xmlPatch) if xmlFile then --Map Scripts local index = 0 local scriptNode = xmlFindChild(xmlFile,'min_mta_version',index) if scriptNode then repeat local sver = xmlNodeGetAttribute(scriptNode,'client') or false local cver = xmlNodeGetAttribute(scriptNode,'client') or false if cver and tostring(cver) and tostring(cver) ~= versionToUpdate then xmlNodeSetAttribute(scriptNode,'client',versionToUpdate) outputDebugString("UPDATE SYSTEM: ".. Resources[Current].." UPDATED CLIENT SIDE TO 1.5.0 and Saved successfully",3,0,255,0) end if sver and tostring(sver) and tostring(sver) ~= versionToUpdate then xmlNodeSetAttribute(scriptNode,'server',versionToUpdate) outputDebugString("UPDATE SYSTEM: ".. Resources[Current].." UPDATED SERVER SIDE TO 1.5.0 and Saved successfully",3,0,255,0) end index = index + 1 scriptNode = xmlFindChild(xmlFile,'min_mta_version',index) until not scriptNode else scriptNode = xmlCreateChild ( xmlFile, "min_mta_version") xmlNodeSetAttribute(scriptNode, "client", versionToUpdate) xmlNodeSetAttribute(scriptNode, "server", versionToUpdate) outputDebugString("UPDATE SYSTEM: ".. Resources[Current].." UPDATED CLIENT & SERVER SIDE TO 1.5.0 and Saved successfully",3,0,255,0) end xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) else outputDebugString("UPDATE SYSTEM: Cant read xmlFile: meta.xml",3,220,20,20) return false end end Current = Current + 1 setTimer(forceLoad, 1000,1) if Current == #Resources then outputDebugString("UPDATE SYSTEM: ALL RESOURCES HAS BEEN UPDATED RESTARTING ALL. THIS ACTION MAY TAKE SERVAL MINUTES..") restartAllResources() end end addCommandHandler ( "updateall", forceLoad ) function restartAllResources() -- we store a table of resources local allResources = getResources() -- for each one of them, for index, res in ipairs(allResources) do -- if it's running, if getResourceState(res) == "running" then -- then restart it restartResource(res) end end end function fileLoad(path) local File = fileOpen(path, true) if File then local data = fileRead(File, 500000000) fileClose(File) return data end end function fileSave(path, data) local File = fileCreate(path) if File then fileWrite(File, data) fileClose(File) end end Credits : Credits go to : - King12 (https://forum.multitheftauto.com/viewtopic.php?f ... 361#p79361) For making the code - Darhal For editing it to be updater not compiler and some other stuff Enjoy !
  8. RESOURCE UPDATED : fixed /delgate
  9. To fix delete problem add this to s_settings miniDistance = 3
  10. In fact I create it without evean testing I found some bugs (I m sorry for those bugs !) and fixed them best version for now is 1.2 !
  11. Introduction : Last time I upload mod text bar script and I don't get so much downloads so I decide to upload this script to community this script allows you to create and use programmable doors/gates in-game Script features : - gate creator ingame /addgate modelID (For managers only) - you can delete gate at any time using /delgate (For managers only) - You can choose between a list of gates models not only one - SQL saving system - Much more.... How it work ? : You can use /addgate modelID to add the gate ingame (Only managers) A window will appear you add group name and movement type then click save/close button Then use 2, 4, 6, 8 to move it and 7, 9, +, -, 1, 3 to rotate if you find that's ok do /gsave to save it To delete a gate just stand near it and do /delgate Settings : the resources is linked bt default to ahmedfef group system (download link below) Also you can link it to your resource too to do that open s_settings.lua file and edit it (DETAILS ARE IN THE FILE) Download Link : Well the resource is compiled (So bad news) but the good news are if I get 300 downloads I will upload de-compiled version Darhal Gate system : https://community.multitheftauto.com/in ... s&id=11866 Ahmedfef Group system :https://community.multitheftauto.com/index.php?p=resources&s=details&id=8036
  12. darhal

    Destroyelement

    function vehicleExplode (plr) if (getElementModel(source) == 476) then setTimer( replaceVehicle, 4000, 1, source, plr) end end addEventHandler ( "onVehicleEnter", getRootElement(), vehicleExplode ) function replaceVehicle(veh, plr) destroyElement(veh) local vehicle = createVehicle(513,-2117.46, -2340.69, 100 + 3) warpPedIntoVehicle(plr,vehicle) end
  13. darhal

    Destroyelement

    How you expect this to work you use the function warpPlayerIntoVehicle for warpping vehicle (source) to vehicle (that you create) TRY THIS : function vehicleExplode (plr) if (getElementModel(source) == 476) then setTimer( destroyElement, 4000, 1, source) local vehicle = createVehicle(513,-2117.46, -2340.69, 100 + 3) warpPedIntoVehicle(plr,vehicle) end end addEventHandler ( "onVehicleEnter", getRootElement(), vehicleExplode )
  14. We use it like this ? for eg dbExec(dbc, "ALTER TABLE houses ADD pets datatype")
  15. Does it check if a colum is added or not ?
  16. Hello all, I m using SQL for specific system and after some time of using this system the database being full of data and I dont want to create another one so I lost them and time I forget to add column to the table from the beging so how to add it now without damaging or deleteing the db ? THX all
  17. darhal

    Destroyelement

    Since destroyVehicleOfModel function isnt mta function you should create it by yourself
  18. You are doing great job with shaders keep it up
  19. I see standards GTA anims, but they don't enough for originally game mods. MTA at the moment is amazing which offer huge possibilities to script that I never see in any oher Multi player games but I think custom animations will be fantastic too
  20. add resource to ADMIN ACL or just give it access to just addAccount via ACL
×
×
  • Create New...