Jump to content

steadyfi

Members
  • Posts

    144
  • Joined

  • Last visited

Everything posted by steadyfi

  1. Quick disclaimer, my server is down, so you need to use your own HTTP w/ PHP server to make emails work!
  2. Hi everybody, PewDiePie here, A couple days ago I fell into boredom, and started working on vAuth again. So here it is, fresh and updated: vAuth 1.2 RELEASED, now moved to GitHub! Changelog: - Recoded & Cleaned the whole resource. - Moved to GitHub. - Added MIT License to the code. - Appended "steadyfi" namespace to all events to avoid conflicts. - All account data keys, email templates, the webserver url, and recover tries can be easily changed from the meta.xml settings, and can even be changed during run-time without the need of a restart. Even tho the changelog isn't too... exciting, I took my time and recoded or cleaned the whole files, and made sure it can deliver better performance and stability. Hence it's only a very small script, nothing can go wrong, error-wise at least. If you discover any bugs or exploits, please report them immediately to the Issue section of the repository or here as a reply. DO NOT PM ME, as I'm blind as a bat in sunlight, and rarely even notice the notification counter. I will try to respond as fast as possible to every issue. If you have any suggestions, don't hesitate to write them down here. That's pretty much all of it. I might release a simple, minimalist and easy to setup, Login Panel later. Until then, please enjoy your lives... no rly, pls dont be liek me. The memes are over, thank you for the attention. Greetings, Steady.
  3. Thanks for the reply! I know I could've done something like that, I was just saying that it would've been I nice feature to be implemented to the Lua API.
  4. Hello. While I was coding, I realized one thing: It would be awesome if you could pass a table of events to a addEventHandler() function. Example: addEventHandler("event1", getRootElement(), function() -- This will listen to only one event, passed in the first argument. end); addEventHandler({"event1", "event2"}, getRootElement(), function() -- This will listen to multiple events, passed as a table in the first argument. end); There are times when you only want a anonymous function, but you gotta listen to multiple events, and you end up with really long names, usually which don't make sense, just to not interfere with the other functions. This shouldn't be hard to implement, as far as I know. Just overload the addEventHandler() ;D. I hope this makes sense. Have a great day!
  5. steadyfi

    ASE Help

    You can use the PHP SDK library to build your own system for communications. You can call functions on your MTA server remotely from the web server. Pretty good for a bit more advanced stuff, rather than just simple ASE stuff. Thanks! //Can close topic
  6. steadyfi

    ASE Help

    Interesting library, thanks! Could you tell me what functions did you use on your webserver? A small snippet would mean a lot. Thanks for the information!
  7. steadyfi

    ASE Help

    Hello community. I wanna make a webpage which shows all the players which are online on the server. My question is, how do website's like Game-Tracker or Game-State query the player list? Is there any kind of special query protocol or something? I've seen this on the wiki, Will ASE help me in any way? If yes, how do I query this port? Thanks!
  8. Please stand by! vAuth will soon be updated!
  9. Sorry, didn't really pay attention to the title at first, so I just put "Release". I may fix it if I can. Well, I don't think the name of the resource really matters. I am working to make it more stable and even implement more functionalities to it in order to sell it.
  10. I saw a server called Top-GTA, a MTA DayZ server, that uses shaders stored in the format of .vtf. The .vtf format stands for Valve Texture Format (Outside Link), but the files they use are not common VTF Files, they are somehow modified and not conventional. As far as I tried, no Standard VTF Editor/Viewer can read from them, which lead me to the idea that they are somehow Invalid, for the .vtf format, but valid for MTA to load them. Also, MTA wouldn't be able to load conventional VTF Files, as they are newer technology, they are meant especially for the Valve Source Engine, and RenderWare (GTA SA Engine) wouldn't be able to handle them. I tried to load them, it kinda worked, but the Texture doesn't apply. The object remains white. local shader = dxCreateShader("world.fx"); local texture = dxCreateTexture("test.vtf", "argb"); dxSetShaderValue(shader, "gTexture", texture); engineApplyShaderToWorldTexture(shader, "desgrassbrnsnd"); If any of you know, I would like to hear what you say. Thanks
  11. Hello ! I've got a little problem here with dbQuery. I can't seem to understand how to pass the results correctly to the callbackFunction. Code: dbQuery(function(deaths, matches) dbExec(db, "UPDATE main SET deaths=?, matches=? WHERE account=?", tonumber(deaths) + 1, tonumber(matches) + 1, getAccountName(getPlayerAccount(source))) end, {deaths, matches}, db, "SELECT deaths,matches FROM main WHERE account=? LIMIT 1", getAccountName(getPlayerAccount(source))) SQL Table: I have everything set. There you can also see ROW Properties. Error: [2015-04-10 14:40:50] ERROR: ***\main_s.lua:92: attempt to perform arithmetic on a nil value Thanks !
  12. What do you suggest ? example: A tab that you Spawn / Delete Tent with Items - So all in a Resource. and also add a tab Another Admin Can See The inventory players, helping to account players fiction abusing items bugs. This would help me Enough Even. Good one. Thank you buddy. Gonna release that tomorrow (i hope), right now I have to work on another project.
  13. steadyfi

    mini-games

    1. It is possible, but it would be kinda hard. You need to use DX functions to draw the snake and etc. 2. No ! MTA has it's own Lua Environment, with it's own functions. The Programming Language used for scripts is Lua. You cannot use JSON to script here. What you have there is a game made for another platform that has it's own functions. Therefor, you should learn Lua. It is not that hard. But remember, do it as a HOBBY, not a OBLIGATION ! You can ask us (the MTA Community) if you've got a problem, everyone is here to help. Here are some link what can introduce you to Lua and MTA Scripting: On the forums: The ultimate Lua tutorial - by xXMADEXx Basic Lua - by Mr.gSub MTA LUA Tutorial for beginners ! - by Hell-Mate Wikis: Lua Wiki "Lua Users" Unofficial Wiki (More Advanced) MTA Wiki
  14. steadyfi

    mini-games

    This is made for another Lua Environment. The Lua RE that MTA uses is based on other functions. You need to learn how to port it, if not even make it into MTA from scratch... "Click me, i'm the MTA Wiki !" Good luck !
  15. I don't think that setting account data on exit based on account data is the solution. Explanation: accountData is always saved AUTOMATICALLY. It's being saved in internal.db where it is safe and is stored by account Here is my version, I commented all of it. P.S: Put it in your code editor, the text is very disordered here in the Code Box. function getPlayerFromPartialName(who) --Useful Function | Author: TAPL local who = who and who:gsub("#%x%x%x%x%x%x", ""):lower() or nil if who then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(who, 1, true) then return player end end end end function vip(thePlayer, cmd, target) if isElement(thePlayer) then --Check if the player who triggered the function exists (not really useful, just to hesitate errors) if (target ~= "") then --Check if the target string isn't empty local target = getPlayerFromPartialName(target) --Call the function "getPlayerFromPartialName" to get the target element from the name and store it as the var target if isElement(target) then --Check if the element "target" exists local account = getPlayerAccount(target) --Get the target account if (getAccountData(account, "vip") == false) then --If he is not a vip, then... (vip == false) setAccountData(account, "vip", true) --Set his VIP status outputChatBox("Added "..getPlayerName(target):gsub("#%x%x%x%x%x%x", "").." as VIP", thePlayer, 255, 255, 255) --Output to thePlayer's chat elseif (getAccountData(account, "vip") == true) then --If he is a vip, then... (vip == true) setAccountData(account, "vip", false) --Set his VIP status outputChatBox("Removed "..getPlayerName(target):gsub("#%x%x%x%x%x%x", "").." as VIP", thePlayer, 255, 255, 255) --Output to thePlayer's chat end --The code above makes it so you can use only one command for ADDING and REMOVING end end end end addCommandHandler("avip", vip) --Add the command You shall chose the one you like
  16. Thank you everybody for 417 Downloads !!! You just made my day
  17. #SOLVED Thanks Necktrox & WhoAmI !
  18. He wanted to open it ONLY if he is in a vehicle
  19. marker = createMarker(1041.5,-1021.5,31,"cylinder",3.5,250,0,0,100,getRootElement()) blip = createBlipAttachedTo(marker, 27) setBlipVisibleDistance(blip, 300) function draw() modshop = guiCreateWindow(1230, 285, 323, 433, "Modshop", false) guiWindowSetSizable(modshop, false) Nitrox2 = guiCreateButton(20, 38, 134, 43, "Nitrox2", false, modshop) Nitrox5 = guiCreateButton(20, 100, 134, 43, "Nitrox5", false, modshop) Nitrox10 = guiCreateButton(20, 163, 134, 43, "Nitrox10", false, modshop) Exit = guiCreateButton(66, 375, 193, 48, "Exit", false, modshop) showCursor(true) addEventHandler("onClientGUIClick", Exit, Close, false) addEventHandler("onClientGUIClick", Nitrox2, Nitroxx2, false) addEventHandler("onClientGUIClick", Nitrox5, Nitroxx5, false) addEventHandler("onClientGUIClick", Nitrox10, Nitroxx10, false) end addEventHandler("onClientMarkerHit", modshopls1, function() if isPedInVehicle(getLocalPlayer()) == true then --Check if he is in a vehicle draw() --We call the function to draw the GUI end end) function Close() guiSetVisible(window, false) --There is no need to use a NOT Gate, all you want is to close it (false) showCursor(false) end function Nitroxx2() triggerServerEvent("onNitroxxx2", getLocalPlayer()) end function Nitroxx5() triggerServerEvent("onNitroxxx5", getLocalPlayer()) end function Nitroxx10() triggerServerEvent("onNitroxxx10", getLocalPlayer()) end
  20. There is a problem: When I reload the Total Ammo goes down -30 but the clip is empty so Save and Load it and then I takes -30 again. I was not having this problem. Problem Representation: Example Bullets: 180 Reload: -30 bullets Reload isn't instant, there aren't bullets in weapon The split get's triggered and then I load => -30 bullets This is a scheme of how my system works: Shoot Event Trigger > Get Ammo > Split > Save ElementData > Load ElementData > GiveBullets depending on ElementData
×
×
  • Create New...