Jump to content

itHyperoX

Members
  • Posts

    522
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by itHyperoX

  1. itHyperoX

    [Help]

    radararea createRadarArea ( float leftX, float bottomY, float sizeX, float sizeY, [ int r = 255, int g = 0, int b = 0, int a = 255, element visibleTo = getRootElement() ] ) local pArea1 = createRadarArea( 2130, 630, 200, 100, 0, 0 0, 50)
  2. you can use AddVehicleSirens, with this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=553 GL!
  3. test this addCommandHandler("helpme",function(source,cmd,...) local message = table.concat({ ... }, " ") if #message > 0 then outputChatBox("A gondod: "..message,source) end for k,v in ipairs(getElementsByType("player")) do local accName = getAccountName(getPlayerAccount(v)) if isObjectInACLGroup( "user."..accName, aclGetGroup( "Admin" ) ) then outputChatBox("[Segítségkérelem]: (Játékos: "..getPlayerName(source)..") :"..message, v, 255, 255, 255, true) end end end)
  4. this from community, i tested it's work. parkYerleri = {} park = dxCreateTexture("troll-face-sticker-8744.png") parkYerleri[1] = createMarker(-2289.07007, -1627.28430, 483.75891, "corona", 1, 255, 185, 0, 0 ) function parkYeri() for i,v in ipairs(parkYerleri) do _3DResim(v,park); end end addEventHandler("onClientRender", getRootElement(), parkYeri) function _3DResim(TheElement,Image,distance,height,width,R,G,B,alpha) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local width = width or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawMaterialLine3D(x, y, z+1+height-(distanceBetweenPoints/distance), x, y, z+height, Image, width-(distanceBetweenPoints/distance), tocolor(R or 255, G or 255, B or 255, alpha or 255)) end end end end
  5. you missed the " , " dxDrawImage3D(-2289.07007, -1627.28430, 483.75891, 20, 20, fakboi, tocolor(255,255,255,255))
  6. local marker = createMarker(x,y,z,"cylinder",1.3,255,0,0,255) addEventHandler("onClientMarkerHit", marker,function(p) if p == localPlayer then showCursor(true) -- your gui here end end )
  7. Niice thank you buddy. Working perfect
  8. if #playercar == 1 then local x,y,z = getElementPosition(source) local vehicle = createVehicle(playercar[1].vehID,x + 5,y +2,z) setElementData(vehicle,"vehicle:Owner","vehicleSpawned") setElementData(vehicle,"vehicleSpawned",getPlayerName(source)) setElementData(source, "vehicleSpawned", vehicle) setElementData(vehicle,"VehOwner",getPlayerName(source)) vehicleSpawnMessage(1) else noVehicleOnSlot(1) end I checked with a command, and its working. addCommandHandler("test",function(source,cmd) veh = getElementData(source,"myVehicle1") isInVeh = getPedOccupiedVehicle ( source ) if isInVeh then if isElement(veh) then outputChatBox("The vehicle is spawned",source) else outputChatBox("The vehicle is not spawned",source) end else outputChatBox("Not in veh") end end)
  9. when player spawning the vehicle Tried, the same error.
  10. Hello, i'm working on a vehicle system, and again got some problem.... destroyElement - expected element at argument 1. Code: addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() targetSpawnedVeh = getElementData(source,"vehSpawned") if targetSpawnedVeh then destroyElement(targetSpawnedVeh) removeElementData(source,"vehSpawned") outputChatBox("success1") else outputChatBox("error") end end) addEventHandler("onResourceStop",resourceRoot,function() targetSpawnedVeh = getElementData(source,"vehSpawned") if targetSpawnedVeh then destroyElement(targetSpawnedVeh) removeElementData(source,"vehSpawned") outputChatBox("success2") else outputChatBox("error") end end) Always returning to "error"
  11. Hello, whats the problem? Debug error: getVehicleNameFromModel expected number at argument 1 got boolean addCommandHandler("checkplayervehicle",function(source,cmd,target) if not (target) then outputChatBox("/checkplayervehicle [Player]") else local target, targetName = exports["serverCore"]:findPlayer(source,target) if target then local targetAccount = getAccountName(getPlayerAccount(target)) local playercar1 = executeSQLQuery("SELECT Model FROM vehicleSlot1 WHERE PlayerName = ?",targetAccount) if #playercar1 > 1 then outputChatBox(getVehicleNameFromModel(playercar1),source) else outputChatBox("slot 1 empty",source) end local playercar2 = executeSQLQuery("SELECT Model FROM vehicleSlot2 WHERE PlayerName = ?",targetAccount) if #playercar2 > 1 then outputChatBox(getVehicleNameFromModel(playercar2),source) else outputChatBox("slot 2 empty",source) end end end end)
  12. yes you can, you can you setElementData, getElementData. You can make a exports function too.
  13. its like smaller than original. Is there any way to make it like the same , but fit all resolution?
  14. Hello, i trying to make a hud, like in pubg, but for some reason, with low resolutions players can't see it. How can i make it ? I want to make it the same size, not smaller or anything, just the same with 1920x 1080. Here is the code: local screenSize = {guiGetScreenSize()} local screenX, screenY = screenSize[1]/2-1000/2, screenSize[2]/2-50/2 addEventHandler("onClientRender",root,function() dxDrawRectangle(screenX+400, screenY+520, 200, 30, tocolor(0, 0, 0, 135)) dxDrawText("Test",screenX+1250/2, screenY+1040/2, screenX+100/2, screenY+20/2, tocolor(255, 255, 255), 1, "pricedown", "left", "top", false, false, false, true) end ) Here is the pic 1920x1080: lower that 1920 x Thanks any help How can i make it like the hud is the same for all resolutions? I don't want to use guieditor, i want to make it the hud looks like the same all resolutions
  15. https://wiki.multitheftauto.com/wiki/OnClientClick
  16. Hi, how can i do this but hoursToMinutes ? function minutesToHours(minutes) local totalMin = tonumber(minutes) if totalMin then local hours = math.floor(totalMin/60)--math.fmod(math.floor(totalMin/60), 24) local minutes = totalMin - hours*60--math.fmod(math.floor(totalMin), 60) if hours and minutes then return hours,minutes else return 0,0 end end end
  17. Thanks. How can i make this to "hoursToMinutes? function minutesToHours(minutes) local totalMin = tonumber(minutes) if totalMin then local hours = math.floor(totalMin/60)--math.fmod(math.floor(totalMin/60), 24) local minutes = totalMin - hours*60--math.fmod(math.floor(totalMin), 60) if hours and minutes then return hours,minutes else return 0,0 end end end
  18. Hi, im stuck with this little problem. How can i get it? I'm 100% sure i'm doing something wrong addCommandHandler("info",function() local info = dxGetStatus("VideoCardName") outputChatBox(info) end)
  19. just add this after if #playercar > 0 then setElementData(client,"mycar1 - > Spawned",true) then replace this: if not (isPedInVehicle(client)) then to this: if not (isPedInVehicle(client)) and not getElementData(client,"mycar1 -> Spawned") == true then when you destroy: removeElementData(client,"mycar1 -> Spawned") or setElementData(client,"mycar1 - > Spawned",false)
  20. Not tested Try with this. local setting = {} local Peds = { {SkinID, x, y,z, Rot}, {SkinID, x, y,z, Rot}, } for k,v in ipairs(Peds) do setting.createdPeds = createPed(v[1],v[2], v[3], v[4],v[5]) end setElementDimension(setting.createdPeds,0) setElementInterior(setting.createdPeds,0)
  21. I'm not using getElementData in render, but its up to you. Im using onClientElementDataChange.
×
×
  • Create New...