Jump to content

Tekken

Helpers
  • Posts

    1,413
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Tekken

  1. Not sure os functions work in MTA, but I may be wrong
  2. Hi, think of math.randomseed() like the starting poit of your randomness, the seed, in order to have unpredictable random numbers you have to provide a integer seed to this function and from now on in your script the random numbers will be generated from this seed, like: This will give you the same results every single time the code is generated for i = 1, 10 do print(math.random()); end While this will change every single time due to getRealTime().timestamp never returning the same number. math.randomseed(getRealTime().timestamp); for i = 1, 10 do print(math.random()); end
  3. Add a table with the interiors you don’t want to delete and do a check before like this local table = { 600, 610, 679 } -- add here addEventHandler("onResourceStart", resourceRoot, function() for i=550, 20000 do if not table[i] then removeWorldModel(i, 10000, 0, 0, 0, 0) setOcclusionsEnabled(false) end end end)
  4. Tekken

    any help

    Hi, what exactly you want to start when you drive the Pizzaboy bike? Do you have a pizzaboy script?
  5. Hi, could you explain further or show an image?
  6. Tekken

    help

    I used to have a problem when I was running a server, I had no anti-spam and 2-3 guys started spamming the chat while 40 people where online and the server couldn't keep up and restarted a few times until I reallized I needed an anti-spam. Is there a chance you might have a similar problem? Can you share some screenshots? Greetings.
  7. Hi, try this client-side addCommandHandler("pos", function(player) local x,y,z = getElementPosition(player); local gz = getGroundPosition(x,y,z); outputChatBox(x..", "..y..", "..gz); end);
  8. Hmm, I see it's a modified version of a DayZ GM I've once posted, normally upon registration all data are set to a default value, 100 for food and water and 1000 for health ? If they're not it means you have a problem with the registration function, may I take a look?
  9. --server side function insideCar(player) --define player here so we know whom used the commandhandler local vehicle = getPedOccupiedVehicle(player) --is he in a car? if vehicle then outputChatBox("You're in a car", player) --serverside we need to specifie the player we output to, else we outpoot to root (all players) else outputChatBox("You're on foot", player) end end addCommandHandler("check", insideCar) ------------------------------------------------------------------------------------------------------------- --and for client you use it like that 'localPlayer' is a client only variable function insideCar() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then outputChatBox("You're in a car") --clientside outputChatBox outputs directlly to the client in question else outputChatBox("You're on foot") end end addCommandHandler("check", insideCar) Do you know the difference between client/server scripts?
  10. Hello, what exactly do you mean by working after two minutes ?
  11. Nu poti face asta cu https://wiki.multitheftauto.com/wiki/SetSkyGradient ?
  12. getPlayerSerial() -to get the serial https://wiki.multitheftauto.com/wiki/GetPlayerSerial Ant to communicate with the UCP you can use, fetchRemote() https://wiki.multitheftauto.com/wiki/FetchRemote But what exactly you want to achieve? It might be easier with a MySQL database.
  13. Found it! there you go in case someone is interested dxDrawImage(x+h, y, w, h, itm..".png", r, -w/2, -h/2);
  14. Thanks but it ain't working as intended https://imgur.com/a/PPAESu5 Desired should be centered in the gray rectangle: My code: local sW, sH = guiGetScreenSize(); local slotSize = 60; local id, itm, x, y, iw, ih, rot = unpack(draging); --gather data local r = 0; local cx, cy = getCursorPosition(); local cx, cy = (cx*sW), (cy*sH); local w, h = slotSize*iw, slotSize*ih; if rot then r = 90; end local rX, rY = rotatePos(cx, cy, w, h, r); dxDrawImage(rX, rY, w, h, itm..".png", r);
  15. Hi, I’ve moved your topic to the appropriated language section for best results! Greetings
  16. Hi, I’m trying to make a "tetris" inventory like DayZ/Tarkov/RE4 where you have say 10x5 squares and you have to carefully place items so you optimize your space, the problem is I want to be able to turn items by 90degree so you can take better advantage of the space, all good other than actually drawing the image, I can’t seem to figure out what the rotation offet x and y should be, also note that Items will have different sizes like 1x2 2x3 4x1 etc.. You guys have any idea?
  17. Also always use client variable server-side instead of source and/or passing the localPlayer as an argument when referring to the player that triggered a server event.
  18. I'd highly suggest switching to pAttach as it has way better performance
  19. Tekken

    AYUDA

    Hello, I've moved your topic to the apropriate language section for the best results.
  20. Salut, ti-am mutat topicul pe sectiunea RO deoarece ai postat in romana pe sectiunea engleza.
  21. Hi, What is your host? Also check /debugscript 3 whenever someone join to see if you have a lot of erors/warnings that may give your server a hard time and try to fix them.
  22. Tekken

    4k scale

    Ro: Lasa-mi mesaj aici, si ar trebui sa poti sa-mi trimiti DM, nu prea mai folosesc Discird, si te rog daca mai scrii in romana fie lasa un mesaj in ambele limbi fie foloseste sectiunea romaneasca, mersi. Eng: Leave a message here if you wish, also you should be able to send me PM’s
  23. Tekken

    4k scale

    Hello, check this out:
  24. Tekken

    Register

    Wait, is this your server or not ? Also you should check out how to give a resource admin rights here: https://wiki.multitheftauto.com/wiki/Access_Control_List
  25. Tekken

    Register

    Hello, does your Login/registration resource have Admin access ? It needs it in order to create an account
×
×
  • Create New...