Jump to content

Ace_Gambit

Members
  • Posts

    569
  • Joined

  • Last visited

Everything posted by Ace_Gambit

  1. I don't think you can argue about personal taste. Some like RP and others prefer DM. Both have advantages and disadvantages. But in the end you can't compare them.
  2. Ped functionality is awesome but I am also looking forward to the many bug fixes. As a matter of fact I'd rather have all DP2 bugs fixed than ped functionality.
  3. Maybe it's conflicting with another resource. I dunno lol. Really that should work. I double checked...no, I even triple checked.
  4. That is strange because I did test it and it worked. Don't forget it's server side code.
  5. It looks like you forgot to add a resource to the ACL.
  6. Did you even check the forums before posting that? Because atm the guests are allowed to view all threads and posts in the public area, but they just can't post anything in there. Yes, because last time I checked the forum index was closed for non-registered visitors.
  7. The variable source is not passed to DisableControls by default. You will have to pass it as an argument in your setTimer call. setTimer ( DisableControls, 30000, 1, source ) function DisableControls (thePlayer) toggleAllControls ( thePlayer, false ) outputChatBox ("You are free now. Please, dont become a criminal in next time.", thePlayer, 0, 255, 0 ) end
  8. Or you can try this if you like a cool text display . This also makes sure you can't initiate a count down when one is still running. local root = getRootElement() local count = 0 local billboard = false local numbers = false local timer = false function isTimer(theTimer) for _, pTimer in ipairs(getTimers(2500)) do if (pTimer == theTimer) then return true end end return false end function countClean() for _, player in ipairs(getElementsByType("player", root)) do textDisplayRemoveObserver(billboard, player) end textDestroyTextItem(numbers) textDestroyDisplay(billboard) billboard, numbers = false, false count = 0 end function playSoundForAll(sound) for _, player in ipairs(getElementsByType("player", root)) do playSoundFrontEnd(player, sound) end end function countStart() if (count == 5) then billboard = textCreateDisplay() numbers = textCreateTextItem("", 0.5, 0.5) if (billboard and numbers) then textItemSetScale(numbers, 2.5) textItemSetPriority(numbers, "high") textDisplayAddText(billboard, numbers) for _, player in ipairs(getElementsByType("player", root)) do textDisplayAddObserver(billboard, player) end end end if (billboard and numbers) then if (count == 0) then count = -1 textItemSetText(numbers, "GO!") playSoundForAll(45) timer = setTimer(countClean, 2500, 1) end if (count > 0) then textItemSetText(numbers, tostring(count)) playSoundForAll(43) count = count - 1 timer = setTimer(countStart, 1000, 1) end end end function checkState(playerSource, commandName) if (string.lower(commandName) == "/count" and count == 0 and not isTimer(timer)) then if (playerSource) then outputChatBox("* Countdown initiated by " .. getClientName(playerSource)) end count = 5 countStart() end end addCommandHandler("/count", checkState, false)
  9. Ace_Gambit

    onPickupHit?

    That random number is a memory address.
  10. Ace_Gambit

    onPickupHit?

    But why isn't this possible? All elements have their numerical IDs, right? Possibly because the function is expecting a string object and not an element object structure. And an element does not have a numeric id by default as far as I know.
  11. All I can say is that forcing visitors to register before they can view anything is not the best way of promoting yourself imo.
  12. Ace_Gambit

    onPickupHit?

    You can't output a player element to a chat box.
  13. Buttons are just like any other components elements in the MTA world. This means that you can set data. Meaning you have more than one options to keep track of "clicks". setElementData(button, "clicks", count) clicks = getElementData(button, "clicks")
  14. Have a look at this: http://lua-users.org/wiki/TutorialDirectory.
  15. I would recommend to load all your images in advance. That is when the client script is started for example.
  16. I wouldn't use collision shapes though. Don't forget that a massive collision shape can cause script lag due to the fast amount of call backs from vehicles/players entering the shape. If you start moving the shape it can get even worse since it will start making the same call backs all over again. My advice would be to setup a pulse timer and periodically check the player position.
  17. Try this. function consoleGiveCash ( thePlayer, command, amount ) givePlayerMoney ( thePlayer, tonumber(amount) or 0 ) end addCommandHandler ( "givecash", consoleGiveCash ) This converts the amount parameter to a numeric value and also makes sure that any bs input like blablabla is not crashing your script by automatically assigning 0 instead.
  18. This could be possible. But don't forget that weather is global.
  19. Yea, 60 lines of script code are peanuts. Most game modes have at least 2000 lines (one of my scripts has 8000+). But you shouldn't focus at the amount of lines but make sure your code is efficient. Having the most lines of code doesn't have to mean jack shit. Sometimes the only thing it proves is that you can't write efficient code. May I ask how exactly did you try to load the modules? I know that in my case adding a line to my server configuration like this "mta_mysql.dll" failed to load the module. I had to use this "" instead.
  20. Ace_Gambit

    War!

    Total war and destruction! Europe is next! The Red Army is coming! * starts digging trenches
  21. There's no standard function that converts text into images. The fonts provided are the only ones you can use. I did a resource with custom text as images but it proved a big performance hog due to the extreme loading time. If you are interested in text as images have a look at this. https://community.multitheftauto.com/index.php?p= ... ils&id=126
  22. You must fade the camera in. It is faded out by default. That's why your screen stays black when you start a blank game mode. http://development.mtasa.com/index.php?title=FadeCamera
  23. Isn't this included in race by default? It should be.
  24. How come? I prefer MySQL because the SQLite implementation is too basic for my likings and XML just sucks for dynamic data management.
×
×
  • Create New...