Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. 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........
  2. 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.
  3. 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)
  4. You must be standing inside a colshape with elementdata set: "purpose" to "zombiewood" It is what the script tells me, nothing more, nothing less.
  5. 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()
  6. 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.
  7. 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)
  8. But then it loses it's event's.
  9. 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
  10. 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)
  11. IIYAMA

    Custom Mute

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

    dxDrawLine3D

    You should take a look at the stealth laser. It isn't perfect, but it gives a little result. It uses: getPedBonePosition
  13. That is why I always work alone.....
  14. 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.
  15. 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.
  16. IIYAMA

    timer

    Of course, it is just adding more time for wanted levels. I only can't find the timer that drops the wanted level. But is this all? Can you show me where you got this? (Then I can take a closer look.)
  17. IIYAMA

    timer

    nope. Btw this timer doesn't drop the wantedLevel, where is that part?
  18. IIYAMA

    timer

    See line "32" there you can set up the time (5000 ms /5 sec) local wantedLevels = getPlayerWantedLevel ( source) local wantedTime = wantedLevels * 5000 if wantedTime > 50 then -- set the timer or do what you want. end
  19. Why waste the source? why waste data? The source isn't a parameter, it something that get created automatic when an event got trigged. function onStealthKill(source, targetPlayer) triggerServerEvent("onPedGetsKilledStealthKill", source, targetPlayer) end addEventHandler("onClientPlayerStealthKill", getLocalPlayer(), onStealthKill) function PedKilledgggg(targetPlayer) if isElement(source) then setElementData(source, "Pedkilled", getElementData(source, "Pedkilled") + 1) end end addEvent("onPedGetsKilledStealthKill", true) addEventHandler("onPedGetsKilledStealthKill", getRootElement(), PedKilledgggg) Also:(bugged) setElementData(source, "Pedkilled", getElementData(source, "Pedkilled") + 1) setElementData(source, "Pedkilled", (getElementData(source, "Pedkilled")or 0) + 1) BTW: If you don't do anything extra clientside, then do it serverside, as you did first. https://wiki.multitheftauto.com/wiki/On ... tealthKill
  20. IIYAMA

    Anti-Cheat Corner

    My script looks like that, except it is more to sync the player movement and damage. I don't kick players for lagg, I kill them. It even uses tables to manage player their health so no other things can change values from it. It is one of the biggest reasons why my servers don't have players, because the less lagg you have the better you can damage others elements. But I don't really care, the scripting is more fun then the use of it.
  21. IIYAMA

    Anti-Cheat Corner

    @1w#ALBANDER Some lagg can't be prevent with that (especially short timed outs), they come close to cheating but they are more or less gone for some time and always show up at the wrong time and place. mtasa://85.159.113.61:22014 Or click on the servers in my signature.
  22. It means getting 10% from 0 euro donations and yes that is very funny.
  23. Danny, thank you very much! It works great! Bandi thanks for explaining about the camera rotation. It seems it didn't needed the Y rotation after all. Also thanks to everybody that replied on this topic.
  24. You also can try to use a timer to reset the nitro count.
×
×
  • Create New...