Jump to content

WorthlessCynomys

Members
  • Posts

    369
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by WorthlessCynomys

  1. Are the marker and the player in the same dimension?
  2. triggerServerEvent("testkit", resourceRoot) -- Try this instead of the current.
  3. SOLVED! There was a block comment opening like a 100 lines above. Sorry guys and thank you for your help. As I found out, that is allowed. On the other hand: --[[ --[[ --]] --]] -- THIS is not. -- For others if they find this, to learn.... My problem was this :S --[[ -- The problem was this, like a 100 lines above, since I haven't closed It so the second block comment was in it. --[[ The error said that the problem is in this line. --]]
  4. The testkit function itself is still commented while it has only -- before it. The whole function part.
  5. The problem is not with the script. As I said the exact same script worked at 1AM today. However here's an error msg that I've never seen before. IMGUR IMAGE and that line: --[[ <--- This is line 274 elseif (dragNDrop == true) and (cX < 0.675) or (cX > 0.975) or (cY < 0.325) or (cY > 0.675) then dragNDrop = false draggedItem = nil -- Some item drops on the ground thingy here. --]] Also the whole script is 402 lines sooo...
  6. No. I'm sure that the problem this time is not with my code. I haven't changed a thing and the script worked before the patch. Now it says that the nesting of --[[...]] is deprecated, which is a basic lua block comment, so WTF and your idea hasn't worked either, when I tried it now. So something went wrong with the patch, which is annoying, since it makes me unable to move forward with my work.
  7. What is your problem exactly? I mean this is a quite short topic if you don't include the code. You ask for help with questions. No one will help you if you do not provide enough information.
  8. Hello. I can't see any triggerServerEvent. Client side scripts run only on the clients computer and are NOT synced to the others. You have to call server side, find the player who has to get the message and then triggerClientEvent to it, so it's synced for him. triggerClientEvent(theTargetPlayersPlayerElement, "TheEventNameOfTheClientEvent", resourceRoot, Optional, Arguments)
  9. Where do you get the error, what's the point of your script? Please give additional information in order to us be able to help. Btw... it should look SOMEHOW this. -- You need a dbConnection here named database database = dbConnect() function WTF(_, player) local acc = getPlayerAccount(player) local owner = getAccountName(acc) local result = dbQuery(database,"SELECT * FROM SpawnCar WHERE owner=?", owner) local poll = dbPoll(result, 500) -- Never EVER use -1 at poll for i,v in ipairs(poll) do vehicle = createVehicle(v["carID"], v["X"], v["Y"], v["Z"], 0, 0, 0, v["text"]) spawnVehicle(vehicle, v["X"], v["Y"], v["Z"]) setElementData(vehicle, "Owner", v["Owner"]) --setVehiclePlateText(vehicle, text) setVehicleColor(vehicle, v["Color1"], v["Color2"], v["Color3"]) setVehicleHeadLightColor(vehicle, v["R"], v["G"], v["B"]) setVehicleRespawnPosition(vehicle, v["X"], v["Y"], v["Z"]) end end addCommandHandler("spawnvehicle", WTF)
  10. Hello. Láttam megoldottad. De legközlebbre, ha használod a KÓD funkciót akkor sokkal hatékonyabb. A "<>" jel az. Sokkal másabb ez: function Lol() outputChatBox("Józsi") end mint ez: function Lol() outputChatBox("Józsi") end
  11. Hello @Mendozite . The whole thing is about will and energy. The more you willing to learn it and the more energy you put in it, the better you get. I wouldn't call myself a really professional scripter, but I can say I'm quite good. I started scripting MTA 3 years ago, it was like chinese, I didn't understand a single word. Put energy in it and become able to make some simple scripts, but I gave at at a point. Luckily 1 year after that, some of my friends wanted me to make a mod for him, so we started a project. It was 3 months 'til I got from Knowing nothing, to be able to make complex, whole mods. The point is, you have to put energy in it, you have to be willing to learn it, and it can help if you set goals you want to reach. If you're scripts don't have a point, you won't learn a thing. Use MTA WIKI, read the functions. Using wiki isn't bad, it doesn't mean you're not good. It means that you're good, beacuse you know where to look for the solution. When I work, wiki is opened the whole time. Also maths is quite important for it. Almost every cool script has a lots of math in it.
  12. Hello, there, I have a serious problem. My MTA has patched when I started it. After that I ran the server, joined and started my script, that worked today at 1 AM. Now I get errors. debugscript says that this: --[[ Something here so it's commented. --]] is deprecated, as well as it says that i have and unexpected character near "[" in this line: outputChatBox(tostring(i).."|"..items[slot[3]][2]) Again. The exact same script has worked at 1AM today. What did the patch change?
  13. Maybe the texture of that building has a night version which is brighter. You can't modify the textures in detail with scripts, so I don't think you can make it good, unless you edit some textures. But that's just my opinion.
  14. Hy, as far as I know, you can not set the handling of helicopters or planes. Sadly, I don't know if this is true for the Rhino too.
  15. What is the problem like? Describe it, please.
  16. A resource function example() --Something here end Its meta <export function="example" type="shared" /> The other resource exports.theNameOfTheResourceTheFunctionIsIn:example() -- or call()
  17. setElementData(theElement, string theNameOfTheData, theData) It works like, you define the element which you want to set the data of. Then you define a data name in string, so you can access it later, and lastly you define the data. Which can be a string, a number, an element, an object etc. -------- respawnVehicle uses only one argument, the vehicle. Use wiki... respawnVehicle() --Check it and read it carefully.
  18. Well... make a new table for texts and then it wont matter
  19. You can make a ped drive a vehicle. In a straight line. You can stop a ped if there's a vehicle in front of it. To actually make an AI that drives around on the map... it's nearly impossible. To answer your question. createPed() createVehicle() createColCuboid() attachElements() warpPedIntoVehicle() setPedControlState() onColShapeHit
  20. source is the gui your mouse enters. If you want it to become visible when you hover over it, don't do any if checks just use the source argument. You can filter it, to the thing2, which is like: for _, gui in ipairs(myTable.thing2) do if (source == gui) then --Do something end end
  21. Some web MySQL services can only be used by website for security reasons. Get in contact with the support of your service.
  22. In XML <export function="setWanted" type="shared" /> In script exports.theNameOfTheResourceTheFunctionIsIn:setWanted(arguments)
×
×
  • Create New...