Jump to content

codeluaeveryday

Members
  • Posts

    575
  • Joined

Everything posted by codeluaeveryday

  1. I'll simplify this out, I have a (steve.png), that is the minecraft steve. He is 64x32 in size. Now I have imported him into MTA using a DFF and shader to apply it. When I apply a 64x32 image, it anti-aliases it and sizes it up. So I have to use Paint to resize it to 1024x512, and now it looks better. So my question is: How can I make my shader or Lua script change the size from 64x32 to 1024x512, the main reason is I don't see why players should need to download a 5kb file over a 1kb file? Please remember NO ANTI-ALIASING :\ I've also tried this: dxSetTexturePixels(theTexture, dxGetTexturePixels(theTexture), 0, 0, 1024, 512)
  2. It's quiet basic, I can make this for you for 2-3 euros, depending on the extra's. Add me on Skype: Chrisinater22
  3. Yeah it happened in CIT a lot. Ask Arran, he created a fix for it. It was mid way in a bank rob and MAN WAS I WRECKIN people, so I started to realize they were using the spaz shotgun, and I'm thinking how the fuck is the wall bug not hitting me, I then thought, omg do I have that bug, so I took a leap of faith and ran out there. I didn't die. They all called me a hacker, so I went to the bottom floor and called an admin and told him that I didn't abuse it and went straight to the bottom floor, from then I was their first person to not quit, so I gave them debug info too, and it was solved thanks to me. Heck if I know what they did though.
  4. So what is the benefit of having HoloScreens? What do they do?
  5. Similar design to CIT's login panel, but ehh okay. Nice job anyways.
  6. Instead of using the Scroll Pane element to display the apps, why not make a basic pagination script? So lets say there is 20 apps, and the maximum you can fit on one page is 12. So you would do: 20/12 = 1.66, then if you use math.ceil to round it up you would get two, and thats the maximum pages. Doing the rest should be easy.
  7. Wow fucking nice no serious??? my fireworks resource didn't even come close, you're using a gif / animated version. That's genius. SociusPirate seems like a decent site to upload my shit on, how much download limit do we get? and is it free? I got a few more questions about it, is there any exports? or easy ways to create a rocket? Great job btw.
  8. No I did *not* de-compile this resource, that would be very naughty of me This script has commands which will wreck a certain RPG gamemode and also randomly blow peoples cars up, full of backdoors... https://community.multitheftauto.com/index.php?p= ... ls&id=9564
  9. No XxMadexX... You're stating the obvious. getRootElement() returns a lot of data and is not recommended to trigger the root element. Using source or something small is much better.
  10. He's been scripting for 2 days and can already make smaller mistakes than what you can. Don't judge this guy, even if he's better. As for Dazee, long live KLM. Regards, KLM-RC|csmit195#M
  11. codeluaeveryday

    HUD

    WTF, why are you spamming the createBlips function? That's one way to bring the servers performance down.
  12. Quite the problem you have here bro, I think it has to do with the Map Times using OOP. I'm going to give you a small edit and we will see if it works. In the "race_toptimes" resource, add this near the getTimeForPlayer function: local callTimeForPlayer = function(player) sMaptimes:getTimeForPlayer(player) end In the "race_toptimes" resource, export the callTimeForPlayer function. We can now modify your original script: function hunter(pickupID, pickupType, vehicleModel) if (pickupType == "vehiclechange") then if (vehicleModel == 425) then outputDebugString ("Hunter !") call(getResourceFromName("race_toptimes"), "callTimeForPlayer", source ) end end end addEvent('onPlayerPickUpRacePickup', true) addEventHandler('onPlayerPickUpRacePickup', source, hunter) Let me know of your findings, this problem intrigues me.
  13. I don't trust this guy, he's offered to pay from most other services BUT PAYPAL. Paypal is the only one which can return the money if it's fraudlent. If we made a script and he didn't pay for it, then Paypal has the right to snatch it from his bank account. I fucking love paypal.
  14. local pBlips = {} function onSpawn ( ) takeAllWeapons ( source ) giveWeapon ( source, 24, 100 ) local playerTeam = getPlayerTeam(source) if (playerTeam) and not pBlips[source] then local r, g, b = getTeamColor(playerTeam) local myBlip = createBlipAttachedTo ( source, 0 , 2 , r,g,b ) pBlips[source] = myBlip setPedStat ( source, 73, 1000 ) setPedStat ( source, 75, 1000 ) setPedStat ( source, 71, 1000 ) setPedStat ( source, 75, 1000 ) setPedStat ( source, 77, 1000 ) setPedStat ( source, 78, 1000 ) giveWeapon ( source, 26, 100 ) giveWeapon ( source, 32, 100 ) giveWeapon ( source, 31, 150 ) giveWeapon ( source, 46, 200 ) givePlayerMoney ( source, 5000 ) elseif pBlips[source] then destroyPlayerBlip(source) end end function destroyPlayerBlip(pElement) local theElement = source or pElement if pBlips[theElement] then destroyElement(pBlips[theElement]) pBlips[theElement] = nil end end addEventHandler("onPlayerSpawn", getRootElement(), onSpawn) addEventHandler("onPlayerWasted", getRootElement(), destroyPlayerBlip) addEventHandler("onPlayerQuit", getRootElement(), destroyPlayerBlip)
  15. I cannot stand people who think they're top shit when they're obviously not. Sorry dude, but nothing I have seen from you is that impressive. You will get there one day, I wish you luck. Please refrain from using GUI elements, they are not considered a DX GUI. local theInput local textColor = tocolor(0, 0, 0, 255) local editBoxColor = tocolor(255, 255, 255, 255) addEventHandler("onClientRender", root, function() if theInput then dxDrawRectangle(395, 395, 100, 55, editBoxColor) dxDrawText(theInput, 400, 400, 90, 45, textColor) end end ) addEventHandler("onClientCharacter", root, function(theChar) theInput = theInput .. theChar end ) -- handling the backspace key: addEventHandler("onClientKey", root, function(theButton, state) if theButton == "backspace" and state == "down" then theInput = theInput:sub(1, theInput:len()-1) end end ) I cannot guarantee this will work, its 2am, and didnt want to test it. It's the general method though. changing the colour is as simple as changing the variable data.
  16. spent a good 20 minutes figuring it out for you, I had numerous ideas, and I ended up here: function stripNonANSIData(str) local str = tostring(str) local newSTR = '' for i=1, string.len(str) do local theChar = str:sub(i, i) local theANSINumber = string.byte(theChar) if theANSINumber > 32 and theANSINumber < 127 then newSTR = newSTR..theChar end end return newSTR end ^ English only rly, no arabics, no spanish poodles.
  17. I'm sure KRZO's one will not work, here: local pBlips = {} function onSpawn ( ) takeAllWeapons ( source ) giveWeapon ( source, 24, 100 ) local playerTeam = getPlayerTeam(source) if (playerTeam) and not pBlips[source] then local r, g, b = getTeamColor(playerTeam) local myBlip = createBlipAttachedTo ( source, 0 , 2 , r,g,b ) pBlips[source] = myBlip setPedStat ( source, 73, 1000 ) setPedStat ( source, 75, 1000 ) setPedStat ( source, 71, 1000 ) setPedStat ( source, 75, 1000 ) setPedStat ( source, 77, 1000 ) setPedStat ( source, 78, 1000 ) giveWeapon ( source, 26, 100 ) giveWeapon ( source, 32, 100 ) giveWeapon ( source, 31, 150 ) giveWeapon ( source, 46, 200 ) givePlayerMoney ( source, 5000 ) elseif pBlips[source] then destroyPlayerBlip(source) end end function destroyPlayerBlip(pElement) local theElement = (pElement and getElementType(pElement) == 'player' and pElement) or source if pBlips[theElement] then destroyElement(pBlips[theElement]) pBlips[theElement] = nil end end addEventHandler("onPlayerSpawn", getRootElement(), onSpawn) addEventHandler("onPlayerWasted", getRootElement(), destroyPlayerBlip) addEventHandler("onPlayerQuit", getRootElement(), destroyPlayerBlip)
  18. Don't use getElementPosition, use: getPedBonePosition
  19. The functions may be made by you, but the idea is not original. The other guy has a point, you can easily find other RPG scripts with the exact purpose.
  20. Sorry that Castillo couldn't help you. I have to admit your code makes it hard to understand, please try to clean it up next time. local allMissions = { [1]={ ["name"] = "Mission I", ["info"] = "asefafasf asd asgd asd aysda shgd asd sdjf fs fh" }, [2]={ ["name"] = "Mission II", ["info"] = "asDFsdf sdsD Fasdfas fdfH:SD dfG sdfg" } } addEventHandler("onClientResourceStart", resourceRoot, function() missionWindow = guiCreateWindow(238, 190, 402, 264, "Mission Panel", false) guiSetVisible(missionWindow, false) guiWindowSetSizable(missionWindow, false) guiSetAlpha(missionWindow, 0.65) nameGrid = guiCreateGridList(10, 26, 122, 228, false, missionWindow) guiGridListAddColumn(nameGrid, "Missions", 0.7) local mrow = guiGridListAddRow(nameGrid) guiGridListSetItemText(nameGrid,mrow,1,"Missions",true,false) myFont = guiCreateFont( "font.otf", 12 ) --guiSetProperty (nameGrid, "#Font", "default-bold-small" ) infoGrid = guiCreateGridList(142, 26, 250, 180, false, missionWindow) infoLab = guiCreateLabel(10, 40, 230, 130, "", false, infoGrid) guiSetFont(infoLab, "default-bold-small") guiLabelSetHorizontalAlign(infoLab, "center", true) yesnoGrid = guiCreateGridList(0, 10, 230, 120, false, infoLab) guiSetVisible(yesnoGrid, false) yesnoLab = guiCreateLabel(10, 10, 210, 66, "Do you want to be continue?", false, yesnoGrid) guiSetFont(yesnoLab, myFont) guiLabelSetHorizontalAlign(yesnoLab, "center", true) guiLabelSetVerticalAlign(yesnoLab, "center") yes = guiCreateButton(20, 86, 66, 24, "Yes", false, yesnoGrid) guiSetFont(yes, "default-bold-small") no = guiCreateButton(144, 86, 66, 24, "No", false, yesnoGrid) guiSetFont(no, "default-bold-small") infoNameLab = guiCreateLabel(10, 9, 230, 21, "", false, infoGrid) guiSetFont(infoNameLab, myFont) guiLabelSetHorizontalAlign(infoNameLab, "center", true) for i=1,#allMissions do local row = guiGridListAddRow(nameGrid) guiGridListSetItemText(nameGrid,row,1,allMissions[i].name,false,false) end addEventHandler("onClientGUIClick",nameGrid,function() local row = guiGridListGetSelectedItem(nameGrid) if(row > 0) then local name = guiGridListGetItemText(nameGrid,row,1) guiSetText(infoLab,allMissions[row].info) guiSetText(infoNameLab,allMissions[row].name) end end, false) take = guiCreateButton(142, 223, 98, 31, "Take Mission", false, missionWindow) guiSetFont(take, "default-bold-small") close = guiCreateButton(294, 223, 98, 31, "Close", false, missionWindow) guiSetFont(close, "default-bold-small") end ) function select() if (source == close) then guiSetVisible(missionWindow,false) guiSetVisible (yesnoGrid, false) showCursor(false) elseif (source == take) then guiSetVisible (yesnoGrid, true) elseif (source == no) then guiSetVisible (yesnoGrid, false) elseif (source == yes) then guiSetVisible (missionWindow, false) guiSetVisible (yesnoGrid, false) showCursor(false) local row = guiGridListGetSelectedItem(nameGrid) if (allMissions[row]) then outputChatBox ("You have taken "..allMissions[row]["name"]) end end end addEventHandler("onClientGUIClick", root, select) function open() if (guiGetVisible (missionWindow) == true) then guiSetVisible(missionWindow, false) showCursor(false) elseif (guiGetVisible (missionWindow) == false) then guiSetVisible(missionWindow, true) showCursor(true) end end bindKey ("R", "down", open) you had: if (allMissions[1]) then outputChatBox ("You take the Mission I") elseif (allMissions[2]) then outputChatBox ("You take the Mission II") end I changed: local row = guiGridListGetSelectedItem(nameGrid) if (allMissions[row]) then outputChatBox ("You have taken "..allMissions[row]["name"]) end
  21. Note: this topic is for current or ex server owners! Hello peepz! This is probably one of the weirdest things you will ever here me request. I'm creating a massive database for player alias's and I plan to have it directly related to an upcoming service I'm working on called MTA Reviews, it's pretty much a server review system (read my post history). So I'll try to simplify it: What I need: The LOG ("/mods/deathmatch/logs/server.log") files from your servers The internal.db files ("/mods/deathmatch/internal.db") -- Security issues are here, so I understand if you don't want to share this. Why I need: I need these one or two files to get all the connecting players serials and names, this will go towards our databases and we will not share or attempt to use these in any other way. We will actually be using a standalone lua file to parse all the joins. Security Promise: We will never allow this database to be shared with anyone by myself. The names stored in the database may be used for our future services, but not directly outsources to other people.
  22. The script can be modified to allow that, but it would be the owners decision on what the player gets. I would have to add a feature to allow you to add your in-game account before voting.
  23. Hey Noki, I've been very busy with study lately, I still host my game-servers, but with limited updates. I've been looking for a project to work on for my professional portfolio, this would be a project worthy of getting me the job I want in life. I really like this project too, but it's a massive project. I recognize that not everyone will trust a resource which collects information and scans the server for vulnerabilities, but I'll happily answer any question and reassure everyone that this project is as it seems. ** Our site will have ads displayed, unfortunately I need the site to generate some kind of income. **
  24. -- Note this is just and idea and is open for lots of change. It's a big project and I would like the approval of the community before creating this project. MTA Reviews Hello MTA:SA community! I am willing to bring a new free service to the players of MTA. This idea is suppose to help players find the servers they like and alert others of thieving "pirates". Unlike other services which have been offered in the past, you will come to notice that our service actually has done legal research and is well aware of how servers are suppose to be storing data. Did you know that their is few servers out their breaking the law and stealing your information right under your nose? Do you want assurance before registering on a server? Our idea is going to revolutionize the way we look at MTA servers. If I decide to finish this service, it will not die until MTA dies, and I guess even then I wouldn't fully let it die, I would attempt to merge it in to another game. I have more than enough money to keep such a service running for a lifetime. I believe that players are the top-priority of a server and deserve quality service and assurance. This service is aimed to help servers help players. Our service will need moderators in due time, but these moderators must understand what they are getting in to. This service requires legitimate verification of age and photographic ID. We may even want to call you on skype, this will help us ensure that our moderators will not abuse the features they are offered. Below is a list of features our service CAN provide and if you want to read more about the following list, you can continue on. Look for servers based on location, registered users, player count, uptime, features and much more. Verified servers Certified servers Fraudulent servers Suspicious servers You can rate servers out of 1 to 5 You can write reviews Upload videos or screen-shots of the server, even share youtube videos. I'm registered here button Server Verifier resource Claim ownership of a server Filtering/Finding Servers: The search feature allows you to search for servers based on: Location Popularity Features Resources Gamemode Uptime Maps Download size Server security (including #AC information and network encryption) More to come! Verified servers: Verified servers are servers which are running our server statistics script. Once a day it will collect information on the servers and transmit it to our servers, it will help with collection the following information: Popularity Registered accounts Maps Game-mode Resources Server security Uptime General server information Most of this information will be reviewed and tested by our moderators. If we find servers attempting to submit fraudulent or false data to trick our servers we will put the server on our fraudulent list, this will still collect data from the servers, but they will not receive a certified status until our moderators see fit. Certified servers: Certified servers have passed all of our moderators tests. We cannot guarantee that all certified servers are non-fraudulent, but we can guarantee that their servers are offering correct information. Additionally claiming a server can help protect it from becoming receiving a fraudulent status, considering that we allow you to receive messages from players and help resolve issues. Fraudulent servers: Fraudulent servers have been confirmed via our staff or by community vote. Fraudulent servers may store passwords unencrypted and collect personal information which can be used for unethical reasons. They may also attempt to hide aspects of their servers which they do not want players to find out. We advise against using your normal password on these servers. Suspicious servers: Suspicious servers have been marked as suspcious when moderators cannot find enough evidence to label these servers as Fraudulent. Server owners have a chance to redeem themselves. This may be as little as adding a second resource which will scan the server completely for fraudulent data and if no warnings are returned then the server can be put as a Certified server. I understand that this resource may not be appreciated by everyone. Truthfully it will scan all databases on the server for unprotected users, non of this data will be sent back to our databases. It would be illegal for us to do that. Considering that my name, country and website is associated with this service, I would not abuse that. Server ratings: Players all over MTA have been wanting this in our normal server browser, but they simply cannot do it cause of game-monitor. This feature will allow you to rate your favourite servers out of 1-5 and this can help players finding the right server for them. Note for MTA developers: If I was to create a method for you guys to retrieve the servers ratings, would you add it to the browser? Server reviews: Finally you can speak your mind about the servers that you hate or love the most. Unfortunately for regional laws we must attempt to prevent swearing, we may add a feature to disable our swear filter. Server media: Yep! That's right, we're allowing you to upload videos to our website! We may even add an exception to download the video. We feel like this would make an excellent addition to our service as we do have infinite file hosting and bandwidth. Youtube videos may also been viewed via our site if you do not want to upload it to our site. I'm registered here button: Clicking this button will notify you if this server is found to be fraudulent. This will then pose a risk to your password safety. If you wish to change your password on some servers, but their is no features for it. Simply lodge a request with our moderators, detailing all the servers you want a password change for. If some of these servers are already verified, we will contact the server owner and ask for permission to change your password via one of our utility resources. Otherwise we will manually join these servers and attempt to speak to admins and see if they can assist you. Verifying/utility resources: These resources allow us to collect information, and with the permission of the owner we can alter certain information. This type of information may be for users passwords or other security issues. We will never change any information without the full permission of the servers creator. Claim ownership: You are able to claim server ownership, this will help you get a better reputation by allowing players to leave you messages and allowing our moderators to easily contact you incase of player issues. About myself: I am a student at Southbank Institution of Technology in Australia and looking forward to becoming a web developer in the years to come. I am studying a Diploma in Website Development and hopefully next year I will move on to my Bachelor of Interactive Technologies which is a really in-depth course about website and game development.
  25. http://postimg.org/image/kb05e7if1/ ^^ this one is easy. Now this one is also easy: http://4.bp.blogspot.com/-jvCLRDjjyv0/U ... tortas.png ^^ google chart api. You are able to register an API key with Google Chart, and it will allow you to send data to their servers and it will return image data which is drawable with dxDrawImage.
×
×
  • Create New...