Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 19/12/22 in all areas

  1. you're welcome, i love that your problem has been fixed, if you have any questions, create a new thread and tag me If you like my comments, you can like comment
    1 point
  2. welcome to the forum, i don't understand your question much, i suggest you explain a bit more so i can help you better,but i sent you a code, i want you to test it... local marker = createMarker(-704.3701171875,963.20855712891,11, "cylinder", 1.3, 244, 244, 244, 244) local skin = getElementModel(localPlayer) local marker_1 function startJob(hitPlayer) local isJob = getElementData(hitPlayer, "job") if (isJob) then if(isElement(marker_1)) then destroyElement(marker_1) marker_1 = nil end setElementData(hitPlayer, "job", nil) setElementModel(hitPlayer, skin) outputChatBox("Goodbye, now you cant work", 255, 255, 255, true) else if(isElement(marker_1)) then destroyElement(marker_1) marker_1 = nil end marker_1 = createMarker(-688.35162353516, 953.43170166016, 11, "cylinder", 1.3, 244, 244, 244, 244) setElementData(hitPlayer, "job", true) outputChatBox("Hey! You can work.", 255, 255, 255,true) setElementModel(hitPlayer, 50) end end addEventHandler('onClientMarkerHit', marker, startJob) @w3rt1x
    1 point
  3. you're welcome, if you have any new questions please create a new topic and tag me
    1 point
  4. https://forum.multitheftauto.com/topic/124678-rel-custom-weapons-system-10/
    1 point
  5. addEventHandler + group elements I noticed that some people like to add 10000000000000000 addEventHandlers for each element, while you probably only need 1 addEventHandler. Using ONE addEventHandler on a group of elements? Answer: local group = createElement("groupMyCutePeds") -- Create a custom element and save it in to the variable <group>. -- Create 3 peds. local ped1 = createPed(120, 5540.6654, 1020.55122, 1240.545) local ped2 = createPed(120, 5541.6654, 1021.55122, 1240.545) local ped3 = createPed(120, 5542.6654, 1022.55122, 1240.545) -- Set the parent of the 3 peds. setElementParent(ped1, group) setElementParent(ped2, group) setElementParent(ped3, group) -- Add an addEventHandler and use the <group> as <attachedTo> element. addEventHandler("onPedWasted", group, -- "onPedWasted" = serverside. "onClientPedWasted" = clientside. function () outputChatBox("One of my cute peds just died. ;'( No exceptions!") end) Code is untested, but the method is tested. Syntax for functions in example createElement syntax element createElement ( string elementType, [ string elementID = nil ] ) setElementParent syntax bool setElementParent ( element theElement, element parent ) addEventHandler syntax bool addEventHandler ( string eventName, element attachedTo, function handlerFunction, [ bool getPropagated = true, string priority = "normal" ] ) DO NOT disable getPropagated getPropagated: A boolean representing whether the handler will be triggered if the event was propagated down or up the element tree (starting from the source), and not triggered directly on attachedTo (that is, handlers attached with this argument set to false will only be triggered if source == this). If you disable this, children of the <group> element are not included. Make use of the element tree Element tree For applying addEventHandlers to elements created by the resource: Use: resourceRoot / getResourceRootElement For applying addEventHandlers to elements created by scripts of the resource: Use: getResourceDynamicElementRoot For applying addEventHandlers to elements created by maps of the resource: Use: getResourceMapRootElement I hope your code will be without... print(10^10^10^10) -- Print here: https://www.lua.org/cgi-bin/demo ...addEventHandlers in the future.
    1 point
  6. https://wiki.multitheftauto.com/wiki/GetZoneName https://wiki.multitheftauto.com/wiki/GetElementPosition use a condition in function that spawn the zombies.
    1 point
  7. NEW/CUSTOM WEAPONS This resource allow you to add weapons, you can add new type of weapons, for while its just for rifles that replace M4 V1.0 8 Weapons ( Rifle ) Different sounds. HOW TO USE F2 open panel, you just need to select the weapon. How to add weapons. Open both scripts client and server Add the name of weapon that you want in table {"AUG",4394} > Name, and Object ID that you will replace it Take the skin of weapon put in models folder and in meta.xml The name of dff and txd must be the same of weapon in table ( without space ) in table you can put space. Make the same with the .wav sound. FUNCTION TO EXPORT giveNewWeapon(player,WEAPONAME) --Example. function givewep(player) giveNewWeapon(player,"M4A1") end DOWNLOAD: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18149
    1 point
  8. Your situation will be further investigated by the anticheat team based on the information you have provided. Afterwards, they will come with a conclusion partaining your case which you'll know about in this topic. In the mean time, please remember there's currently a delayed response time and this might take a bit longer than usual. Avoid tagging and/or bumping your topic, as this will not speed up the process.
    0 points
×
×
  • Create New...