Jump to content

Driggero

Members
  • Posts

    75
  • Joined

  • Last visited

Details

  • Gang
    DDAS
  • Location
    England

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Driggero's Achievements

Transformer

Transformer (11/54)

0

Reputation

  1. Looks great of course... but not as great as you :*
  2. Driggero

    fetchremote

    It's perfectly possible yes. Dealman's referring to a resource I made for my team's servers with the help of another guy. Truth be told it was the other guy who handled all the HTML code, I just built the resource around it. What you need is to find a site that stores the song links in the HTML data, so that when you you get the callback from fetchRemote you can go through and find that link and play it on the client. It's a lot of work and there aren't many sites that store the song links that way either. But it's certainly doable (just like Dealman). You're welcome to PM me if you want any more info. I also may end up releasing the resource we made at some point in the future too
  3. Oh no you di'int Code is fine though, you're just not triggering the event.
  4. More screenshots! But yeah, lookin' good Deal (and the gamemode, ofc).
  5. You have to export it inside the original resources' meta file, then use the exports function (call) to use it from other resources. As far as I know there is no way to actually hard-code it so you can just use it like the built in MTA functions though.
  6. http://michalfapso.blogspot.co.uk/2012/ ... peech.html There are tonnes of languages for it, however I've gotta warn you only 10-15 of them are any good. The rest are really rather poor.
  7. setElementData is lost when the player leaves (since the player element is removed). If you want to save the data for when they rejoin you need to use either a database, XML file, or setAccountData. You can't rely on setElementData to save anything for longer than the player remains connected to the server.
  8. function daspawnzon() if not spx then outputChatBox("#E3E8B7The command will be available once the map is restarted!", 0, 0, 0, true) else local car = getPedOccupiedVehicle(localPlayer) if not car then return end setElementFrozen(car, false) setElementModel(car, model) --setTimer(setElementFrozen, 2500, 1000, car, false) setElementHealth(car, 1000) setElementPosition(car, spx, spy, spz) setElementRotation(car, sprx, spry, sprz) triggerServerEvent('syncModel', resourceRoot, car, spm) end end addCommandHandler("RES", daspawnzon)
  9. There are other ways to do it, but this is one method: function countdownFin() --whatever you want to happen here end local countdown = setTimer(countdownFin, 600000, 1) --set the timer for 10 minutes setTimer( function() local x = getTimerDetails(countdown) local timeLeft = math.ceil(x/1000) outputChatBox(convertSecondsToMinutes(timeLeft)) end, 1000, 0) function convertSecondsToMinutes(sec) --turn the seconds into a MM:SS format local temp = sec/60 local temp2 = (math.floor(temp)) --this equals the minutes local temp3 = sec-(temp2*60) --and this is seconds if string.len(temp3) < 2 then --make sure it's displayed correctly (MM:SS) temp3 = "0"..tostring(temp3) end return tostring(temp2)..":"..tostring(temp3) end EDIT: Just quickly tested it and fixed a tiny bug. The code works now.
  10. Driggero

    Scrollbar

    onClientGUIScroll()
  11. guiGetScreenSize() gives you the size of your screens resolution. So if for example it was 1024x768, You'd know that 500 lengthways is about center. Same goes for widthways, ~370 would be close to center there. I usually use that when I'm trying to estimate where to place an image on screen. I highly recommend NOT using single values like that though (such as 500 or 370) as what is in the center on one resolution will not be on another. Instead I'd do something like this: local x, y = guiGetScreenSize() local middleX, middleY = x/2, y/2 That way it will scale to all resolutions. This is just an example of centering images, but you get the idea
  12. Yes, but so is playSound and all the other audio functions. The idea is you trigger the event from the server to ALL clients, then every client hears the same sound (if they are within distance).
  13. What's wrong with just using playSound3D? You could get the players distance from the sound and set the sound volume lower the further they are away, but why go to the trouble when playSound3D does it all for you?
×
×
  • Create New...