Jump to content

' A F .

Members
  • Posts

    2,156
  • Joined

  • Last visited

  • Days Won

    6

' A F . last won the day on February 14 2019

' A F . had the most liked content!

Details

  • Gang
    i don't have :(

Recent Profile Visitors

3,693 profile views

' A F .'s Achievements

Jacker

Jacker (39/54)

311

Reputation

  1. سيرفر اثبت افضيلته بكل النواحي . بالتوفيق لكم
  2. Did you mean that? local sx,sy = guiGetScreenSize ( ) ; local Text = "Welcome in my server" ; addEventHandler ( "onClientRender" , root , function ( ) dxDrawText ( Text , 0 , 0 , sx , sy , tocolor(255,255,255,200),2,"default-bold","center","center") end ) addCommandHandler ( "changeText" , function ( _ , ... ) Text = table.concat ( {...} , " " ) end) if you want change text write in f8 changeText yourText
  3. local mrk = createMarker(-2518.617, -613.057, 131.700, "cylinder", 2, 255, 0, 0, 255) veh = {} function dararma ( thePlayer ) giveWeapon (thePlayer, 31, 400) giveWeapon (thePlayer, 23, 400) giveWeapon (thePlayer, 29, 400) giveWeapon (thePlayer, 3, 400) setElementModel (thePlayer, 284) veh[thePlayer] = createVehicle(523, -2510.977, -609.219, 132.563) warpPedIntoVehicle(thePlayer, veh[thePlayer]) end addEventHandler ("onMarkerHit",mrk, dararma)
  4. outputDebugString("scoreboard ligado") sX,sY = guiGetScreenSize() sor = dxCreateFont("font.ttf",14) or "arial" font = dxCreateFont("font_.ttf",17) or "arial" maxPlayer = "nil" function _dxText(text,x,y,w,h,red,green,blue,alpha,scale,font,a,b,c,d,e,f) dxDrawText(string.gsub(text,"(#%x%x%x%x%x%x)",""),x+1,y+1,w+1,h+1,tocolor(0,0,0,alpha),scale,font,a,b,c,d,e,f) dxDrawText(text,x,y,w,h,tocolor(red,green,blue,alpha),scale,font,a,b,c,d,e,f) end function dxDrawRecLine(x,y,w,h,color) dxDrawRectangle(x,y,w,1,color) -- h dxDrawRectangle(x,y+h,w,1,color) -- h dxDrawRectangle(x,y,1,h,color) -- v dxDrawRectangle(x+w-1,y,1,h,color) -- v end function dxDrawRectangleRounded(x,y,w,h,tocolor) dxDrawRectangle(x,y,w,h,tocolor) dxDrawRectangle(x+1,y-1,w-2,1,tocolor) dxDrawRectangle(x+1,y+h,w-2,1,tocolor) dxDrawRectangle(x+w,y+1,1,h-2,tocolor) dxDrawRectangle(x-1,y+1,1,h-2,tocolor) end scoreboard = {} function playersShow() scoreboard = {} for i,player in ipairs(getElementsByType("player")) do if not getPlayerTeam(player) then table.insert(scoreboard,{"player",player}) end end for i,team in ipairs(getElementsByType("team")) do if (tonumber(countPlayersInTeam(team))>=1) then table.insert(scoreboard,{"teamName",team}) for i,playerTeam in ipairs (getPlayersInTeam(team)) do table.insert(scoreboard,{"player",playerTeam}) end end end end rowNow = 0 rowsCount = math.floor(sY/22)-6 function drawScoreboard() playersShow() count = math.min(#scoreboard,rowsCount) local x = sX/2 - 320 local y = sY/2 - count*20 / 2 local cx, cy = 0,0 if isCursorShowing() then cx, cy = getCursorPosition() cx = cx * sX cy = cy * sY end showCursor(getKeyState("mouse2")) dxDrawRectangleRounded(x,y-52,640,count*22+52,tocolor(0,0,0,255)) dxDrawRectangleRounded(x,y-22,640,20,tocolor(0,0,0,200)) _dxText("uW' United Warriors",x+10,y-51,sX,sY,255,255,255,255,1,font,"left","top",true,false,false,false) _dxText(#getElementsByType("player").." / "..maxPlayer,x,y-50,x+632,y-28,255,255,255,255,1,font,"right","center",true,false,false,false) _dxText("Ping",x,y-22,x+35,y,255,255,255,255,1,"arial","center","center",true,false,false,false) _dxText("Name",x+40,y-22,sX,y,255,255,255,255,1,"arial","left","center",true,false,false,false) _dxText("Country",x+178,y-22,x+244,y,255,255,255,255,1,"arial","left","center",true,false,false,false) _dxText("Money",x+244,y-22,x+310,y,255,255,255,255,1,"arial","center","center",true,false,false,false) _dxText("Points",x+310,y-22,x+376,y,255,255,255,255,1,"arial","center","center",true,false,false,false) _dxText("Rank",x+376,y-22,x+442,y,255,255,255,255,1,"arial","center","center",true,false,false,false) _dxText("State",x+442,y-22,x+508,y,255,255,255,255,1,"arial","center","center",true,false,false,false) _dxText("FPS",x+508,y-22,x+574,y,255,255,255,255,1,"arial","center","center",true,false,false,false) _dxText("ID",x+574,y-22,x+640,y,255,255,255,255,1,"arial","center","center",true,false,false,false) for i=1,count do posY = y+(i-1)*22 if scoreboard[i+rowNow][1] == "player" then if scoreboard[i+rowNow][2] == localPlayer then dxDrawRectangleRounded(x,posY,640,22,tocolor(255,255,255,15)) end if isCursorShowing() and cx > x and cx < x + 640 and cy > posY and cy < posY + 22 then dxDrawRectangleRounded(x,posY,640,22,tocolor(255,255,255,20)) end _dxText(getElementData(scoreboard[i+rowNow][2],"id")or"?",x+574,posY,x+640,posY+22,255,255,255,255,1,"default-bold","center","center",true,false,false,false) if getElementData(scoreboard[i+rowNow][2],"AFK") then afk="#FF0000AFK " else afk="" end _dxText(afk.._getPlayerName(scoreboard[i+rowNow][2]),x+40,posY,sX,posY+22,255,255,255,255,1,"default-bold","left","center",false,false,false,true) country = getElementData(scoreboard[i+rowNow][2],"country"):lower() or "?" if country == "" then country = "?" end _dxText(string.upper(country),x+204,posY,sX,posY+22,255,255,255,255,1,"default-bold","left","center",true,false,false,false) if country == "?" then country = "World" end if country and fileExists("flags/"..country..".png") then dxDrawImage(x+184,posY+2,16,16,"flags/"..country..".png",0,0,0,tocolor(255,255,255,255)) end _dxText(getElementData(scoreboard[i+rowNow][2],"Cash")or"Guest",x+244,posY,x+310,posY+22,255,255,255,255,1,"default-bold","center","center",true,false,false,false) _dxText(getElementData(scoreboard[i+rowNow][2],"Points")or"Guest",x+310,posY,x+376,posY+22,255,255,255,255,1,"default-bold","center","center",true,false,false,false) _dxText(getElementData(scoreboard[i+rowNow][2],"Rank")or"Guest",x+376,posY,x+442,posY+22,255,255,255,255,1,"default-bold","center","center",true,false,false,false) _dxText(getElementData(scoreboard[i+rowNow][2],"state")or"?",x+442,posY,x+508,posY+22,255,255,255,255,1,"default-bold","center","center",true,false,false,false) _dxText(getElementData(scoreboard[i+rowNow][2],"FPS")or"?",x+508,posY,x+574,posY+22,255,255,255,255,1,"default-bold","center","center",true,false,false,false) _dxText(getPlayerPing(scoreboard[i+rowNow][2]),x,posY,x+35,posY+22,255,255,255,255,1,"default-bold","center","center",true,false,false,false) end if scoreboard[i+rowNow][1] == "teamName" then dxDrawRectangleRounded(x,posY,640,20,tocolor(r,g,b,50)) r,g,b = getTeamColor(scoreboard[i+rowNow][2]) _dxText(getTeamName(scoreboard[i+rowNow][2]),x+280,posY,sX,posY+22,r,g,b,255,1,"default-bold","left","center",false,false,false,true) end end if rowsCount < #scoreboard then size = rowsCount*22 _size = size/#scoreboard __size = _size*rowsCount dxDrawRectangleRounded(x+630,y,10,size,tocolor(255,255,255,20)) dxDrawRectangleRounded(x+630,y+rowNow*_size,10,__size,tocolor(0,0,0,180)) end end bindKey("tab","down", function() addEventHandler("onClientRender",root,drawScoreboard) end ) bindKey("tab","up", function() removeEventHandler("onClientRender",root,drawScoreboard) if isCursorShowing() then showCursor(false) end end ) addEventHandler("onClientMinimize",root, function() setElementData(localPlayer,"AFK",true) end ) addEventHandler("onClientRestore",root, function() setElementData(localPlayer,"AFK",false) end ) bindKey("mouse_wheel_down","down", function() if rowNow == 0 then return end rowNow = rowNow - 1 end ) bindKey("mouse_wheel_up","down", function() maxIndex = #scoreboard - rowsCount if #scoreboard < rowsCount then return end if rowNow == maxIndex then return end rowNow = rowNow + 1 end ) addEventHandler("onClientRender",root, function() if not fps then fps = 0 end fps = fps + 1 if not fpstick then fpstick = getTickCount() end fpscountertick = getTickCount() if fpscountertick - fpstick >= 1000 then setElementData(localPlayer,"FPS",fps) fps = 0 fpstick = false end end ) addEvent("getMaxPlayers",true) addEventHandler("getMaxPlayers",root, function (info) maxPlayer = info end ) function _getPlayerName(player) local playerTeam = getPlayerTeam(player) if (playerTeam) then local r,g,b = getTeamColor(playerTeam) local n1 = toHex(r) local n2 = toHex(g) local n3 = toHex(b) if r <= 16 then n1 = "0"..n1 end if g <= 16 then n2 = "0"..n2 end if b <= 16 then n3 = "0"..n3 end playerName = "#"..n1..n2..n3..getPlayerName(player) else playerName = "#FFFFFF"..getPlayerName(player) end return playerName end function toHex ( n ) local hexnums = {"0","1","2","3","4","5","6","7", "8","9","A","B","C","D","E","F"} local str,r = "",n%16 if n-r == 0 then str = hexnums[r+1] else str = toHex((n-r)/16)..hexnums[r+1] end return str end triggerServerEvent("getMaxPlayer",localPlayer,localPlayer) fileDelete("scoreboard_client.Lua") try this
  5. put your scoreboard client code
  6. local plrV = { } addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for k,v in ipairs ( getElementsByType ( "player" ) ) do if ( getPedOccupiedVehicle ( v ) and getVehicleController ( getPedOccupiedVehicle ( v ) ) == v ) then plrV[v] = getPedOccupiedVehicle(v) end end end ) ; addEventHandler ( "onVehicleStartEnter",root,function(player,seat) if ( seat == 0 ) then plrV[player] = source end end) addEventHandler("onPlayerVehicleExit",root,function(player,seat) if ( seat == 0 ) then plrV[player] = nil end end ) addEventHandler ( "onPlayerWasted" , root , function ( ) if ( plrV[source] and isElement(plrV[source]) ) then destroyElement ( plrV[source] ) ; plrV[source] = nil end end ) ;
  7. عندك مشكلة بـ القياسات سويها زي كذا local rx,ry = guiGetScreenSize ( ) ; tick = getTickCount ( ) addEventHandler ( "onClientRender" , root , function ( ) local x = interpolateBetween ( 0, 0, 0, rx*457/800, 0, 0, ( getTickCount() - ( tick or 0 ) ) / 5000, "Linear" ) dxDrawImage(rx*241/800, ry*156/600, x, x, "bg.jpg", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- مع حركه end ) انا حطيت مقاسات شاشتي انت سويها ع مقاس شاشتك مثلا rx*241/800,ry*156/600
  8. شوك قوزال كارديش , ماهو غريب عليك هالابداع , أبدعت
  9. ماعليش انا م اجامل بس وش المودات الحصرية الي عندكم ذي خابرها عام 2015 مافيه سيرفر هجولة ممتاز بالافكار غير طارة ووناسة والوزارة نوعاً ما . الباقين كل واحد يقلد الثاني
  10. اخوياي ماقدر اوصفهم بكلمة لانها قليلة بحقهم وهم يعرفون انفسهم
  11. نتعلم الابداع منك يأقلبي , مشكور على المرور
×
×
  • Create New...