Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. Because you are sending a lot of trigger events, when you can just do it with one triggerLatentClientEvent, a table and a loop.
  2. https://wiki.multitheftauto.com/wiki/SetTimer Why I can't use local functions for my timers? I am doing it for a long time and it is working.... and never had any strange problems with it......
  3. because you can't past files with this function. Only data. Tables, strings, numbers, userdata etc. You have to read the information from it first or read the whole file. And then recreate it at clientside, with the new data.
  4. What a poor guy... and no brains.
  5. NO, cause the server ALWAYS start first. You have to send a message from clientside > onClientResourceStart < to the server and send the data back to the client.
  6. IIYAMA

    Ground

    Correct, except it can also be negative. local distance = playerZ - groundZ if distance < 0 then distance= -distance end (0 if the point you tried to test is outside the loaded world map)
  7. Cause the server is already sending data while the client hasn't loaded yet. (loaded the client.lua file)
  8. -- zet boven aan het script. local vehicleOwners = {} -- opslaan vehicleOwners[player] = vehicle --verkrijgen local vehicle = vehicleOwners[player] -- controleren en verweideren if isElement(vehicle) then destroyElement(vehicle) end -- automatisch schoonmaken wanneer iemand weg gaat. addEventHandler("onPlayerQuit",root, function () local vehicle = vehicleOwners[source] if vehicle then if isElement(vehicle) then destroyElement(vehicle) end vehicleOwners[source] = nil end end) Meer heb je eigenlijk niet nodig. Je moet wel alle "variables" de goede definities geven.
  9. No I don't get what you mean.... Why don't you just do: https://wiki.multitheftauto.com/wiki/GetVehicleName Instead of wasting your ram. And go read this:
  10. This event triggers only when a player hit's it. function onmarker(player) local vehicle = getPedOccupiedVehicle (player) if vehicle and getElementData( vehicle,"club") then outputChatBox("This vehicle is a " .. tostring(vehicle) .. "!") -- user data.... end end addEventHandler("onClientMarkerHit", root, onmarker) club = setElementData(vehcreates[1],"club",true) AND YES IT MUST BE UNDER THE TABLE...... You can't do something with an element that doesn't exist yet........
  11. Wrong section. Click
  12. use: setCameraMatrix Require the X,Y,Z of the place were the camera starts, and the X,Y,Z were the billboard is. function myFunction () end addEventHandler("onClientRender",root,myFunction) getTickCount() variables..... maybe a table for the camera locations. You don't need: setTimer -- because you have tickCount..... dxCreateScreenSource -- why you need this? setCameraTarget -- because that isn't just going to work on objects..... And no I am not going to build it for you.
  13. Because it will trigger for all players except for your self. Also you forgot to define the root element. Use: addEventHandler("onClientResourceStart",resourceRoot, cmatrix) Also: fadeCamera(true)
  14. You must be standing inside a colshape with elementdata set: "purpose" to "zombiewood" It is what the script tells me, nothing more, nothing less.
  15. IIYAMA

    Custom Mute

    May I ask what line it is on this post? Because at line 38 there isn't a table. Line 36, you defined source, while addCommandHandler doesn't have a source, only event's have. MutedPlayer[source] = setTimer(function()
  16. IIYAMA

    Custom Mute

    I would choose for something similar to the resource mission timer. 1 Timer to manage the future time of the saved mutes and saving lots of memory.
  17. IIYAMA

    Custom Mute

    muted = setTimer(function(), MutedPlayers[SerialB] = nil end, MutedTime, 1) function(), muted = setTimer(function() MutedPlayers[SerialB] = nil end, MutedTime, 1) Also put a break when you found your target. (can save you some memory by ending up the loop) function addMutedPlayer(thePlayer, cmd, Target, time) for i,v in ipairs(getElementsByType("player")) do local playername0 = string.gsub(getPlayerName(v), "#%x%x%x%x%x%x", "") local playername1 = string.lower(playername0) if string.match(playername1, Target) then local serialA = getPlayerSerial(thePlayer) local serialB = getPlayerSerial(v) MutedPlayers[serialB] = serialA MutedTime = time * 1000 muted = setTimer(function() MutedPlayers[SerialB] = nil end, MutedTime, 1) break -- save memory! end end end addCommandHandler("mp", addMutedPlayer, false,false)
  18. But then it loses it's event's.
  19. IIYAMA

    Custom Mute

    No need to use table.insert. Because it is already doing that, except it isn't making use of a function. But the best way is using a table in a table: MutedPlayers[serialB] = {manager=serialA,muteTime=getTickCount()+30000,reason=""} Everybody has it's own way of writing down tables. I do it like this: MutedPlayers[serialB] = {["manager"]=serialA,["muteTime"]=getTickCount()+30000,["reason"]=""} It gives the same result. UPDATED
  20. True, but he will overwrite it. Just like a wrapper, won't cause any serious problems afk. But it should be prevented, the mta function will not be able to use in that script.(if it isn't redefined)
  21. IIYAMA

    Custom Mute

    Why don't you try: MutedPlayers[serialB] = serialA
  22. IIYAMA

    dxDrawLine3D

    You should take a look at the stealth laser. It isn't perfect, but it gives a little result. It uses: getPedBonePosition
  23. That is why I always work alone.....
  24. IIYAMA

    timer

    It is incomplete. There are no setPlayerWantedLevel functions in the second part, your levels aren't dropping with time. Except by killing your self >part1.
  25. IIYAMA

    timer

    I don't know that guy. But if you want help, you must make it easier for people to help you, by giving the information they are asking for.
×
×
  • Create New...