Tokio

Members
  • Content Count

    298
  • Joined

  • Last visited

Everything posted by Tokio

  1. I created a new render target for blips, and now show the blips just inside the radar, but not in the right positions.. why? I just added the render target, i didn't changed anything.. local screenWidth, screenHeight = guiGetScreenSize() local worldWidth, worldHeight = 3000, 3000 MiniMap["width"] = math.floor(screenWidth/1920 * 450) MiniMap["height"] = math.floor(screenHeight/1080 * 250) local blipSize = 21 local PlayerBlipSize = 17 local MiniMap_x, MiniMap_y = 7, screenHeight - MiniMap["height"] - 10 local worldMaxSize = 6000 rt = dxCreateRenderTarget(MiniMap["width"], MiniMap["height"], true) dxSetRenderTarget(rt,true) for index, info in pairs(blips) do local bx = info.x local by = info.y local actualDist = getDistanceBetweenPoints2D(playerX, playerY, bx, by) local dist = actualDist/(worldMaxSize/((worldWidth+worldHeight)/2)) local rot = findRotation(bx, by, playerX, playerY)-camZ local blipX, blipY = getPointFromDistanceRotation( (MiniMap_x+MiniMap["width"]+MiniMap_x)/2, (MiniMap_y+MiniMap_y+MiniMap["height"])/2, math.min(dist, math.sqrt((MiniMap_y+MiniMap_y+MiniMap["height"])/2-MiniMap_y^2 + MiniMap_x+MiniMap["width"]-(MiniMap_x+MiniMap["width"]+MiniMap_x)/2^2)), rot ) local color = 255 dxDrawImage(blipX - blipSize/2, blipY - blipSize/2, blipSize, blipSize, "blips/".. info.blipID ..".png",0,0,0,tocolor(255,255,255,255)) if info.blipID == 1 then dxDrawImage(blipX - blipSize/2, blipY - blipSize/2, blipSize, blipSize, "blips/1.png",0,0,0,tocolor(255,255,255,255)) end end dxSetRenderTarget() dxDrawImage(MiniMap_x, MiniMap_y, MiniMap["width"], MiniMap["height"], rt, 0, 0, 0, tocolor(255,255,255,255))
  2. Now i see the blips with render target, but outside the radar.. how to fix this?
  3. Blips: function addBlip(blipID, x, y, text, color) data = { blipID = blipID, x = x, y = y, text = text, color = color } table.insert(blips, data) end addBlip(52, -1940.97986, 568.07715, "Bank", tocolor(255,255,255,255)) addBlip(1, 256.24149, 2961.22998, "North", tocolor(255,255,255,255)) addBlip(18 ,1368.36072 ,-1279.73596, "Üzletek", tocolor(255,255,255,255)) addBlip(999999 ,1553.59485, -1675.84521, "Rendorseg", tocolor(255,255,255,255)) addBlip(10001,1850.17493, -1856.35034, "Rendorseg", tocolor(255,255,255,255)) addBlip(3223,-2053.66650, -49.28458, "Templom", tocolor(255,255,255,255)) addBlip(4324,268.89667 ,-1873.54370, "versenypálya", tocolor(255,255,255,255)) addBlip(969696,703.92871, -2829.69507, "bringarace", tocolor(255,255,255,255)) addBlip(543210 ,1932.81152, -1773.87366, "deli", tocolor(255,255,255,255)) addBlip(543210 ,1045.06812, -901.50098, "északi", tocolor(255,255,255,255)) addBlip(51 ,2779.62866, -2417.62134, "depo", tocolor(255,255,255,255)) addBlip(69 ,-1958.69971, 296.35953, "aszallito", tocolor(255,255,255,255)) addBlip(696 ,1769.72644, -1944.25537, "buszizej", tocolor(255,255,255,255)) addBlip(66999 ,830.25916 ,858.30060, "banyasz", tocolor(255,255,255,255)) addBlip(29 ,2104.32251 ,-1809.31726, "pizzafutarka", tocolor(255,255,255,255)) addBlip(65 ,-2126.23120, -200.79074, "vasasmelo", tocolor(255,255,255,255)) addBlip(123450 ,2192.60425,1990.83911, "bolti elado", tocolor(255,255,255,255)) addBlip(32321 ,2806.90942, 911.94543, "kukasssmelo", tocolor(255,255,255,255)) Rendertarget: function MiniMap.start() MiniMap["RenderTarget"] = dxCreateRenderTarget(MiniMap["width"], MiniMap["height"], true) end
  4. I enabled in config file the voice chat, and started the script, but some players does not hear the voice chat. How to fix this?
  5. I want draw a dxdrawtext to a object, but how can i do it this?
  6. dxSetRenderTarget(MiniMap["RenderTarget"], true) for index, info in pairs(blips) do local bx = info.x local by = info.y local actualDist = getDistanceBetweenPoints2D(playerX, playerY, bx, by) local dist = actualDist/(worldMaxSize/((worldWidth+worldHeight)/2)) local rot = findRotation(bx, by, playerX, playerY)-camZ local blipX, blipY = getPointFromDistanceRotation( (MiniMap_x+MiniMap["width"]+MiniMap_x)/2, (MiniMap_y+MiniMap_y+MiniMap["height"])/2, math.min(dist, math.sqrt((MiniMap_y+MiniMap_y+MiniMap["height"])/2-MiniMap_y^2 + MiniMap_x+MiniMap["width"]-(MiniMap_x+MiniMap["width"]+MiniMap_x)/2^2)), rot ) local blipX = math.max(MiniMap_x, math.min(MiniMap_x+MiniMap["width"], blipX)) local blipY = math.max(MiniMap_y, math.min(MiniMap_y+MiniMap["height"], blipY)) local color = 255 dxDrawImage(blipX - blipSize/2, blipY - blipSize/2, blipSize, blipSize, "blips/".. info.blipID ..".png",0,0,0,tocolor(255,255,255,255)) end dxSetRenderTarget() dxDrawImage(MiniMap_x, MiniMap_y, MiniMap["width"], MiniMap["height"], MiniMap["RenderTarget"], 0, 0, 0, tocolor(255,255,255,255)) This is the code...
  7. I tried outputDebugString, but does not show. I tried pairs too, but does not working too.. :s
  8. for index, info in ipairs(blips) do dxSetRenderTarget(MiniMap["RenderTarget"], true) local bx = info.x local by = info.y local actualDist = getDistanceBetweenPoints2D(playerX, playerY, bx, by) local dist = actualDist/(worldMaxSize/((worldWidth+worldHeight)/2)) local rot = findRotation(bx, by, playerX, playerY)-camZ local blipX, blipY = getPointFromDistanceRotation( (MiniMap_x+MiniMap["width"]+MiniMap_x)/2, (MiniMap_y+MiniMap_y+MiniMap["height"])/2, math.min(dist, math.sqrt((MiniMap_y+MiniMap_y+MiniMap["height"])/2-MiniMap_y^2 + MiniMap_x+MiniMap["width"]-(MiniMap_x+MiniMap["width"]+MiniMap_x)/2^2)), rot ) local blipX = math.max(MiniMap_x, math.min(MiniMap_x+MiniMap["width"], blipX)) local blipY = math.max(MiniMap_y, math.min(MiniMap_y+MiniMap["height"], blipY)) local color = 255 dxDrawImage(blipX - blipSize/2, blipY - blipSize/2, blipSize, blipSize, "blips/".. info.blipID ..".png",0,0,0,tocolor(255,2555,255,255)) dxSetRenderTarget() end Why not working? No errors/warnings..
  9. i want to output all team's teamchat to admins but does not working.. anyone can help? if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "LathatatlanAdmin" ) ) then local plrTeam = getPlayerTeam ( source ) local teamName = getTeamName(plrTeam) outputChatBox("#00FF01[Csoport chat - "..teamName.."] ".. string.format("#%02X%02X%02X", getPlayerNametagColor(source)) ..""..getPlayerName(source).."#73FF73: "..Upper(message), source, r, g, b, true ) end
  10. Tokio

    Server list spam

    I would like to report about a Fake Server that using My server name! Real Server: mtasa://91.83.93.42:22007 Fake Server: mtasa://37.221.209.216:22100
  11. I tried, but same problem
  12. Anyone can help in this?
  13. But why not remove the music, when player quit? Client: addEvent( 'Stop' , true ) addEventHandler( 'Stop' , root , function() local vehicle = getPedOccupiedVehicle ( source ) destroyElement(currentSound[source]) detachElements ( currentSound[source], vehicle ) end ) Server: function quitPlayer () triggerClientEvent( root , 'Stop' , client ) end addEventHandler ( "onPlayerQuit", root, quitPlayer )
  14. Client side: requestBrowserDomains({"www.convertmp3.io"}) local browser = createBrowser( 0, 0, false ) local currentSound = {} function start (_ , link ) triggerServerEvent( 'play' , localPlayer , link ) end addCommandHandler("p",start) addEvent( 'Play' , true ) addEventHandler( 'Play' , root , function( link ) fetch( link ) end ) function fetch(url) if (url) then fetchRemote("http://www.convertmp3.io/fetch/?format=JSON&video="..url, callback) end end function callback(data, error) if (error ~= 0) then return outputChatBox(error) end if (data == "ERROR") then return outputChatBox("data error") end local data = fromJSON("["..data.."]") if (data) then outputChatBox("Title: "..data.title) outputChatBox("Length: "..data.length) outputChatBox("Link: "..data.link) loadBrowserURL( browser, data.link ) end end addEventHandler( "onClientBrowserNavigate", browser, function( link ) if not link:find("www.convertmp3.io") then local vehicle = getPedOccupiedVehicle ( localPlayer ) local x, y, z = getElementPosition(vehicle) currentSound[localPlayer] = playSound3D( link, x, y, z ) attachElements(currentSound[localPlayer],vehicle) setSoundMaxDistance(currentSound[localPlayer],30) setSoundVolume(currentSound[localPlayer],50) end end ) Server side: addEvent( 'play' , true ) addEventHandler( 'play' , root , function( link ) triggerClientEvent( root , 'Play' , client , link ) end )
  15. When i play the music, the song start in every players vehicle too.. :s And when i play music in my car, then it is not heard by others
  16. I tried with server trigger, but then play the sound for every players vehicle..
  17. This is the code: requestBrowserDomains({"www.convertmp3.io"}) local browser = createBrowser( 0, 0, false ) local currentSound = {} function start(_,link) fetch(link) end addCommandHandler("play",start) function fetch(url) if (url) then fetchRemote("http://www.convertmp3.io/fetch/?format=JSON&video="..url, callback) end end function callback(data, error) if (error ~= 0) then return outputChatBox(error) end if (data == "ERROR") then return outputChatBox("data error") end local data = fromJSON("["..data.."]") if (data) then outputChatBox("Title: "..data.title) outputChatBox("Length: "..data.length) outputChatBox("Link: "..data.link) loadBrowserURL( browser, data.link ) end end addEventHandler( "onClientBrowserNavigate", browser, function( link ) if not link:find("www.convertmp3.io") then local vehicle = getPedOccupiedVehicle ( localPlayer ) local x, y, z = getElementPosition(vehicle) currentSound[localPlayer] = playSound3D( link, x, y, z ) attachElements(currentSound[localPlayer],vehicle) setSoundMaxDistance(currentSound[localPlayer],30) setSoundVolume(currentSound[localPlayer],50) end end ) How to synchronise to all players?