Jump to content

Walid

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Walid

  1. Show me your ACL.xml file
  2. Try this one function aclRel ( player ) if not isElement(player) then return end local account = getPlayerAccount ( player ) if account and not isGuestAccount(account) then local accountName = getAccountName ( account ) if ( isObjectInACLGroup ( "user." ..accountName, aclGetGroup ( "Admin" ) ) ) then local reloadacl = aclReload() if ( reloadacl ) then outputChatBox ( "acl Successfully reloaded.", player, 255, 0, 0 ) else outputChatBox ( "acl file not exist", player, 255, 0, 0 ) end else outputChatBox ( "You are not able to use this command", player, 255, 0, 0 ) end end end addCommandHandler ( "racl", aclRel )
  3. shutdown the server then open it.
  4. Walid

    -3 Letters-

    3 letters not 4 anyways Rolling on Floor Laughing HKL
  5. try to reload your acl.xml file type /racl in your chabox then press enter. function reload ( player) if not isElement(player) then return end local reload = aclReload() if ( reload ) then outputChatBox ( "ACL was successfully reloaded.", player, 255, 0, 0 ) else outputChatBox ( "An unknown error occured. Please check the ACL file exists.",player, 255, 0, 0 ) end end addCommandHandler ( "racl", reload )
  6. try to add this to your acl.xml file "DJ"> "user.<< your account name >>">
  7. done the problem from your code addEventHandler("onMarkerHit", marker, function ( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if getElementData(hitElement, "Show_GUI") ~= nil then triggerClientEvent(hitElement,"ShowGui",hitElement) end end end )
  8. i'm sorry i can't help you your code is totaly wrong, you need to learn LUA language first . sorry
  9. as WhoAmI said try this addEventHandler("onMarkerHit", marker, function ( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if getElementData(hitElement, "Show_GUI") ~= nil then triggerClientEvent(hitElement,"ShowGui",hitElement) end end end )
  10. what are trying to do , i think you need this Wiki
  11. Are you serious player[source] table ???? Post full code here
  12. ofc man it's client side ,copy and past my code
  13. You must define the marker like this : addEventHandler("onClientElementDestroy", getRootElement(), function () if getElementType(source) == "marker" and source == bankmarker then setTimer ( function() bankmarker = createMarker( -725.01849, 969.94299, 11.4, "cylinder", 1.5, 255, 0, 0, 255 ) end,3000,1) end end )
  14. You must use triggerClientEvent when the player hit the marker. Server side : marker = createMarker (487.599609375, -0.900390625, 1001.4000244141, "cylinder", 0.60000002) stoldj = createObject (14391, 487.7001953125, -2.7001953125, 1002.299987793, 0, 0, 90) marker2 = createMarker (493.39999389648, -24.799999237061, 1001.299987793, "arrow", 1.20000004, 235, 227, 19, 255) marker3 = createMarker (1836.8000488281, -1682.5, 13.89999961853, "arrow", 1.20000004, 235, 227, 19, 255) glosnik1 = createObject (2232, 484.29998779297, -5.6999998092651, 1001.700012207, 0, 0, 0) glosnik2 = createObject (2232, 490.20001220703, -5.5999999046326, 1001.700012207, 0, 0, 0) glosnik3 = createObject (2232, 493.29998779297, -13.89999961853, 1002, 0, 0, 272) tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) barierka1 = createObject (2773, 1836, -1681, 13, 0, 0, 90) barierka2 = createObject (2773, 1833.4000244141, -1681, 13.10000038147, 2, 0, 90) barierka3 = createObject (2773, 1836.0999755859, -1684, 12.89999961853, 2, 0, 90) barierka4 = createObject (2773, 1833.4000244141, -1684, 13, 1.99951171875, 0, 90) blip = createBlip (1837.1999511719, -1682.5, 14.199999809265, 48, 2, 255, 0, 0, 255, 0) addEventHandler("onResourceStart", resourceRoot, function() tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) setTimer (AnimacjaTancerek, 1000, 0) for i, player in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("DJ")) then if isElementWithInMarker("player") then setElementData(player, "Show_GUI", true) else setElementData(player, "Show_GUI", nil) end end end end) addEventHandler("onMarkerHit", marker function openGUI( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if getElementData(hitElement, "Show_GUI") ~= nil then triggerClientEvent(hitElement,"ShowGui",hitElement) end end end ) function AnimacjaTancerek() setPedAnimation (tancerka1, "STRIP", "Strip_G") setPedAnimation (tancerka2, "DANCING", "dnce_M_e") end function TeleportNaDyskoteke(player) if getElementType(player)=="player" then if source == marker3 then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) setElementInterior(player, 17) setElementFrozen(player, true) setElementInterior(glosnik1, 17) setElementInterior(glosnik2, 17) setElementInterior(glosnik3, 17) setElementInterior(marker2, 17) setElementInterior(marker, 17) setElementInterior(stoldj, 17) setElementInterior(tancerka1, 17) setElementInterior(tancerka2, 17) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker3, TeleportNaDyskoteke) function TeleportZDyskoteki(player) if getElementType(player)=="player" then if source == marker2 then setElementPosition(player, 1834.6999511719, -1682.5999755859, 13.39999961853) setElementInterior(player, 0) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker2, TeleportZDyskoteki) addEventHandler("onPlayerLogin", root, function(_, acc) if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("DJ")) then setElementData(source, "Show_GUI", true) else setElementData(source, "Show_GUI", nil) end end ) addEventHandler("onPlayerLogout", root, function(_, acc) triggerClientEvent(source, "LogOutSetVisible", root) setElementData(source, "Show_GUI", nil) end ) Client side: GUIEditor = { button = {}, window = {}, label = {}, memo = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(242, 216, 1224, 670, "DjPanel By Matevsz", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(22, 39, 360, 32, "Wlacz dym", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(23, 93, 359, 34, "Wylacz dym", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(23, 179, 359, 32, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(81, 159, 253, 15, "Wpisz tekst, ktory bedzie pokazany na scianie", false, GUIEditor.window[1]) GUIEditor.browser[1] = guiCreateBrowser(396, 39, 810, 609, "", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(13, 624, 108, 34, "Zamknij", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(91, 228, 222, 29, "Pokaz tekst", false, GUIEditor.window[1]) local theBrowser = guiGetBrowser(GUIEditor.browser[1]) end ) function showGui() if not guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end addEvent("ShowGui", true) addEventHandler("ShowGui",root,showGui) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, "https://www.youtube.com") end ) function WlaczDym() if source == GUIEditor.button[1] then dym = createObject (2780, 489.29998779297, -13.89999961853, 994.20001220703, 0, 0, 0) elseif source == GUIEditor.button[2] then if isElement(dym) then destroyElement(dym) end elseif source == GUIEditor.button[3] then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end addEventHandler("onClientGUIClick", root, WlaczDym) addEvent("LogOutSetVisible", true) addEventHandler("LogOutSetVisible", root, function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end )
  15. He is using server side marker to trigger the gui i think you must read the client side he is trying to use onMarkerHit. ???
  16. addEventHandler("onClientElementDestroy", getRootElement(), function () if getElementType(source) == "marker" and source == bankmarker then setTimer ( function() createMarker( -725.01849, 969.94299, 11.4, "cylinder", 1.5, 255, 0, 0, 255 ) end,3000,1) end end )
  17. You are trying to use onMarkerHit > it's server side function you must use onClientMarkerHit() more than that marker it's not defined client side
  18. addEventHandler("onClientElementDestroy", getRootElement(), function () if getElementType(source) == "marker" and source == bankmarker then setTimer ( function() createMarker( -725.01849, 969.94299, 11.4, "cylinder", 1.5, 255, 0, 0, 255 ) end,3000,1) end)
  19. about your first question it can be like this : function example(key) if (key == "p") then if (getKeyState("lctrl")) then -- You code here end end end bindKey("p", "down", example) About second question : Yes you can use setClipboard()
  20. ??? x, y, z it's not defined in your code. Wrong
  21. it's very simple put the marker outside like this local DestinationMarker = createMarker(1997.4537353516, -1829.6383056641, 13.546875,"cylinder", 1, 255, 0, 0, 255) or simply put the eventHandler 'onMarkerHit' inside the function like this: function onEnter(thePlayer, seat, jacked ) if source == van then outputChatBox("Take the van to the desired location to become a criminal! (Blip)",thePlayer, 255, 0, 0) local blip = createBlip(1997.4537353516, -1829.6383056641, 13.546875, 0) local DestinationMarker = createMarker(1997.4537353516, -1829.6383056641, 13.546875,"cylinder", 1, 255, 0, 0, 255) setElementVisibleTo(blip,thePlayer, true) setElementVisibleTo(DestinationMarker, thePlayer, true) addEventHandler("onMarkerHit", DestinationMarker,check) end end addEventHandler ( "onVehicleEnter", getRootElement(), onEnter ) function check(hitElement,matchingDimension) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if not isPedInVehicle(hitElement) then return end local vehicle = getPedOccupiedVehicle(hitElement) if vehicle then if vehicle == van then destroyElement(vehicle) outputChatBox("You reached the desired destination, you're now a criminal!", source, 255, 0, 0) setPlayerTeam(source, getTeamFromName("Criminals")) end end end end copy and past my code because i'm pretty sure you still using DestinationMarker as a local variable. BTW why you used setPlayerTeam two times because the player is already criminal.
  22. Man use my code . About this simply because MrTasty gave you a wrong code did you know why because the source of this event "onMarkerHit" is the marker that got hited by the element. so in your code you are checking if the marker is inside a vehicle. is that normal ???
  23. Anyways Fixed the whole code local Marker = createMarker(1946.6300048828, -1804.4787597656, 13.546875,"cylinder", 1, 255, 255, 255, 255) local team = createTeam("Criminals", 255, 0, 0) local van = createVehicle(482, 1947.1529541016, -1807.6397705078, 13.546875) addEvent("criminaljob", true) addEventHandler("criminaljob", resourceRoot, function() setPlayerTeam(client, getTeamFromName("Criminals")) setPlayerNametagColor(client, 255, 0, 0) outputChatBox("You accepted the job Criminal. Take the van to the yellow blip in map.",client, 0, 255, 0) end ) addEventHandler("onMarkerHit", Marker, function(hitElement,matchingDimension) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then triggerClientEvent(hitElement, "onHit", hitElement) end end ) function onEnter(thePlayer, seat, jacked ) if source == van then outputChatBox("Take the van to the desired location to become a criminal! (Blip)",thePlayer, 255, 0, 0) local blip = createBlip(1997.4537353516, -1829.6383056641, 13.546875, 0) setElementVisibleTo(blip,thePlayer, true) DestinationMarker = createMarker(1997.4537353516, -1829.6383056641, 13.546875,"cylinder", 1, 255, 0, 0, 255) setElementVisibleTo(DestinationMarker, source, true) end end addEventHandler ( "onVehicleEnter", getRootElement(), onEnter ) addEventHandler("onMarkerHit", DestinationMarker, function(hitElement,matchingDimension) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if not isPedInVehicle(hitElement) then return end local vehicle = getPedOccupiedVehicle(hitElement) if vehicle then if vehicle == van then destroyElement(vehicle) outputChatBox("You reached the desired destination, you're now a criminal!", source, 255, 0, 0) setPlayerTeam(source, getTeamFromName("Criminals")) end end end end ) Untested
×
×
  • Create New...