Jump to content

Tekken

Helpers
  • Posts

    1,423
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Tekken

  1. The problem is that he as a server owner wants to load a custom carmods.dat file so this way will not work.
  2. Hi Nope, don’t think so, however MTA supports a lot of handling modifications and custom tuning to vehicles if that’s what you looking for. https://wiki.multitheftauto.com/wiki/AddVehicleUpgrade Greetings.
  3. There you go: good luck
  4. Moved your topic to Portuguese language for best results!
  5. It will not be as you freeze it on client side (the PC of the player that frozen the object), so you should do it on server side: testdoor = createObject(1499, 1580.03149, -1631.73987, 12.38281) function freezeObject() local currentFreezeStatus = isElementFrozen ( testdoor ) if currentFreezeStatus then setElementFrozen ( testdoor, not currentFreezeStatus ) outputChatBox("You have opened the door!",255,255,255) else setElementFrozen ( testdoor, not currentFreezeStatus ) outputChatBox("You have closed the door!",255,255,255) end end addEventHandler("onResourceStart", resourceRoot, function() --bind for all online players on resource start for i,player in pairs(getElementsByType("player")) do bindKey(player, "e", "down", freezeObject) end end); addEventHandler("onPlayerJoin", root, function() --bind for player on he joins bindKey(source, "e", "down", freezeObject) end); Server-side^ Sorry for the messy code I’m on phone
  6. Server id off due to missing player interest, however I’m still working on a Standalone-like version, with real zombie threat, hard-survival, main objective will be to survive and not to kill other players. Will post some ss soon.
  7. Hello Can you point witch line is giving that error? Also a /debugscript 3 image will be much appreciated. Greetings!
  8. Tekken

    help please

    I've made you an simple AFK system based on your code: --Client local lasTimeOnKeyboard = getTickCount(); local timeoutAFK = 5; --How much minutes to make him AFK ? local isClientAFK = false; function toggleClientAFK(toggle) if isClientAFK ~= toggle then isClientAFK = toggle; triggerServerEvent("toggleAFKStat", localPlayer, toggle); end end addEventHandler("onClientRender", root, function() if (getTickCount() - lasTimeOnKeyboard) >= (timeoutAFK * 60000) then if not isClientAFK and getElementHealth(localPlayer) > 0 then toggleClientAFK(true); end end end); addEventHandler("onClientKey", root, function() lasTimeOnKeyboard = getTickCount(); toggleClientAFK(false); end); addEventHandler("onClientCursorMove", root, function() lasTimeOnKeyboard = getTickCount(); toggleClientAFK(false); end) addEventHandler("onClientRestore", root, function() lasTimeOnKeyboard = getTickCount(); toggleClientAFK(false); end) addEventHandler("onClientMinimize", root, function() toggleClientAFK(true); end); --Server addEvent("toggleAFKStat", true); local isPlayerAFK = {}; addEventHandler("toggleAFKStat", root, function(toggle) if toggle then if not isPlayerAFK[client] then isPlayerAFK[client] = true; outputChatBox(getPlayerName(client).." is now AFK!", root, 255, 0, 0, true); end else if isPlayerAFK[client] then isPlayerAFK[client] = false; outputChatBox(getPlayerName(client).." is no more AFK!", root, 0, 255, 0, true); end end end); NOTE that it contains both Client and Server! And BTW you can't use outputChatBox on client to output on root element!
  9. setElementModel (thePlayer, tonumber(getElementData(accSys:getPlayerAcc(thePlayer), "cSkin")))
  10. Tekken

    help please

    Is that your full code?
  11. Tekken

    help please

    Just after this setTimer(function()
  12. Does this have to be a vehicle component ? If not you can create an object attach it to vehicle and apply rotation to abject when vehicle moves?
  13. Ohhh ok got it wait a sec Add this to onClientPlayerDamage if weapon == 51 then triggerEvent("killDayzPlayer", localPlayer); return; end This is already in your code but you don’t have the return thing, you mai just add that after the triggerEvent
  14. Well that should work, please note that if used on client side that returns the clients computer time witch might be different from server time! A work around will be to set the game time as the real time on server side and get the game time on the client. If not you can set it as an elementData on root element and update that data every hour on server
  15. Just add the isDead element data before triggering the event, also can you send a debugscript 3 img of when a veh explode with you driving it?
  16. Tekken

    help please

    Then you should start the timer when client streams in and not before, a simple if check should do such as if isElement(getLocalPlayer()) then
  17. Tekken

    help please

    Is this in server side or client side?
  18. Tekken

    help please

    Instead of outputChatBox("#d75959[Admin AFK]:#32b3ef " .. getLocalPlayer() .. "#ffffff 5 perce AFK dutyban.", getRootElement(), 255, 255, 255, true) Use: outputChatBox("#d75959[Admin AFK]:#32b3ef " .. getPlayerName(getLocalPlayer()) .. "#ffffff 5 perce AFK dutyban.", getRootElement(), 255, 255, 255, true
  19. addEventHandler("onVehicleExplode", root, function() local occupants = getVehicleOccupants(source); for i = 0, #occupants do local player = occupants[i]; setElementData(player, "isDead", true); triggerEvent("killDayZPlayer", player); end end); server ^ This should work, if not let me know. I wrote it on phone.
  20. Model is missing in second setElementModel
  21. ? SQL should do it! However if you’re not experienced I suggest searching on community for an already made script https://community.multitheftauto.com If you still want to give it a try, we’re here to help!
  22. local value = gettheranktype(); print(tostring(value)); This is called defining a variable
  23. Hello, I’ve moved your topic to the appropriate section for best results! To fade you can decrease alpha until completely disappeared ? Also you can use this function to create some nice effects https://wiki.multitheftauto.com/wiki/InterpolateBetween
×
×
  • Create New...