Jump to content

Ab-47

Members
  • Posts

    367
  • Joined

  • Last visited

Everything posted by Ab-47

  1. Forgot to mention, already tried that, no luck..
  2. I've been making a script, and for some reason the markers just WON'T turn transparent. 'setElementVisibleTo' works, but setElementAlpha doesn't, neither does it work if I try creating the markers with transparency nil. local crrx = {} local crry = {} local crrz = {} local rally_checkpoints = {} local checkpointData = { [1] = {x, y, z}, [2] = {x, y, z}, [3] = {x, y, z}, [4] = {x, y, z}, [5] = {x, y, z}, [6] = {x, y, z}, [7] = {x, y, z}, [8] = {x, y, z}, [9] = {x, y, z}, [10] = {x, y, z}, --Finish Line } crrx[1], crry[1], crrz[1] = unpack(checkpointData[1]) crrx[2], crry[2], crrz[2] = unpack(checkpointData[2]) crrx[3], crry[3], crrz[3] = unpack(checkpointData[3]) crrx[4], crry[4], crrz[4] = unpack(checkpointData[4]) crrx[5], crry[5], crrz[5] = unpack(checkpointData[5]) crrx[6], crry[6], crrz[6] = unpack(checkpointData[6]) crrx[7], crry[7], crrz[7] = unpack(checkpointData[7]) crrx[8], crry[8], crrz[8] = unpack(checkpointData[8]) crrx[9], crry[9], crrz[9] = unpack(checkpointData[9]) crrx[10], crry[10], crrz[10] = unpack(checkpointData[10]) rally_checkpoints[1] = createMarker(crrx[1], crry[1], crrz[1], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[2] = createMarker(crrx[2], crry[2], crrz[2], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[3] = createMarker(crrx[3], crry[3], crrz[3], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[4] = createMarker(crrx[4], crry[4], crrz[4], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[5] = createMarker(crrx[5], crry[5], crrz[5], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[6] = createMarker(crrx[6], crry[6], crrz[6], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[7] = createMarker(crrx[7], crry[7], crrz[7], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[8] = createMarker(crrx[8], crry[8], crrz[8], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[9] = createMarker(crrx[9], crry[9], crrz[9], "checkpoint", 4.0, 255, 0, 0, 0) rally_checkpoints[10] = createMarker(crrx[10], crry[10], crrz[10], "checkpoint", 4.0, 255, 255, 255, 0) 1) No this isn't the full code; 2) I've layed the code out like this to diagnose the error but find no luck. 3) I've made the coods x, y, z no purpose, I'm using their real location in the full code. 4) No debug errors and I see all markers. As you can see, I've set the transparency for each marker created to 0. It always shows no matter what. If anyone can help me, I'd be more than grateful.
  3. function createobject (thePlayer, Cname, Aname1, Aname2) if (Aname1 == "create") then local x,y,z = getElementPosition(thePlayer) table[i] = createObject (Aname2, x + 10, y, z + 2, 0, 0, 0) i = i+1 else if (Aname1 == "delete") then destroyElement (table[i]) (...)
  4. Search here: https://community.multitheftauto.com/ If you wanna request a script for someone to make, include a price and I'll make it for you fulfilling your requirements
  5. Ab-47

    server

    Try 'freeroam' or 'play'
  6. setTimer(function() fadeCamera(player,true) setElementPosition ( player,646.57916, -7659.33105, 12.86875) end,120000,1)
  7. Post your code and we'll try and help, demanding/requesting won't get you anywhere.
  8. Ab-47

    The last reply

    Says the guy with 79 posts ^^
  9. Create a loop to get all vehicles, use the loop to define whether any seat within such vehicle has been taken or not, then initiate the respawn, with setElementPosition or whatever you want. Then for the function handler, use the timer to handle it.
  10. Ab-47

    [HELP] Please.

    getPedOccupiedVehicle First argument must consist of a player variable, not element data.
  11. Good job, I'll be sure to check this all out
  12. True I could do that. Though I have an updated version which is waay more simple and looks much neater I'll be uploading a new version soon
  13. Hey, I've decided to release a gate system with info saved under tables and used a pre-defined MTA function "unpack" to collect data from the gate's table. I've left this resource uncompiled so that other player can learn from this code, to be able to use it on their servers and to play around tweaking the code. It's an easy system with an easy method. This is how you use it; Type /opengate 123 (Default password for gate 1 is 123) to open gate 1 Type /opengate 456 (Default password for gate 2 is 456) to open gate 2 You can of-course change the commands/passwords to fulfil your satisfaction, hope you all enjoy using my code AND, you can add as many gates as you want, be sure to make each gate's password different. Just add more functions and arguments to the tables. Download the full code from here: https://community.multitheftauto.com/index.php?p= ... s&id=11312 Regards, Ab-47.
  14. You don't need more than what I provided. I'll probably try that.. What if I want this DX timer shown to all the players in a specific group? I've an export to get the players group..
  15. Well it's a turfing script so; 1) When someone enters a turf, it's triggered to that simple function 2) No it's not named theFunction(), I reduced variable length for your understanding. I'm experienced enough to change the variable back to it's normal one and I'd understand anything if you provided a code using theFunction(). 3) No, as I said on (1), when someone enters a turf. To be more specific, when someone enters a turf that isn't owned by any. And that's not the issue because I've a full system to state the non-owned turfs.
  16. Wouldn't it be easier using custom intervals? I might just try that. And can you show me an example in code of what you mean? It'll be easier.
  17. Could you elaborate, or at-least post a code on how to?
  18. Hey, it's been a while since I've asked for help, but I really need it this time :3 I don't know if I'm just to tired to think straight or I just don't know, but I'm sure you guys could help me out. So here's my problem, I cant seem to trigger timer details of a set timer to my client file to output using DX text. It gives me errors when trying to output the sent details. The triggering works fine now, as of before it used to give debug errors showing it's expected an lua-timer or whatever. --(Server Sided) timedTimer = setTimer(theFunction, 100000, 1, turfName, ePlayerGroup, ePlayer) triggerClientEvent(ePlayer, "MTA_RP_turfing.showTimedStatus", ePlayer, timedTimer) --(Client Sided) function showTimedStatus(timedTimer) timedTimer = timeRemaining addEventHandler("onClientRender", root, renderTimeLeft) end addEvent("MTA_RP_turfing.showTimedStatus", true) addEventHandler("MTA_RP_turfing.showTimedStatus", root, showTimedStatus) function renderTimeLeft() timeLeft = getTimerDetails(timeRemaining) local x = math.ceil(timeLeft/1000) dxDrawRectangle((680/824) * screenWidth, (590/687.4) * screenHeight, x / 0.5, 22.9, tocolor(157, 0, 0, 117.5)) exports.MTA_RP_texts:boldText("Capturing turf: "..tostring(x).."", (688/398)*screenWidth,(600/702)*screenHeight, 100, 100, tocolor(255, 255, 255, 255), 0.73, theFont, "center", "top", false, false, false) end Errors: Bad Argument @ 'getTimerDetails' [Expected lua-timer at argument 1, got nil] attempt to perform arithmetic on global 'timeLeft' (a boolean value) I've tried changing arguments, variables and getting the code to recognise the timer but it's useless. To find a way around all this I triggered the client event to trigger a new timer, but that has allot of exploits so I need to fix this issue whenever possible. Thanks for reading, would be really appreciated if anyone could help
  19. Seems legit, maybe I'll make one for my community too Well, goodluck and I hope you achieve what you're willing to make!
  20. Ab-47

    [HELP] Sirens

    After if(player)and(seat==0)then follow Solidsnake's suggestion: Use those functions to create the object (the siren object you want) and attach the object to the vehicle.
  21. Ab-47

    [HELP] Sirens

    Use: isObjectInACLGroup then the function to attach extra2
  22. Ab-47

    DayZ mod's Ideas!

    Change the server name to something more attractive, try manually invite players through forums or so. Offer something they can't refuse. Give them reason to stay. Probably add some resources that even a single player or a few players could use, so they won't get bored playing alone.
×
×
  • Create New...