Tokio

Members
  • Content Count

    302
  • Joined

  • Last visited

Community Reputation

5 Neutral

About Tokio

  • Rank
    Prankster

Recent Profile Visitors

7,192 profile views
  1. 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?
  2. 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?
  3. 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..
  4. 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?
  5. 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))
  6. Now i see the blips with render target, but outside the radar.. how to fix this?
  7. 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
  8. 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?
  9. I want draw a dxdrawtext to a object, but how can i do it this?
  10. 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...
  11. I tried outputDebugString, but does not show. I tried pairs too, but does not working too.. :s