-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
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!
-
[HELP] Need help with if text == "Admiral" then
ViRuZGamiing replied to ViPeR124's topic in Scripting
Maybe it was because of the IT that needed to be It, local theText = guiComboBoxGetItemText(cbmVeh2,theITem-- theItem -
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.
-
https://community.multitheftauto.com/index.php?p= ... ls&id=3379
-
The download bar design is the MTA theme / gui you can just change the theme.
-
How about a white marker in the ground with a bit above
-
This is dxDrawText For this you also need, onClientRender and addCommandHandler
-
Help me, a small problem but Idk how to fix it
ViRuZGamiing replied to montenegro11's topic in Scripting
Just wanted to send that too.. -
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 )
-
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
-
Do you mean MySQL or SQLite?
-
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
-
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 )
-
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 )
-
Your reply also makes no sense, i don't got further now...
-
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")
-
The upper part is ment too be client and below server
-
so TAPL I can just play sound client side?
-
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 )
-
But playSound is client side so it would be only hearable by the client player (localPlayer)
-
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
-
Yes w1w but I think he added user.Console to admin group and then saved it and tried ingame to refresh.
-
Indeed otherwise acl.xml resets
-
Do you write /refresh ingame or refresh in your console?
