Jump to content

Jesseunit

Members
  • Posts

    115
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jesseunit

  1. Yo, I've been working on a Mario minigame for MTA. It's using a heavily edited version of 50p's sprite library for zi animations. It's almost ready for release, I just gotta script zi monsters. Screenshot: http://i44.tinypic.com/1z6sfw8.jpg Video: https://www.youtube.com/watch?v=p8gxUjMPC_Y
  2. I lol'd for a couple of miliseconds right there. Anyways, try to edit the darkness in the client-sided part of the script.
  3. I agree, that's why I made it in the first place, also: your Flashlight shader is just the perfect combination with my Night shader.
  4. Yea, I wasn't supposed to release this because I'm working on my own DayZ Gamemode for MTA (You can find more information about it on my portfolio website http://jsiau.site11.com/). But I decided to release this because the effect fx file would get stolen anyway.
  5. Yo, I made a realistic night shader, it makes the GTA world look a bit darker (configurable) when it's night. Screenshots: ================================================================ ================================================================ Download: https://mega.co.nz/#!1sZ3kYJK!a2J2iW8QDpIOppQ3-LPRKwJlcxUC64VlOsYbLvQb704 Mirror: http://updo.nl/file/2c6249fc.zip (Direct download)
  6. Ay, I made a DX Marketplace a few months ago, I decided to release it on the MTA Forums so everyone can copy 'n' paste my useful dx functions and use them in their scripts, or finish my dx marketplace. Anyways, here's the full-code. Download: http://goo.gl/iDhSD CLIENT: local sx, sy = guiGetScreenSize() local font = dxCreateFont('files/helvetica.ttf', 50, true) local visible = false local backgrounds = { [1] = { pos={0.2, 0.15, 0.2, 0.3} }, [2] = { pos={0.4, 0.15, 0.2, 0.3} }, [3] = { pos={0.6, 0.15, 0.2, 0.3} }, -- Bottom [4] = { pos={0.2, 0.45, 0.2, 0.3} }, [5] = { pos={0.4, 0.45, 0.2, 0.3} }, [6] = { pos={0.6, 0.45, 0.2, 0.3} } } local startX, startY = 0.22, 0.25 local itemWidth, itemHeight = 0.15, 0.15 local currentItems, maxItems = 1, 2 function market_toggle() visible = not visible if visible then market_createItems() addEventHandler('onClientRender', root, market_render) else removeEventHandler('onClientRender', root, market_render) end showCursor(visible) market_toggleHud(not visible) end function market_createItems() startX, startY = 0.22, 0.25 currentItems = 0 for i,v in ipairs(items) do v.x = startX v.y = startY v.color = { 255, 255, 255, 255 } startX = startX + 0.200 currentItems = currentItems + 1 if currentItems > maxItems then startX = 0.22 startY = startY + 0.18 currentItems = 0 end end end function market_render() if not font then return end -- Backgrounds for i,v in ipairs(backgrounds) do local x, y, w, h = unpack(v.pos) dxDrawImage(sx * x, sy * y, sx * w, sy * h, 'files/bg.png') end -- Header dxDrawRectangle(sx * 0.2, sy * 0.15, sx * 0.6, sy * 0.03, tocolor(30, 30, 30, 255)) -- Coins local coins = '3.000' local coinWidth, coinHeight = dxGetTextWidth(coins, 0.3, font), dxGetFontHeight(0.3, font) dxDrawImage(sx * 0.22, sy * 0.187, 24, 24, 'files/coin.png') dxDrawText(coins, sx * 0.245, sy * 0.186, sx, sy, tocolor(255, 200, 0, 255), 0.3, font, 'left', 'top', true) -- Scrollbar dxDrawRectangle(sx * 0.787, sy * 0.182, sx * 0.012, sy * 0.564, tocolor(60,60,60,255)) dxDrawRectangle(sx * 0.788, sy * 0.183, sx * 0.010, sy * 0.2, tocolor(150,150,150,255)) -- Items for i,v in ipairs(items) do local info, cost, vip, limited, new = v.info, v.cost, v.vip, v.limited, v.new local icon = v.icon local x, y = v.x, v.y local r, g, b = unpack(v.color) dxDrawImage(sx * x, sy * y, sx * itemWidth, sy * itemHeight, 'items/'..icon, 0, 0, 0, tocolor( r, g, b, 255)) if new then dxDrawImage(sx * (x + 0.106), sy * (y - 0.003), sx * 0.0585, sy * 0.0520, 'files/new.png', 0, 0, 0, tocolor(255,255,255,255), true) end end -- Hover-On if not isCursorShowing() then return end local cX, cY = getCursorPosition() for i,v in ipairs(items) do local x, y = v.x, v.y if cX >= x-0.001 and cY >= y and cX <= x + (itemWidth - 0.001) and cY < y + (itemHeight - 0.001) then v.color = { 255, 255, 255, 255 } -- Click if getKeyState('mouse1') and not clicked then -- Trigger event herr clicked = true elseif not getKeyState('mouse1') then clicked = false end else v.color = { 200, 200, 200, 255 } end end end function market_toggleHud(state) showPlayerHudComponent('all', state) end bindKey('F2', 'Down', market_toggle) SHARED: items = { { name='Item #1', icon='placeholder.jpg', info='This is an item', cost=100, vip=false, limited=false, new=true, available=false }, { name='Item #2', icon='placeholder.jpg', info='This is an item', cost=100, vip=false, limited=false, new=false, available=false }, { name='Item #3', icon='placeholder.jpg', info='This is an item', cost=100, vip=false, limited=false, new=false, available=false }, { name='Item #4', icon='placeholder.jpg', info='This is an item', cost=100, vip=false, limited=false, new=false, available=false }, { name='Item #5', icon='placeholder.jpg', info='This is an item', cost=100, vip=false, limited=false, new=false, available=false }, { name='Item #6', icon='placeholder.jpg', info='This is an item', cost=100, vip=false, limited=false, new=false, available=false } } SCREENSHOT: Fullscreen: http://i.imgur.com/wKS88bG.jpg
  7. Requires some editing to make it work. EDIT: used onClientRender as event. local clicked = false -- Hover-On if not isCursorShowing() then return end local cX, cY = getCursorPosition() for i,v in ipairs(items) do local x, y = v.x, v.y if cX >= x-0.001 and cY >= y and cX <= x + (itemWidth - 0.001) and cY < y + (itemHeight - 0.001) then v.color = { 255, 255, 255, 255 } -- Click if getKeyState('mouse1') and not clicked then -- Trigger event herr clicked = true elseif not getKeyState('mouse1') then clicked = false end else v.color = { 200, 200, 200, 255 } end end
  8. That's where I found it in the first place Anderl But it was easy to bypass so I made some changes to it. Such as player keys for example.
  9. Thankyou for stating your opinion myonlake. I'll look into your suggestion
  10. Introduction I decided to release this useful script to make players feel more safe when registering an account. Even server owners won't know your password unless they know your own personal key. Also... It's the 21st century, almost every legit website is using this way of encryption. (Except Banks, they use an RSA-Encryption to decrypt your data) How it works If a player joins for the first time, a file will be created in his/her PC containing a key that will be used to decrypt his password the next time he/she logs in. When a player registers an account, the submitted password will be encrypted into a 100% impossible-to-decrypt string. This is how it'll look like: o Rk?PL$Dh2[;G3J8HlScL_NdDL#:)K~`tZJ)NPlTfRa9#]8xA (The client won't be able to see this code because it'll be stored in a database, preferably a MySQL Database) Now, the question that remains is: 'Where is the key being used for?' Well, the key is being used to randomize the encrypted string and use it to decrypt the encrypted string later on when you log in again. This is how the key looks like: <keys> <key value="[ [ 7, 12, 28, 13, 34 ] ]"></key> </keys> Download: Coming soon, I'm making it more user-friendly at the moment FAQ Q: I deleted my key, how do I recover it? A: Once your key is deleted, it's not possible to recover it. Unless it's in your rubbish bin. Q: If someone breaks into my database, can they decrypt and steal everyones password? A: No, unless the 'infiltrator' knows each single individual key. Q: Passwords are already salted by default, this resource is useless! A: Passwords are only salted if you're using MTA's integrated account system * Note: This post will be updated
  11. I didn't think anyone would care looking in the code, as it is so simple. But I'll release it anyways, so new scripters that tried to look into the code and want to learn from it, can check it out. http://pastebin.com/b2HexeJJ There you go, Hope it helps you, Smart and Jesseunit. Yay! Thankyou for sharing the source-code Infinate. You seem to be a nice guy with tingling balls. Anyways, you helped me a lot by releasing the source-code to the public because I could've never scripted something like this. Now I can finally start working on my flying dumpster script. EDIT: I dreamt about this last night, it seems like I just had a déja-vu. (And tingling balls)
  12. People want to compile their work for their own reasons. If you didn't want to use the code, you wouldn't check its code and see if it's compiled or not. So basically you are offending some people around here who want to compile their work for different reasons. - It looks fine, but you should've added a synchronization to all clients, rather, OR, the code looks shitty and he wants to hide it from public.
  13. Jesseunit

    Clan System

    Nice Gangsystem bruh It made my private part tingle.
  14. Awesome script! I'm going to use this for my Iraqi RP server!
  15. My [gameplay] folder is still visible, and it stays visible. No magic.
  16. Use getElementDistanceFromCentreOfMassToBaseOfModel
  17. Perfect example: https://wiki.multitheftauto.com/wiki/IsVehicleOnRoof
  18. You're right, example: Ban/Kick a player with a command, already exists within the FR GUI script Give all players money; function playerReward() local allPlayers = getElementsByType("player") for index,value in ipairs(allPlayers) do givePlayerMoney ( value, amount) end end addCommandHandler ( "reward", playerReward ) Blip Scripts; Blip = createBlip .... Blip2 = createBlip.. And the distance: setBlipVisibleDistance ( blip, dis ) setBlipVisibleDistance ( blip2, dis ) Music/Sound script; Client- addEventHandler( 'onClientResourceStart', resourceRoot, function( ) local sound = playSound3D( 'http://www.181.fm/winamp.pls?station=181-power&style=mp3&description=Power%20181%20(Top%2040)&file=181-power.pls', 485.87612915039, -11.931990623474, 1000.679687 ) setSoundMaxDistance(sound, 600 ) setElementInterior ( sound, 17 ) end ) function event () outputChatBox ( "An event has been created! Use /eventwarp to be warped to the event!", root, 0, 255, 0 ) end addCommandHandler ( "command", event ) Server- function warp (player) setElementPosition ( player, 485.87612915039, -11.931990623474, 1000.679687 ) setElementInterior ( player, 17 ) end addCommandHandler ( "eventwarp", warp ) Payday Script- function payday() local allPlayers = getElementsByType("player") for index,value in ipairs(allPlayers) do givePlayerMoney ( value, 10 ) outputChatBox (" Pay-check ", value, 255, 255, 255, false) outputChatBox ("You got 10$ for your personal earnings!", value, 255, 0, 0, false) end end function onResourceStart(thisResource) setTimer ( payday, 50000, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart ) Ped Script- createPed setElementInterior setElementDimension I like how you tried to impersonate CapY and Me... Yet you fail to script a proper function. And instead of using getResourceRootElement(getThisResource()) You could have also used resourceRoot
  19. Don't you try to be smart over here, you just reversed the topics but yet they have the same purpose. Yiss
  20. Nah, me and CapY are already submitting the scripts.
  21. No they won't, they'll respond saying something similar like: 'This is not a request forum, script your own shit first. And if there happen to be any errors, we'll help you further'
  22. Hehe, 25 cents for one blip... Blip system: SERVER local blips = { [1]={ id=13, pos={0, 0, 3} }, -- Creates a pink 'C' in the middle of SA [2]={ id=13, pos={100, 0, 3} } -- Creates another pink 'C' somewhere near the middle of SA } addEventHandler('onResourceStart', resourceRoot, function() for i = 1, #blips do local x, y, z = unpack(blips[i].pos) local id = blips[i].id local blip = createBlip(x, y, z, id, 2, 255, 255, 255, 255, 0, 99999.0, root) end end) Skin replacement: CLIENT local skins = { [1]={ file='skins/7.txd', replaceID=7 }, [2]={ file='skins/11.txd', replaceID=11 }, [3]={ file='skins/47.txd', replaceID=47 }, [4]={ file='skins/37.txd', replaceID=37 }, [5]={ file='skins/18.txd', replaceID=18 } } addEventHandler('onClientResourceStart', resourceRoot, function() for i = 1, #skins do local txd = engineLoadTXD(skins[i].file) engineImportTXD(txd, skins[i].replaceID) end end) Ban system: SERVER addCommandHandler('pban', function(player, cmd, target, reason) if not target or not reason then outputChatBox('SYNTAX: /'..cmd..' ', player, 240, 0, 0, false) return false end local acc = getPlayerAccount(player) if isGuestAccount(acc) then return false end if isObjectInACLGroup ("user."..getAccountName(acc), aclGetGroup ("Admin")) then local target = getPlayerFromName(target) if target then banPlayer(target, false, false, true, player, reason, 0) else outputChatBox('Player not found, it might be because this script sucks and is made under 2 minutes and requires improvement.', player, 240, 0, 0, false) end end end)
×
×
  • Create New...