Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  1. setElementData, for saving you could use SQL functions or setAccountData.
  2. If you are totally new, you should start by learning the actual programming. Lua manual is a good way to start. If you are done reading the manual, and you kinda understand everything which is written there, you can change to the MTA Wiki which has a lot of useful information.
  3. The easiest way without modifying a ton of things is just making the table as a variable and in the loop, looping through from n to n + scoreboard rows, then selecting the players with playerTable[ i ]. You can just increase or decrease "n" and that should make the scrolling working.
  4. Next time use the code tag please. I fixed it for you now. For the scripting part, you can use isElementWithinColShape, and if that returns false, you can use destroyElement and return.
  5. Ennek a rendertargetnek nincs értelme. A rendertarget nem képes magától megtörni a sort, csak levágja a kilógó részt. Egy egyszerű módszer arra, ha több colorcodeot használsz egy szövegben, akkor számolod a szöveg hosszát, és ha az nagyobb mint a kívánt hossz, beleillesztesz egy sortörést (\n). Ha nincs több colorcodeod, akkor nem muszáj HEX codeot használni benne, egyszerűen a tocolorban átírod a kívánt színt, és a "colored" argument már falsera állítható, így a clip már nem lesz automatikusan false.
  6. First of all, you can only save one thing in one variable, except if its a table. And I dont get what you are trying to do. Do you want to reverse it?
  7. Moved to the right section. Please read the rules for this section, and apply the needed changes within 24 hours or you post will be removed.
  8. You can use slothman's slothbot.
  9. Moved to the right section. Please keep in mind that the Scripting section is for asking for help.
  10. NeXuS™

    Error

    What's the error? Also, I fixed the formatting for you, if you post next time, please use the brackets for the code.
  11. Because removePedFromVehicle accepts players, not a table. local vehicle = getPedOccupiedVehicle(player) local occupants = getVehicleOccupants(vehicle) for i, k in pairs(occupants) do removePedFromVehicle(k) end
  12. It'll replace the existing ones too.
  13. NeXuS™

    Timer

    @Khadeer143 it won't work. This script isn't passing a valid player element.
  14. You'll have to sync it manually using events.
  15. local colPositions = { {667.73, 1850.39, 50, 50}, {1667.73, 1050.39, 100, 100}, } local createdCols = {} for i, k in pairs(colPositions) do local tCol = createColRectangle(k[1], k[2], k[3], k[4]) -- Creating the col at the position with the fix width and height. addEventHandler("onColShapeHit", tCol, destroyTheVehicles) -- Adding the "onColShapeHit" event to the created col. table.insert(createdCols, tCol) -- Adding the created col to the "createdCols" table. end function cancelEnter(thePlayer) for i, k in pairs(createdCols) do -- Looping through the created cols. if isElementWithinColShape(thePlayer, k) then -- Checking if the player is inside one. destroyElement(source) -- If he is. outputChatBox("Vehicles are not allowed here!", thePlayer, 255, 0, 0) break end end end addEventHandler("onVehicleStartEnter", root, cancelEnter) function destroyTheVehicles(player) if getElementType(player) == "player" and isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) removePedFromVehicle(player) respawnVehicle(vehicle) outputChatBox("Vehicles are not allowed here!", player, 255, 0, 0) end end Just so you understand, this is the last full code I provide you. From now-on, I'll only tell you what functions you'll need, and if you can't find the right way, I'll ONLY push you.
  16. NeXuS™

    camera FOV

    setCameraMatrix has an arg called "fov".
  17. Do you have a bot handler resource? If you don't, you'll have to create it or you could alternatively use Slothbot.
  18. Create more cols, add more event handlers with the new cols as the attached element, and in the onVehicleStartEnter event, write isElementWithinColShape(...) or isElementWithinColShape(...)
  19. function cancelEnter(thePlayer) if isElementWithinColShape(thePlayer, myCol) then destroyElement(source) outputChatBox("Vehicles are not allowed here!", thePlayer, 255, 0, 0) end end addEventHandler("onVehicleStartEnter", root, cancelEnter) Should work just fine.
  20. Use the onVehicleStartEnter event.
  21. local moneySuff = {"K", "M", "B", "T", "Q"} function convertMoney(cMoney) didConvert = 0 if not cMoney then return "?" end while cMoney / 1000 >= 1 do cMoney = cMoney / 1000 didConvert = didConvert + 1 end if didConvert > 0 then return "$" .. string.format("%.2f", cMoney) .. moneySuff[didConvert] else return "$" .. cMoney end end
  22. Ha nem találsz olyan embert, aki le ül veled naponta, akkor maximum segítséget tudsz kérni itt, vagy tőlem. Én azt mondom hogy ülj le, kezdj el valami randomat scriptelni. Tuti befognak ugrani dolgok. Ha mégse, ott a wikipedia, tudod, ahogy elkezdted annó. Igazából sok sikert hozzá.
  23. NeXuS™

    Radar position

    That isn't the position. You have to change line 41 and 42.
  24. Are you trying to add the "id" column via script? In that case, you don't have to shut down the server, and you don't have to delete registry.db.
×
×
  • Create New...