Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. indeed "font.ttf"/> -- if i'm correct You can also use a folder: "fonts/font.ttf"/> The folder is also required in the script's line dxCreateFont!
  2. Maybe it was because of the IT that needed to be It, local theText = guiComboBoxGetItemText(cbmVeh2,theITem-- theItem
  3. dont bind use this, https://wiki.multitheftauto.com/wiki/GetPedTargetStart check for M4 and draw the crosshair is all that needs to be added to the wiki example.
  4. https://community.multitheftauto.com/index.php?p= ... ls&id=3379
  5. The download bar design is the MTA theme / gui you can just change the theme.
  6. How about a white marker in the ground with a bit above
  7. ViRuZGamiing

    Text

    This is dxDrawText For this you also need, onClientRender and addCommandHandler
  8. ADD: For problem 2 i'm not sure, If i'm right; addCommandHandler("gate", function (source) local position = getElementPositon (x,y,z of the move location) if (position) then -- moveObject or setElementRotation else outputChatBox("wait till the gate is closed", source, 0, 255, 0, true ) end end )
  9. change; moveObject(gate, 3000, -2864.5, 464, 4.6999998092651, 0, 0, 0) too local gateMoved = moveObject(gate, 3000, -2864.5, 464, 4.6999998092651) if (gateMoved) then local rotX, rotY, rotZ = getElementRotation(gate) setElementRotation (gate, rotX, rotY, rotZ+90) end
  10. Still don't work; Full script >> GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() --WINDOW policeWindow = guiCreateWindow (375, 125, 500, 500, "Police Panel", false) guiWindowSetSizable (policeWindow, false) guiWindowSetMovable (policeWindow, false) guiSetVisible (policeWindow, false) -- GRIDLIST policeGridList = guiCreateGridList (16, 35, 240, 444, false, policeWindow) policeNameList = guiGridListAddColumn (policeGridList, "Name", 0.4) local row = guiGridListAddRow(policeGridList) for _, player in ipairs ( getElementsByType ( "player" ) ) do guiGridListSetItemText ( policeGridList, row, policeNameList, (string.gsub ( getPlayerName ( player ), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) guiGridListSetItemData ( policeGridList, row, policeNameList, getPlayerName(player)) end policeWantedLevelList = guiGridListAddColumn (policeGridList, "Wanted", 0.4) for _, player in ipairs ( getElementsByType ( "player" ) ) do guiGridListSetItemText ( policeGridList, row, policeWantedLevelList, (string.gsub ( getPlayerWantedLevel ( player ), '#%x%x%x%x%x%x', '' ) or getPlayerWantedLevel(player)), false, false) guiGridListSetItemData ( policeGridList, row, policeWantedLevelList, getPlayerWantedLevel(player)) end --BUTTONS -- Close Button policeCloseButton = guiCreateButton (272, 430, 218, 39, "Close", false, policeWindow) -- Track Player policeTrackPlayerButton = guiCreateButton (272, 378, 218, 39, "Track Player", false, policeWindow) addEventHandler("onClientGUIClick", policeTrackPlayerButton, function () local playerName = guiGridListGetItemText ( policeGridList, guiGridListGetSelectedItem ( policeGridList ), 1 ) createBlip (playerName, 58) end ) -- Bind Key F2 addEventHandler("onClientResourceStart", resourceRoot, function () local playerTeam = getPlayerTeam ( localPlayer ) == getTeamFromName ( "Police" ) if ( playerTeam ) then bindKey("F2", "down", showPolicePanel) end end ) addEventHandler("onClientGUIClick", policeCloseButton, hidePolicePanel) end ) function showPolicePanel () guiSetVisible (policeWindow, true) showCursor (true) end function hidePolicePanel () guiSetVisible (policeWindow, false) showCursor (false) end
  11. Hey guys, I have this in my script no errors no debug but it doesn't work. function () local playerTeam = getPlayerTeam ( source ) == getTeamFromName ( "Police" ) if ( playerTeam ) then bindKey("F2", "down", showPolicePanel) end end )
  12. Indeed TAPL that's what I saw too horn is a control name bindKey ( horn, "down", function( ) x, y, z = getElementPosition ( getLocalPlayer() ) local uSound = playSound3D( x, y, z ) setSoundMaxDistance( uSound, 100 ) end )
  13. Your reply also makes no sense, i don't got further now...
  14. function horn () x, y, z = getElementPosition( localPlayer() ) local sound = playSound("horn.mp3", x, y, z) onClientElementDataChange () --how does this work? end bindKey(root, "horn", "down")
  15. The upper part is ment too be client and below server
  16. so TAPL I can just play sound client side?
  17. How about this? function horn () x, y, z = getPlayerPosition ( localPlayer() ) triggerServerEvent("root", root) local sound = playSound("horn.mp3", x, y, z) end bindKey(localPlayer(), "horn", "down") -------- addEvent("root", true) addEventHandler("root", getRootElement(), function () -- what here? end )
  18. But playSound is client side so it would be only hearable by the client player (localPlayer)
  19. Hello, Is it (i know it will be) possible to change the horn sounds with a script? don't reply with just yes but tell me how, Thanks
  20. Yes w1w but I think he added user.Console to admin group and then saved it and tried ingame to refresh.
  21. Indeed otherwise acl.xml resets
  22. Do you write /refresh ingame or refresh in your console?
×
×
  • Create New...