-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
Make sure you have all the necessary ports open. https://wiki.multitheftauto.com/wiki/Server_Commands#openports
-
giveWeapon triggerClientEvent triggerServerEvent getElementPosition setPedAimTarget setPedControlState 'onClientPedDamage'
-
Try with a timer. function makePed() ped1 = createPed(107, 2490.5, -1651.5, 13.5) setTimer(function() setPedRotation(ped1, 90.0041198) setPedAnimation(ped1, "SMOKING", "M_smklean_loop") end, 100, 1) end addEventHandler("onResourceStart", resourceRoot, makePed)
-
Attach the event to resourceRoot instead of root element. And make sure you have the script server side in the meta. The block of M_smklean_loop isn't ped. https://wiki.multitheftauto.com/wiki/Animations
-
Why you don't post what you've tried?
-
https://wiki.multitheftauto.com/wiki/Settings_system
-
No, you need to loop the table returned from aclGroupListObjects.
-
Just use the example above, i have tested putting more than one dot and it acceptable.
-
You won't be able to use isObjectInACLGroup as you don't know the player name and the reason, therefore you must use aclGroupListObjects to get a list of all objects and do a loop and use gettok. Example: StR = "user.TheSerial.PlayerName.Reason" Serial = gettok(StR, 2, string.byte(".")) Name = gettok(StR, 3, string.byte(".")) Reason = gettok(StR, 4, string.byte(".")) outputChatBox(Serial) outputChatBox(Name) outputChatBox(Reason) PS: I'm not sure if you could use more than one dot in the object you might need to use other symbol.
-
اممم واضح اخطاء كبيرة بالكلمات
-
^ ماهو تيم onClientGUIClick اول بارتمر في الأفنت مو بس تحط اي شي عشوائيا لازم تفهم ايش هو البارتمر الخاص بالأفنت من صفحة الويكي + getPlayersInTeam انت اساساً جايب اللاعبين الي في تيم معين عن طريق الفنكشن بالتالي المقارنة الي انت مسويها في سطر 6 و 8 ما لها داعي معرف Red او Blue و ما اعتقد ان عندك متغير بأسم استخدم ذا
-
عند الملس playSoundFrontEnd addEventHandler ("onClientMouseMove",root, function () if (source == اسم الزر) then playSoundFrontEnd ( source, 27 ) end end ) بدل 27 بــ ايدي الصوت فنكشن الصوت بالكلينت ما يحتاج لاعب + السورس في الأفنت هذا بيكون الزر...
-
مافيه خطأ النافذه اول ما تسويها تكون ظاهره لازم تخفيها بأستخدام الفنكشن ذا guiSetVisible اضاف لك الكود في سطر 15 Mr.T9
-
https://wiki.multitheftauto.com/wiki/Introduction_to_Scripting_the_GUI
-
allowLeaveVehicle = true col = createColSphere(-1904.5953369141, 275.81134033203, 41.046875, 1.5) function openDoor(player) if getElementType(player) == "player" then local veh = getPedOccupiedVehicle(player) if veh then setGarageOpen(18, true) allowLeaveVehicle = true end end end addEventHandler("onColShapeHit", col, openDoor)
-
local veh1 = createVehicle(478, 2474, -1690.4, 13.6, 0, 0, 0) function showMarker(vehicle) if vehicle == veh1 and getElementModel(vehicle) == 478 and not theMarker then theMarker = createMarker (2515.6001, -1671.9, 11.8, "cylinder", 5.0, 100, 200, 100, 200) end end addEventHandler("onPlayerVehicleEnter", root, showMarker) function showText () if source == theMarker then outputChatBox("It worked!") end end addEventHandler("onMarkerHit", root, showText)
-
Try this: trees = {} treesblip = {} function createTrees(p) if p == getLocalPlayer() then for i, index in pairs(treesPositions) do for i, v in ipairs(index) do local x, y, z = unpack(v) local treeObj = createObject(idList[math.random(1, 3)], x, y, z) table.insert(trees, treeObj) treesblip[treeObj] = createBlipAttachedTo(treeObj, 0, 1, 255, 255, 0, 255, 0, 500) end end end end addEvent("onClientPlayerQuitJob", true) function :~(p, job) if p == getLocalPlayer() and job == "Lumberjack" then treeloaded = false for i, index in ipairs(trees) do destroyElement(index) destroyElement(treesblip[index]) treesblip[index] = nil end trees = {} end end addEventHandler("onClientPlayerQuitJob", root, :~)
-
At the second code put an outputChatBox before and after line 4 and see if it has passed.
-
I don't know what the purpose of the element data, but i assume that you have some other code control the element data 'duty'. arrowTable = {} addCommandHandler("aduty", function(player) local duty = getElementData(player, "duty") or 0 if duty == 0 then if not isElement(arrowTable[player]) then arrowTable[player] = createMarker(0, 0, 0, "arrow", 0.75, 255, 0, 0, 175) end attachElements(arrowTable[player], player, 0, 0, 2) else if isElement(arrowTable[player]) then destroyElement(arrowTable[player]) arrowTable[player] = nil end end end) addEventHandler("onPlayerQuit", root, function() if isElement(arrowTable[player]) then destroyElement(arrowTable[player]) arrowTable[player] = nil end end)
