-
Posts
1,423 -
Joined
-
Last visited
-
Days Won
19
Everything posted by Tekken
-
The problem is that he as a server owner wants to load a custom carmods.dat file so this way will not work.
-
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.
-
There you go: good luck
- 1 reply
-
- 1
-
-
Moved your topic to Portuguese language for best results!
-
Code please?
- 1 reply
-
- help
- login panel
-
(and 2 more)
Tagged with:
-
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
-
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.
-
Hello Can you point witch line is giving that error? Also a /debugscript 3 image will be much appreciated. Greetings!
-
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!
-
Just after this setTimer(function()
-
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?
-
What schedule ?
-
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
-
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
-
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?
-
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
-
Is this in server side or client side?
-
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
-
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.
-
? 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!
-
local value = gettheranktype(); print(tostring(value)); This is called defining a variable
-
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