MadnessReloaded

Members
  • Content count

    315
  • Joined

  • Last visited

  • Days Won

    4

MadnessReloaded last won the day on January 15

MadnessReloaded had the most liked content!

Community Reputation

36 Good

1 Follower

About MadnessReloaded

Details

  • Gang
    ZNEXT
  • Location
    Spain
  • Occupation
    Owner
  • Interests
    Programming, skateboarding, snowboarding

Recent Profile Visitors

816 profile views
  1. Memory problems

    Alright, don't know if this has exactly got to do with MTA itself, but there I go: I'm using my web server to stream ambient music to the players who want to listen to it. The script works fine aside of lag issues, I use playSound, paste an URL like "www.server.com:22010/"..math.random(1,40)..".mp3" and check every X seconds if the sound is still playing; if it's not, then play another ambient song. Pretty easy, but the problem is that the server starts getting a crap load of RAM usage, it goes up to 95% from 30-50%, which is the average usage rate of my server. Is it MTA's problem? I'm using nginx.
  2. Nametag en boss (Slothbot)

    Puedes manejar scripts de nametag que haya por los resources de la comunidad y modificarlos para que funcionen con slothbot. Es algo de trabajo, pero nada del otro mundo.
  3. [JS]Converted Maps

    You've done a really good job there. I support people that create projects so anyone else can use them. Hope more people consider donating.
  4. What will affect performance the most?

    I need the peds to jump when a lineOfSight is created and obstructed by an obstacle, so I can use setPedControlState. I'm using a timer every 2 seconds. The table's structure is this. table = { {botPed}, {botPed}, {botPed}, {botPed}, {botPed}, {botPed}, {botPed}, } You mean that I should distribute the bots in various tables? I have thought about that but I didn't think it would make sense because I'd have to loop through two tables anyway.
  5. something to protect my resources for sale

    You can go to luac.mtasa.com and obfuscate the actual script files. People can only steal the client files, though. It's the only thing they download. If someone downloads your server files, then you should focus on securing your server or computer, because they've just hacked you. Just add cache="false" after the client file entry of the meta.xml file: <script src="clientfile.lua" type="client" cache="false"/> That will load the file directly to the RAM, so script stealers can't just go and snatch the client file from the hard drive like every other dumbass does. Also, this disables the addDebugHook function: addDebugHook( "preFunction", onPreFunction, {"addDebugHook"} ) function onPreFunction( sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ... ) return "skip" end
  6. DO NOT SHOW THE LIFE BAR AND HANDS/WEPONDS

    You mean the life bar and the weapons are not showing? First of all, is it the original GTA: SA HUD? Is it your server? If it is, check if there's a script hiding some HUD item, if it is not, then probably the server did it intentionally. Does it happen to every server you join, or just some specific servers? PD: And by the way, this is not a section dedicated to these kinds of problems, just suggestions.
  7. What will affect performance the most?

    Hi, So I'm having a pretty big problem related to performance. I have some AI, and the client sometimes loops through all of them so it can handle operations like jumping, for example. At first, I used to loop through all peds, and filtered them for their elementdata, and that was obviously really performance-hungry and not very effective. Now, the script is a little bit more optimized, it does no longer loop through every single ped. The server sends the player a table with all bots, and the client does everything else by just using that table, so instead of looping through almost 500 peds, it just loops trough 170 or so. I've checked it up, and I've seen that, ~140 bots in the table won't cause performance problems, but ~200 will make everyone have minimal lag spikes every 2-4 seconds. What should I do? I absolutely need to loop through all bots and I need ways to optimize this. Thank you for your help.
  8. Just imagine playing with a friend, killing raiders and bandits, looting, leveling up, helping each other out, just like a real on-line RPG. If the bots and the pickup system were enhanced and there was bigger playerbase overall, this would be my go-to server. For the rest, it is a living, breathing world to explore, and damn, it does really look like a mod straight out of those CLEO conversions. Good job, very good job.
  9. SQL Query error

    I believe it's either a version mismatch or the database is damaged or encrypted, try using a newly installed database so you can at least check if it's a problem of the script, server or database.
  10. Paintjob + ElementData + ServertriggerEvent

    I don't understand a lot but I can figure out you mean that you want to save a paintjob on a database, so you can load it later. You should really learn SQL functions on the wiki: executeSQLQuery() You should trigger a client event for all players, so the shader is applied for everyone, preferably on the Cortina1() function. for i,players in ipairs (getElementsByType ("player")) do triggerClientEvent (players,"setShader",players,cortina) end then on the "setShader" event, use engineApplyShaderToWorldTexture() on the first parameter of the function called by "setShader" on the client side.
  11. [REL] Easy Logger

    A primary security measure anyone with common sense would take: log everything. Absolutely everything. If you're a server owner, you know what you're dealing with; lots of players, lots of possible bugs and bad intentions. Yeah, they don't mix well. So, some time ago I have made this small and easy but really useful script which stores logs of whatever you want by just using an exported function. You won't have to worry about anything at all but the contents of the log , it creates a log if it does not exist, and if it exists the entry will appear at the next line. Each entry stores the time and date so you know when it all happened. You can choose to keep or to remove the color-codes, which is useful for chat logs or player names, for example. [SYNTAX] exports.easylogger:addLogEntry (text,logname[,removecolorcode]) - text: The text. - logname: The name of the log. - removecolorcode: Whether to remove colorcodes or not. Set to true to remove, false otherwise. [EXAMPLE] exports.easylogger:addLogEntry("Hello world!","logfile1") This would store the "Hello world!" text into a logfile called "logfile1.log". This has been very useful to me, I've catched plenty of people doing shady things like abusing a money system by tracking the transactions, the teamchat and localchat of my server. So, really hope it helps you too. Community download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=15153
  12. PLS HELP ME IN MY SERVER

    local jugadores = {} local lplayer = getLocalPlayer() local info = {} local sx,sy = guiGetScreenSize() function crearArma(jug,arma) local model = obtenerObjeto(arma) local slot = getSlotFromWeapon(arma) jugadores[jug][slot] = createObject(model,0,0,0) setElementCollisionsEnabled(jugadores[jug][slot],false) end function destruirArma(jug,slot) destroyElement(jugadores[jug][slot]) jugadores[jug][slot] = nil end addEventHandler("onClientResourceStart",getResourceRootElement(),function() for k,v in ipairs(getElementsByType("player",root,true)) do jugadores[v] = {} info[v] = {true,isPedInVehicle(v)} end end,false) addEventHandler("onClientPlayerQuit",root,function() if jugadores[source] and source ~= lplayer then for k,v in pairs(jugadores[source]) do destroyElement(v) end jugadores[source] = nil info[source] = nil end end) addEventHandler("onClientElementStreamIn",root,function() if getElementType(source) == "player" and source ~= lplayer then jugadores[source] = {} info[source] = {true,isPedInVehicle(source)} end end) addEventHandler("onClientElementStreamOut",root,function() if jugadores[source] and source ~= lplayer then for k,v in pairs(jugadores[source]) do destroyElement(v) end jugadores[source] = nil info[source] = nil end end) addEventHandler("onClientPlayerSpawn",root,function() if jugadores[source] then info[source][1] = true end end) addEventHandler("onClientPlayerWasted",root,function() if jugadores[source] then for k,v in pairs(jugadores[source]) do destruirArma(source,k) end info[source][1] = false end end) addEventHandler("onClientPlayerVehicleEnter",root,function() if jugadores[source] then for k,v in pairs(jugadores[source]) do destruirArma(source,k) end info[source][2] = true end end) addEventHandler("onClientPlayerVehicleExit",root,function() if jugadores[source] then info[source][2] = false end end) addEventHandler("onClientPreRender",root,function() for k,v in pairs(jugadores) do local x,y,z = getPedBonePosition(k,3) local rot = math.rad(90-getPedRotation(k)) local i = 15 local wep = getPedWeaponSlot(k) local ox,oy = math.cos(rot)*0.21,-math.sin(rot)*0.21 local alpha = getElementAlpha(k) for q,w in pairs(v) do if q == wep then destruirArma(k,q) else setElementRotation(w,0,70,getPedRotation(k)+90) setElementAlpha(w,alpha) -- SETTING EACH WEAPON'S DIMENSION AND INTERIOR TO THE PLAYERS' setElementDimension (w,getElementDimension(k)) setElementInterior (w,getElementInterior(k)) ------------------------------------------ if q==2 then local px,py,pz = getPedBonePosition(k,51) local qx,qy = math.sin(rot)*0.11,math.cos(rot)*0.11 setElementPosition(w,px+qx,py+qy,pz) elseif q==4 then local px,py,pz = getPedBonePosition(k,41) local qx,qy = math.sin(rot)*0.06,math.cos(rot)*0.06 setElementPosition(w,px-qx,py-qy,pz) else setElementPosition(w,x+ox,y+oy,z-0.2) setElementRotation(w,-17,-(50+i),getPedRotation(k)) i=i+15 end end end if info[k][1] and not info[k][2] then for i=1,7 do local arma = getPedWeapon(k,i) if arma~=wep and arma>0 and not jugadores[k] then crearArma(k,arma) end end end end end) function obtenerObjeto(arma) local m if arma > 1 and arma < 9 then m = 331 + arma elseif arma == 9 then m = 341 elseif arma == 15 then m = 326 elseif (arma > 21 and arma < 30) or (arma > 32 and arma < 39) or (arma > 40 and arma < 44) then m = 324 + arma elseif arma > 29 and arma < 32 then m = 325 + arma elseif arma == 32 then m = 372 end return m end Try this. Check the line where "setElementInterior" is used so you can learn from it.
  13. [Mysql] Login panel | Password is incorrect

    Please, post a part of the script that's having the error so we can troubleshoot it, we have to take a look at how the database is being used so we can identify mistakes and the problem of the .luac file. Hope you've got an uncompiled version.
  14. I need help in my server please!!!

    I suggest you to find the resource that you think that could have been responsible of spawning these vehicles and restart it.
  15. PLS HELP ME IN MY SERVER

    Use setElementInterior() for the object you've created, select the interior where you want it to appear. You haven't specified what you want to do, so I can only say that.