Jump to content

Dazee

Members
  • Posts

    39
  • Joined

  • Last visited

About Dazee

  • Birthday 20/02/2000

Details

  • Gang
    CiT|FBI
  • Location
    Sarajevo, Bosnia & Herzegovina
  • Occupation
    Web Developer
  • Interests
    Scripting,CiT ^.^

Recent Profile Visitors

1,050 profile views

Dazee's Achievements

Rat

Rat (9/54)

0

Reputation

  1. Dazee

    [REL]atm_system

    Bump, the resource has received a somewhat major behind the scenes rework and now works with the latest version of the game Long overdue update 6 years later ? General code refactoring employing better practices than before (I hope) https://community.multitheftauto.com/index.php?p=resources&s=details&id=12425 modified buttonsStatus function mobile_atm_c.lua modified onPlayerClickBtnTransfer2 mobile_atm_c.lua modified transferMoney function mobile_atm_s.lua modified receiveDeposit function in mobile_atm_s.lua modified withdrawMoney function in mobile_atm_s.lua modified onPlayerClickBtnClose in mobile_atm_c.lua implemented possibly the dumbest way to handle 3 colors local RED = {255, 0, 0} local R,E,D = unpack(RED) oh well :[ in mobile_atm_s.lua fixed grammar mistake of function name receiveDeposit mobile_atm_s.lua moved ATM1 global variable into transferConfirmation function mobile_atm_c.lua moved ATMGUI global variable into openATMGui function mobile_atm_c.lua removed testFunction in mobile_atm_s.lua fixed bug where the current balance wasn't being displayed if the value didn't exist now it instead displays $0 if the value doesn't exist in the account data Feedback is appreciated!
  2. The field where you should input text of the message is just unable to be clicked on *grayed out* its weird. EDIT: Okay now it works. lol it was grayed out before when i tried to send its super weird.
  3. Sorry for late answer, I am still unable to login to my community.multitheftauto.com account after such a long time, I forgot I posted here for help thanks for answering. I am unable to send you text in a message on forums so I can say my account username is donbosnian https://community.multitheftauto.com/index.php?p=profile&id=388514 I can't remember which e-mail i used to register tho. You can confirm it's me if you download the atm_system published on donbosnian in the script it notes that you should not redistribute it, bla bla, because this is property of donbosnian a.k.a dazee.
  4. To save the position you have to use setAccountData and getAccountData or SQL queries, or if you meant to text file you can do XML. All the information on how to do this is available on wiki.multitheftauto.com.
  5. I am pretty sure I am using the right user ID and password to login on community.multitheftauto.com but I always get in return "invalid user ID", makes no sense.
  6. Can you run debugscript 3 in-game and run this, and tell me if you get any errors or warnings?
  7. But you can't do an if on a function mate because it will always return true
  8. Would it be possible for you guys to release the mtaserver.conf and acl.xml you used ?
  9. Dazee

    [REL]atm_system

    Bump, I updated the resource to 1.4.0 after a long time and there's some major additions. https://community.multitheftauto.com/in ... s&id=12425 (+)Added a transfer confirmation window. (+)Made it so when you click on your balance two times or on your on hand balance in the GUI the amount it shows is inserted into the edit box for quick deposits/withdrawals of all of your money at once. (+)Removed a lot of unnecessary code from the resource making it faster. (+)Made it so that new players when they try to deposit/withdraw money for the first time their account data balance will be set to 0 so they can use the ATM normally. (+)Fixed bug where u could open multiple ATM GUI's from console (+)Fixed arithmetic operation bugs that would sometimes show up in console. The video got taken down for some reason I will make a new one soon
  10. Dazee

    Getelementdata

    I believe the error you are getting is because the local money = getElementData(safe, "money") is in a seperate function than the object safe try this function safeLoadCallback(qh) local result, num = dbPoll(qh, 0) for k, row in ipairs(result) do local safe = createObject(2332, row["x"],row["y"],row["z"],row["interior"],row["dimension"],row["rotation"]) setElementData(safe, "dbId", row["id"]) setElementData(safe, "x", row["x"]) setElementData(safe, "y", row["y"]) setElementData(safe, "z", row["z"]) setElementData(safe, "interior", row["interior"]) setElementData(safe, "rot", row["rotation"]) setElementData(safe, "group", row["group"]) setElementData(safe, "money", row["money"]) setElementData(safe, "kokain", row["kokain"]) setElementData(safe, "heroin", row["heroin"]) setElementData(safe, "matreial", row["material"]) function test(player) local money = getElementData(safe, "money") outputChatBox("money: "..money,player, 255, 0, 0) end end end addCommandHandler("test", test, false, false) Tho I'm not sure about this I only had a quick look.
  11. Dazee

    Chat type

    There's a simpler way Make a script with for example a command /radio with a 3rd argument which will be our chat text in a string. I did this just for youu : function isPlayerInTeam(player, team) assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]") assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]") return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true))) end --isplayerinteam is from wiki mta function radioCommand(thePlayer,cmdname,arg3) local playerName = getPlayerName(thePlayer) if isPlayerInTeam(thePlayer, "Police") then -- 2nd argument is the string name of the team that is created on server for i, players in ipairs(getPlayersInTeam(getTeamFromName("Police"))) do outputChatBox(""..playerName..":" ..arg3.."",players,0,255,255) end else outputChatBox("You need to be in the Police team to use this command!",thePlayer,255,0,0) end end addCommandHandler("radio",radioCommand) Now after you have the radio thing for example in your server use bindKey to (bind key chatbox cmdname example bind u chatbox radio) You can use my lua example to make new chats if this is what you asked for u weren't very specific. Instead of using isPlayerInTeam you can use your script but this is good if you want to make specific chats for example the radio for the police team u can do almost anything u want with this example, except draw new chat if u meant that im not sure about that honestly.
  12. Yes it is possible you can apply what I provided below to your use. local LS = createColRectangle (-800.81671, -2990.10657, 5100, 3330) local LV = createColRectangle (-810, 350, 5000, 3000) local SF = createColRectangle (-4000, -3000, 3190, 6000) function getPlayerCityName(element) if ( not isElement(element) ) then return end if (isElementWithinColShape(element, LS)) then result = "LS" elseif (isElementWithinColShape(element, LV)) then result = "LV" elseif (isElementWithinColShape(element, SF)) then result = "SF" end return result end But make sure to destroy the browser when the player leaves the rectangle.
  13. Dazee

    [REL]atm_system

    I just updated this resource to version 1.3.0 https://community.multitheftauto.com/in ... s&id=12425 (+)Redesigned the GUI a bit (+)Some optimizations with the client side (+)Added an option so that you can disable other people sending you money (/settings bank) works like a light switch. (!)Working on transfer limit. (!)Finished the physical ATMS and functionality just need to place them all over the map which is coming soon.
  14. Dazee

    Number format

    This migth be useful I use it for all of my number formatting, function comma_value(amount) local formatted = amount while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if (k==0) then break end end return formatted end Example of usage: outputChatBox("You have recieved: $" ..comma_value(amount).. " into your bank account",source,0,255,255)
  15. Introducing the ATM_SYSTEM GUI: Your All-in-One Solution for Virtual Financial Transactions on your MTA server Are you tired of navigating through complicated menus just to access basic virtual banking features on your MTA SERVER? Look no further! The ATM SYSTEM has got you covered. With a sleek design and user-friendly interface, you can easily manage your virtual finances in a matter of seconds. Here are some of the features that the ATM GUI offers: Deposit money quickly and easily. Withdraw money with just a few clicks. Transfer funds to other online/offline accounts on the server. Get transfer confirmations to avoid accidental transfers. Enable/disable receiving transfers from other users with the /settings bank command. Enjoy a simple and visually appealing GUI. Use the double-click feature by clicking on one of your balances this will add your on-hand or bank balance to the amount field for faster deposits and withdrawals. To access the ATM GUI, simply type /mobileatm in-game. Notes: If you experience any bugs feel free to reply with your issues and I'll do my best to help! Link to the community resource How the UI looks:
×
×
  • Create New...