Tokio

Members
  • Content Count

    306
  • Joined

  • Last visited

Everything posted by Tokio

  1. I created a scoreboard system, but when i make a team, the team does not show in scoreboard.. how can i add this after playerlist?
  2. i added the font to meta, and correct the file name..
  3. On my client the dx-font working fine, but with another client the dx-font does not working.. Got this warning: WARNING: customchat\sourceC.Lua:164: Bad argument @ 'dxDrawText' [Expected dx-font at argument 8, got boolean] the code: local TwCen14s = dxCreateFont('TwCen.ttf', 10) dxDrawText("Chat: #ffFFff"..chat.input, sx / 2 - 450 - 255, sy / 2 - 356 - 60 + 25 * chat.maxShowedMessage, 450, 300, tocolor(255, 181, 64, 255), 1, TwCen14s,_,_,_,_,_,true) what wrong?... how can i fix this problem?
  4. Why not see another players my messages? And how to add built-in, and addCommandHandler commands to this chat system? Client: Server: Thanks the help!
  5. I created some handling with handling editor script, and i want set some cars default handling to these handlings with a script, when a player spawn this car, the handling in the car automatic set to the edited hand.. But how can i do this?
  6. client: local Admins = {} addEvent("updateAdmins",true) addEventHandler("updateAdmins",root, function(t) Admins = t end) function isPlayerAdmin(player) if(Admins[player]) then return true end return false end function asdi() for k,v in ipairs(Admins) do outputChatBox(k) end end addCommandHandler("asd",asdi) server: local Admins = {} function isPlayerAdmin(player) if(Admins[player]) then return true end return false end addEventHandler("onPlayerLogin",root, function() if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" ))then if not(Admins[source])then Admins[source]= source triggerClientEvent("updateAdmins",source,Admins) end end end) addEventHandler("onPlayerQuit",root, function() if(Admins[source])then Admins[source]= nil triggerClientEvent("updateAdmins",source,Admins) end end) No errors, no warnings... What wrong?
  7. I added nitro to my car, then i press the left alt button, and the nitro not activated.. How can i fix this with a script, or anything? Another server still working the nitro with left alt button..
  8. This is my code: local sp2 = getVehicleNitroLevel(car)*180 if sp2 ~= false and sp2 ~= nil and sp2 > 1 then dxDrawImage(x-w/1+36, y-h/1+260, 256, 256, "images/fuelindicator.png", sp2,0,0, 0xFFFFFFFF,true) dxDrawBorderedImage(x-180, y+45,245, 245, "images/fuelnum.png", 0,0,0, tocolor(colorR2, colorG2, colorB2,255)) dxDrawImage(x-105, y+110, 95, 95, "images/line.png", 0,0,0, tocolor(0,0,0,255)) dxDrawImage(x-105, y+110, 95, 95, "images/shadow.png", 0,0,0, tocolor(0,0,0,255)) end Working fine, but in debugscript flooding this error: the line 108 is the local sp2 = getVehicleNitroLevel(car)*180 how to fix this error?
  9. 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))
  10. Now i see the blips with render target, but outside the radar.. how to fix this?
  11. 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
  12. 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?
  13. I want draw a dxdrawtext to a object, but how can i do it this?
  14. 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...
  15. I tried outputDebugString, but does not show. I tried pairs too, but does not working too.. :s
  16. 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..
  17. 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
  18. 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
  19. I tried, but same problem
  20. Anyone can help in this?