Jump to content

cheez3d

Members
  • Posts

    290
  • Joined

  • Last visited

Everything posted by cheez3d

  1. Search for the original ammo names everywhere else in the gamemode and replace all the occurrences.
  2. You are not setting the Marker ID's anywhere. You should also create a table with all the markers and loop trough it instead of creating every marker manually. local markers = { {692.7001953125,-3341.599609375,-3,"cylinder",1,5,250,45}, {664.09997558594,-3288.8999023438,4.8000001907349,"cylinder",0.5,170,240,10}, {683.90002441406,-3291,5,"cylinder",0.5,170,240,10}, {701.20001220703,-3260.5,4.0999999046326,"cylinder",0.5,170,240,10}, {712.59997558594,-3245.3999023438,3.7000000476837,"cylinder",0.5,170,240,10}, {745.20001220703,-3265.6999511719,4.8000001907349,"cylinder",0.5,170,240,10}, {759.59997558594,-3230.3000488281,7.0999999046326,"cylinder",0.5,170,240,10}, {816.59997558594,-3277.8000488281,9.1999998092651,"cylinder",0.5,170,240,10}, {841,-3328.8999023438,17.299999237061,"cylinder",0.5,170,240,10}, } for markerid,_ in ipairs (markers) do local m = createMarker(markers[markerid][1],markers[markerid][2],markers[markerid][3],markers[markerid][4],markers[markerid][5],markers[markerid][6],markers[markerid][7],markers[markerid][8]) setElementID(m,"m"..markerid) setElementAlpha(m,0) end local function popUpMarker() local marker = getElementByID("m"..math.random(1,#markers)) setElementAlpha(marker,255) end setTimer(popUpMarker,2000,0) addCommandHandler("tp",function(player,_) setElementPosition(player,660.90002441406,-3290.3999023438,5) end)
  3. Try getting the speed of the vehicle then play a sound with custom effects depending on the speed. getElementVelocity() playSound3D() setSoundProperties() setSoundSpeed()
  4. addCommandHandler("cvm",function(_,player) local x,y,z = getElementPosition(player) local marker = createMarker(x,y,z+5) addEventHandler("onMarkerHit",marker,function(element,dimension) if getElementType(element) == "player" and dimension then local x,y,z = getElementPosition(element) local vehicle = createVehicle(432,x,y,z) if vehicle then warpPedIntoVehicle(element,vehicle,0) outputChatBox(getVehicleName(vehicle).." spawned!",element) end end end) end)
  5. I don't know if this is the right section to ask my question but I was wondering if there is any way I could delete the noise effect from the Infrared goggles. Those dots you see? I would like to create a better infrared shader and I need to get rid of that noise. Anyone knows how?
  6. cheez3d

    Help me!

    messages = {"msg1","msg2","msg3","msg4"} setTimer(function() local randomMsg = math.random(1,#messages) outputChatBox(messages[randomMsg],root,255,255,255,true) end ,3600000,0) This displays one of those 4 messages every one hour in an infinite loop.
  7. cheez3d

    GTA User files

    You put your desired audio files in the User Trak Player folder and then you go on MTA and switch the radio to user track player and it should play your audio files.
  8. cheez3d

    GTA User files

    You must put your aduio file in %mtadir%/server/mods/deathmatch/resources/[your_resource] Then add the file in the meta.xml like this: "your_audio_file"/> To play the file you must do something like this: local sound = playSound("your_audio_file",false) setSoundVolume(sound,1) --the script is clientside
  9. For the camera matrix you can do this: initialX,initialY,initialZ = yourXposHere,yourYposHere,yourZposHere setCameraMatrix(initialX,initialY,initialZ) function moveCamera() addX = initialX + 0.1 setCameraMatrix(addX,initialY,initialZ) if addX >= finalXposHere then removeEventHandler("onClientPreRender",root,moveCamera) end end addEventHandler("onClientPreRender",root,moveCamera)
  10. function onVehicleClick(clickedElement) if clickedElement and clickedElement == getElementType("vehicle") then if getElementModel(clickedElement) == 523 or 598 or 596 or 597 or 599 then local playerTeam = getPlayerTeam(source) if playerTeam and getTeamName(playerTeam) == "Police" then giveWeapon(source, 23, 200) end end end end addEventHandler("onClientClick",root,onVehicleClick) addEventHandler("onClientResourceStart",root,function() bindKey (source,"m","down",function() showCursor(not isCursorShowing()) end )
  11. local myWindow = guiCreateWindow ( 0, 0, 0.5, 0.4, "Information", true ) local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) local tabScript = guiCreateTab( "Script Information", tabPanel ) local tabStaff = guiCreateTab( "Staff", tabPanel ) guiCreateLabel(0.02, 0.04, 0.94, 0.2, "These scripts have been edited and have new custom systems.", true, tabScript) guiCreateLabel(0.02, 0.04, 0.94, 0.92, "Owner - Lewis White.\nCo-Owner - Bob Falcon\nHead Admins - None\nLead Admins - None\nSuper Admins - None\nAdmins - Brian James\nTrial Admins - James Bullet, Jack Granger", true, tabStaff) function closemyWindow () guiSetVisible (myWindow, false) end local seconds = 120 setTimer(closemyWindow,seconds*1000)
  12. I have a little problem with this code right here. What I'm trying to do is get this script go trough all the accounts that are on the server and get the string contained by the "name" data for each account. I want this for a name checker. If the name already exists in one of the server's accounts then the player will have to choose other name. But I can't get this script working. I can't find a way to get the account name to check the data for form getAccounts(). I hope you understand what im trying to accomplish. Alright then. Here's the code. Any help would be appreciated. addEvent("checkIfNameTaken",true) addEventHandler("checkIfNameTaken",getRootElement(),function() for i,account in ipairs (getAccounts()) do checkedAccountName = getAccountData(getAccount(account),"name") if checkedAccountName == thisAccountName then triggerClientEvent("showErrorOutputNameTaken",getRootElement()) end end end )
  13. I have created a custom client side event that will be triggered with a server side script when a player joins the server. Client side: dayzLoginSong = "login/logintheme_dayz.mp3" addEvent("playDayzLoginTheme",true) addEventHandler("playDayzLoginTheme",root,function () playSound(dayzLoginSong,true) setSoundVolume(dayzLoginSong,0.2) end) Server side: function moveDayzLoginCameraToStart() triggerClientEvent(getRootElement(),"playDayzLoginTheme",source) fadeCamera(source, true, 1) setCameraMatrix(source,227.3,2611.5,25,12,0,142) end addEventHandler("onPlayerJoin", getRootElement(), moveDayzLoginCameraToStart) Whenever i join the game the music does not play. In the debuscript console i receive this: WARNING: DayZ/login/login_music.lua:6: Bad 'sound/player' @ 'setSoundVolume'(1) what could be the problem. i cant figure out..
×
×
  • Create New...