Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. Dealman

    Jobs

    Look at it this way, it's kind of like a safe. You have a key to access the safe, and once you have access to it - you can retrieve whatever is in there. A very, very simple example; setElementData(localPlayer, "canDrive", "false") This would assign data to the local player. The key is "canDrive". This key is needed to fetch the data's value. In order to fetch the current content(s), you'd have to use getElementData, like this; outputChatBox("Data Contents: "..tostring(dataContents), 255, 0, 0, true) -- This will return nil, since dataContents has not yet actually been defined. Thus it is empty and returns nil. local dataContents = getElementData(localPlayer, "canDrive") -- Fetch the contents and store it to a variable. outputChatBox("Data Contents: "..tostring(dataContents), 255, 0, 0, true) -- This will now return a string, "false". It might seem a bit confusing at first, but once you've used it a few times - it's rather easy to work with. But however, do note that this is only a temporary way to store data. There are many different ways to achieve permanently stored data.
  2. I'm not saying that me in particular is interested to accept the job. I'm simply saying, you'd have a bigger chance of finding one if you actually make it clear as to what it is you want made. Doesn't have to be in detail, just so they get the idea of what kind of experience is needed.
  3. And we already told you what's wrong with it. So the need for full code should not be necessary. It's better if you fix it yourself instead of us doing it for you. Part 1: The variable v has not been defined, hence why Line 23 is giving you a warning - saying that v returned nil. for word in msg:gmatch("%S+") do iter = iter + 1 for i,swr in ipairs(words) do local src = word:lower():gsub("%s","") local src = src:gsub("#%x%x%x%x%x%x","") local src = src:gsub("%c","") local src = src:gsub("%p","") local pat = swr:lower():gsub("%s","") if src:find(pat) or isObjectInACLGroup ("user."..account, aclGetGroup ( "Nick" ) ) then cancelEvent() outputChatBox('#'..v["color1"]..' ' ..v["name"]..' '.. getPlayerName ( source ) .. ' : #'..v["color2"]..''..text..'', getRootElement(), r, g, b, true ) -- This is where the error is caused. break end end if iter == 1 and word:len() > 2 then word = word:gsub("%a",string.upper,1) end new = new..word.." " end Part 2: The reason is because v is defined after that code. v is first defined at Line 45. for k, v in ipairs(Tag) do if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v["tag"])) then cancelEvent() outputChatBox('#'..v["color1"]..' ' ..v["name"]..' '.. getPlayerName ( source ) .. ' : #'..v["color2"]..''..text..'', getRootElement(), r, g, b, true ) break
  4. It would still be helpful if you tell us what kind of script it is you're looking for.
  5. I believe it's because you're doing the for loop after you're trying to use the variable v. Therefore, when it runs the code at Line 23 - the variable v has not been set to anything. And therefore, it returns nil.
  6. I don't know what the most efficient way would be, but I'd assume you can make use of ColShapes to recognize whenever a player gets close to the gate, and prompt them with a message on what command and/or keybind to use. As for the password, you could use setElementData to temporarily store the password(Data is not kept after server restart, to store it after a restart you'll have to use SQL). Then you can compare if the entered password is equal or not to the actual password. And move the gate accordingly. Then again, as I said, there might be a better way to accomplish this. This is simply how I personally would do it. Give it a try, play around with it and see what you can achieve.
  7. Elaborate on what kind of scripts you will need and within what timeframe - you can't expect people to be interested if you simply say "I want scripts". Also, if you want someone fast and professional - you better be ready to pay quite a bit extra.
  8. I'm fairly sure the 65k object limit is in total amount - whether rendered on-screen simultaneously or not. I'd go ahead and take a guess that there's an even lower limit for how many can be rendered on-screen at once. Since I've seen objects not being rendered despite being very close to them, and that was definitely not even remotely close to 65k. Someone with more knowledge would have to confirm it
  9. Dealman

    DIAGNOSTIC fail

    If you're the original author, this is why you should always keep uncompiled files somewhere. I'd highly recommend you use either Dropbox or Mediafire(I'd recommend Mediafire over Dropbox) to store backups, preferably of all revisions. As far as I know, all files compiled via the MTA Compiler will become obsolete with every new update and will have to be re-compiled to work. Troublesome, yes, but it is quite a clever way to add that little extra safety. As Hunterix said, you'll have to find a way to decompile your script, I'd love to help but I'm afraid I can't, and even more so I wouldn't do it openly here on the forums since people will use it to decompile scripts that don't actually belong to them.
  10. Dealman

    Jobs

    Of course there is a way. The problem is that I doubt anyone will do it for you. Either look through the MTA Communty for resources that might suit your need - and maybe edit them to fit your needs better. Others might guide you in the right path, what functions and/or events to use. For example - that you might wanna use setElementData, setAccountData or even SQL to store information like what kind of job the player has. I for one, would prefer the second option as you'll learn yourself how to create what you need, and if the need arises - you'll know(most likely) how to alter the code, since you created it. The choice is yours, we'll be here to help you out once you've got yourself going. Things won't come served on a silver platter
  11. If I recall correctly, the game will not recognize Race Pickups with onPickupHit. Not to mention it will not do it if he's not in a vehicle. I believe he'd have to use onColShapeHit since the race pickups are just a colshape and a model. I don't have too much experience with race pickups, so I'll let someone with more experience answer his question
  12. I think what he wants is something similar to a vehiclechange pickup. But he wants the player to be able to use it without being in a vehicle.
  13. You can use the Camera Tool to help with moving camera. As for the login, how do you expect us to help you when you don't even tell us what is wrong with it? It's not like we will magically have the answer for you Edit: Also, it's spelt "Password" with a D instead of a T, just a heads-up on the typo
  14. You still really don't need timers to set that up Biggest problem with onClientRender is that it might be too fast, and too slow - depending on what FPS the server is limited to. I could try to do it later. Point is, both ways will work in one way or another.
  15. How come? You can use addEventHandler and removeEventHandler to toggle it on and off. I don't see why a timer would be necessary at all, since it would do the math for the colour with every frame, instead of a minimum of 50ms(Which would make it look sluggish/erratic). Whether it's more efficient, I don't know. Probably doesn't matter since it would be client side.
  16. Wouldn't it make more sense to use onClientRender? It would be much smoother.
  17. Dealman

    Few questions

    I haven't tried it, but you could try to check if the player is in a Firetruck or S.W.A.T, and if so, disable the vehicle_fire and/or vehicle_secondary_fire control by using toggleControl. This is what I used to disable the horn when adding custom sounds for the horn - but I don't see why it shouldn't work to disable the water cannon.
  18. Dealman

    black screen

    Player isn't being defined, therefore it does not know what to do. Replace player with source, source will be whatever element was just wasted. Where as player will return nil(I believe). addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end )
  19. Dealman

    Need Help

    You have plenty of tutorials here. Best way to learn is by doing it yourself, really. The MTA Wiki will be your best friend. Start off with something simple and go from there, read about how variables works and how you can manipulate them, it will make your life much easier. If you get to a halt, don't lose hope and give up - keep trying, and if you really need help - we're here to help you in this forum. Something really important to read about if you're new to coding; Debugging in MTA
  20. Would be nice if you could explain in detail what kind of work it is you need help with, I doubt a *professional* coder would want to sign up for anything without even knowing what it is he's signing up for.
  21. I have no idea what it is you want to do. If the script is compiled it is most likely to prevent other people from modifying it and re-distributing it without permission. You'll have to ask the original author for an de-compiled copy of the code if you want to edit it.
  22. Released Radio 2.3.1, kind of a hotfix which makes some changes based on feedback and fixed a bug. [New]: Option to set other sounds to same volume as the Radio. Radio was doing this automatically in previous versions without any option. [Changed]: Muting other sounds automatically set to off by default, changed from on by default. [Fixed]: Meta Info should now update correctly when changing channel with Shift + Left/Right Arrow.
  23. Every streamed file will return different values, it depends on whether the author set the tags properly or not. Some use the tags as means of advertisement and others have them set up properly. Also for internet radios, you might have to use stream_name and stream_title instead of artist/title. Feel free to check out my Radio(Link in signature) for code example on how to achieve this.
  24. Dealman

    DX gui

    You can still use the GUI Editor to some degree, for example make a DX Rectangle the size you want the window - then copy the X/Y Pos and X/Y Size over. Not optimal but it gets the job done.
  25. I believe this should be in the Tutorials section. Also how about linking your YouTube Channel as well?
×
×
  • Create New...