Jump to content

myonlake

Members
  • Posts

    2,312
  • Joined

  • Days Won

    40

Everything posted by myonlake

  1. If someone decided to buy this, let me know how short the script was. Because you can do it yourself with less than 15 lines of code and I would never spend an euro for that.
  2. Is your game server running on the same server as the MySQL server? Sometimes hosting companies block external MySQL connections (usually always) and it might be the reason for not being able to connect. However, using the runcode-resource for connecting to database is not a good idea, at least that's my own personal opinion. You should create a Lua file and connect to database there. Then make an exported function for returning the database connection so you can use it outside of the resource as well.
  3. myonlake

    Crack Palace Bug?

    createObject(3059, 2522.05, -1272.9325, 35.589998626709, 0, 0, 0) setElementAlpha(createObject(976, 2521.5, -1279,34.089998626709, 0, 0, 90), 0) setElementAlpha(createObject(976, 2521.5, -1276,34.089998626709, 0, 0, 90), 0) That should fix the issue.
  4. Not that much of a difference as both do the same thing, except isPedInVehicle returns only a boolean while getPedOccupiedVehicle returns a boolean or element. Either way works, but as there is a function for isPedInVehicle I edited it to that.
  5. The output was in the wrong place. function createExplosionForPlayer(thePlayer, command) if (isPedInVehicle(thePlayer)) then outputChatBox("You can't commit a Jihad in a vehicle!", thePlayer) return end setTimer(createJihadForPlayer, 2500, 1, thePlayer, x, y, z) triggerClientEvent("playTheSound", root, thePlayer) setPedAnimation(thePlayer, "BOMBER", "BOM_Plant") end addCommandHandler("c1", createExplosionForPlayer) function createJihadForPlayer(thePlayer, x, y, z) if (isPedInVehicle(thePlayer)) then outputChatBox("You can't commit a Jihad in a vehicle!", thePlayer) return end local x, y, z = getElementPosition(thePlayer) createExplosion(x, y, z, 2) createExplosion(x, y, z, 3) createExplosion(x, y, z, 10) outputChatBox(getPlayerName(thePlayer) .. " committed a Jihad!", root) end addCommandHandler("c2", createJihadForPlayer)
  6. To make it simpler: there are different variations for a vehicle in GTA. Some van variations have boxes in the trunk and some have speakers in the trunk, some have none. These are variations (plain English, use translator).
  7. Hot coffee animations were removed from GTA:SA. You can still find those animation files from the internet and you can put them in your gta3.img manually.
  8. myonlake

    Crack Palace Bug?

    That's a thing you have to fix yourself. There is an object that fits the wall. I'll find out the code first thing tomorrow for you.
  9. myonlake

    Break

    You use break within a for, while or repeat in order to break the loop. Like within the example above.
  10. Not really. You can only delay and eventually crash the client out from the game, but that's not suggested.
  11. Even though concatenation is easy to do, I suppose we're not talking about long paragraphs, so I doubt the speed is a common factor for his use. Changed to local variables as suggested.
  12. Found the %u thingy here » I did know most of those before too, but then I was wondering what other ones there are.
  13. You're welcome. Feel free to make it as you want it.
  14. Copy my code again. It happens because this is a client-side script and isPedDead is a server-side function.
  15. The error is written in plain English. It literally takes one change in the script and you can't even do that by yourself. getVehicleRotation -> getElementRotation local hillArea = createColRectangle(-2171.0678710938, 678.17950439453, 100, 100) local hillRadar = createRadarArea(-2183.5678710938, 705.67950439453, 100, -100, 0, 255, 0, 175) function allowShoots() bindTrigger = 1 end addEventHandler("onClientColShapeHit", hillArea, function(thePlayer, matchingDimension) local keys1 = getBoundKeys("vehicle_fire") if (keys1) then for keyName, state in pairs(keys1) do bindKey(keyName, "down", cdoshoot) end bindKey("F", "down", cdoshoot) else bindKey("F", "down", cdoshoot) bindKey("lctrl", "down", cdoshoot) bindKey("rctrl", "down", cdoshoot) end theVehicle = getPedOccupiedVehicle(thePlayer) allowShoots() if (getElementType(thePlayer) == "vehicle") then outputChatBox(getPlayerName(thePlayer) .. " Entrou na Zona Fun Seu Carro Pode Atirar Agora!", thePlayer, 255, 255, 109, false) setRadarAreaFlashing(hillRadar, true) end end ) addEventHandler("onClientColShapeLeave", hillArea, function(thePlayer, matchingDimension) vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do destroyElement(v) if (getElementType(thePlayer) == "vehicle") then if (getElementHealth(thePlayer) > 0) then outputChatBox(getPlayerName(thePlayer) .. " Saiu da Zona Fun Seu Carro Não Pode Atirar Mais!", thePlayer, 255, 255, 109, false) setRadarAreaFlashing(hillRadar, false) end end end end ) function cdoshoot(thePlayer) if (bindTrigger == 1) then local theVehicle = getPedOccupiedVehicle(thePlayer) if ((getElementHealth(thePlayer) > 0) and (theVehicle) then bindTrigger = 0 local x, y, z = getElementPosition(theVehicle) local rX, rY, rZ = getElementRotation(theVehicle) local x = x+4*math.cos(math.rad(rZ+90)) local y = y+4*math.sin(math.rad(rZ+90)) createProjectile(theVehicle, 19, x, y, z, 1.0, nil) setTimer(allowShoots, 3000, 1) end end end Additionally, you should probably read these manuals: https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://forum.multitheftauto.com/viewtopic.php?f=148&t=40809
  16. Use Notepad++ or whatever text editor you prefer and replace all occurrences of dimension="0" to dimension="5". Not that hard.
  17. You cannot modify the elements that are within the game world. You can only delete them and their LOD elements.
  18. Well you can use this to get the uppercase letters. Should work, tested on Lua demo. function getUppercaseLetters(string) local wow = "" for i=0,string.len(string) do -- Do for each letter local string_ = string.sub(string, i, i) -- Get the letter if(string.find(string_, "%u")) then -- Check if it's uppercase wow = wow .. string_ -- Add to result end end return wow -- Return the uppercase string end So in action it would probably be like: addEventHandler("onPlayerChat", root, -- When someone says something function(message, messageType) if(getUppercaseLetters(message) ~= "") then -- If there are any uppercase strings outputDebugString("Used uppercase letters: '" .. getUppercaseLetters(message) .. "'.") -- Print a message end end )
  19. You have to crop the video so that you can't see the tag in the corner.
  20. Are you sure about that? I have never found an animation on MTA about being handcuffed like in the videos that SAMP shows.
  21. I am quite sure that isn't about MTA core at all. That's a resource that's doing that. Supplanting means "displace, supersede, supplant, oust, outdate, freeze out". I just so feel like there is no function in the core that's doing this.
  22. myonlake

    MTA Exploit

    So what exactly happened? I can't quite find any type of exploit happening.
  23. I suppose it is, but I doubt it's possible to make it a downloadable file for the client due to security reasons.
×
×
  • Create New...