Jump to content

Tokio

Members
  • Posts

    309
  • Joined

  • Last visited

Recent Profile Visitors

8,762 profile views

Tokio's Achievements

Prankster

Prankster (22/54)

6

Reputation

  1. The script a few days ago worked fine, but today when i start the server, the HTML video does not start... I didn't change it anything in the script... How to fix this problem? HTML code: <!DOCTYPE html> <html > <head> <meta charset="UTF-8"> <title>Random Login Form</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ @import url(http://fonts.googleapis.com/css?family=Exo:100,200,400); @import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:700,400,300); body{ margin: 0; padding: 0; background: #fff; color: #fff; font-family: Arial; font-size: 12px; position:fixed; top:0; bottom:0; left:0; right:0; } .body{ position: absolute; top: -20px; left: -20px; right: -40px; bottom: -40px; width: auto; height: auto; <!-- background-image: url(http://ginva.com/wp-content/uploads/2012/07/city-skyline-wallpapers-008.jpg); --> background-size: cover; -webkit-filter: blur(5px); z-index: 0; } video { position: fixed; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: -100; transform: translateX(-50%) translateY(-50%); -webkit-filter: blur(5px); background-size: cover; transition: 1s opacity; filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=5); } .grad{ position: absolute; top: -20px; left: -20px; right: -40px; bottom: -40px; width: auto; height: auto; background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.65))); /* Chrome,Safari4+ */ z-index: 1; opacity: 0.7; } .header{ position: absolute; top: calc(40% - 35px); left: calc(57.5% - 255px); z-index: 2; } .header div{ float: left; color: #fff; font-family: 'Exo', sans-serif; font-size: 35px; font-weight: 200; } .header div span{ color: #5379fa !important; } ::-webkit-input-placeholder{ color: rgba(255,255,255,0.6); } ::-moz-input-placeholder{ color: rgba(255,255,255,0.6); } #colorstrip{ width: 100%; height: 260px; border-style: solid; border-color: black; background-color: black; opacity: 0.35; position: fixed; top: calc(50% - 110px); } </style> </head> <body> <div class="body"></div> <!-- MUSIC --> <div class="grad"></div> <video id="bg" src="media.webm" autoplay="true" loop="true" ></video> <!-- <div class="header"> <div>Welcome to <span>БПАН</span></div> </div> --> <!-- <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> --> </body> </html> Lua code: local screenWidth, screenHeight = guiGetScreenSize() local webBrowser = createBrowser(screenWidth, screenHeight, true, false) addEventHandler("onClientBrowserCreated", webBrowser, function() loadBrowserURL(webBrowser, "http://mta/local/index.html") end ) And when i start the script: What wrong??
  2. The dxdrawtext why move in 1920x1080? dxDrawText("SuperFun - Szórakozó szerver",(sx_-1910) * xm, (sy_/2+20) * ym, 1130 * xm, 75 * ym, tocolor(255,255,255,255),1.00,font2,"center","center")
  3. This is in 1440x900 (in my resolution): This is in 1920x1080: I calculate the dx elements position with this: local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/1440, sy_/900 And i draw dx elements like this: dxDrawRectangle(sx / 2 + 290, sy / 2 +240,850,65,tocolor(0,0,0,200)) What wrong??? How can i fix this problem??
  4. 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?
  5. i added the font to meta, and correct the file name..
  6. 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?
  7. 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!
  8. 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?
  9. 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?
  10. 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..
  11. 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?
  12. 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))
×
×
  • Create New...