ммм какой вкусный фпс

Lance_Sterling

Известный
Автор темы
803
284
Версия MoonLoader
.026-beta
кароче спиздил чекер с другого скрипта, в итоге он жрет фпс с 90 до 50-60, че делать? там уже фризы жоские
как он выключен, с фпсом все ок, хелпуйте
я уверен это проблема в рендере поэтому вот
Lua:
function renderfriends()
    while true do
      wait(0)
      if friendSet['state'].v then
        x = friendSet['posX'].v
        mainY = friendSet['posY'].v 
        y = mainY
        colorheader = '0x'..bit.tohex(join_argb(255,inicolors.friendheader[1],inicolors.friendheader[2],inicolors.friendheader[3]))
        countfriends = 0
        instreamfriends = 0
        if #mainIni.friendslist > 0 then 
        for k,v in pairs(mainIni.friendslist) do
          if sampGetPlayerIdByNickname(v) ~= -1 then
            countfriends = countfriends + 1
             resultf, pedf = sampGetCharHandleBySampPlayerId(sampGetPlayerIdByNickname(v))
             mX, mY, mZ = getCharCoordinates(playerPed)
             if resultf then
              instreamfriends = instreamfriends + 1
             end
          end
        end
        if friendSet['instreamstate'].v then
          friendtext = ' |{19ff19} '.. instreamfriends
        else
          friendtext = ''
        end
        if not isPauseMenuActive() then renderFontDrawTextAlign(fontfriendchecker,'Игроков онлайн{FFFFFF}[{19ff19}'..countfriends .. '{FFFFFF}'.. friendtext..'{FFFFFF}]',x,mainY,colorheader) end
        for k,v in pairs(mainIni.friendslist) do
          
            if sampGetPlayerIdByNickname(v) ~= -1 then
                sresultf, pedf = sampGetCharHandleBySampPlayerId(sampGetPlayerIdByNickname(v))
                if sresultf then 
                local mX, mY, mZ = getCharCoordinates(playerPed)
                local X, Y, Z = getCharCoordinates(pedf)
                fuckingcoords = math.floor(getDistanceBetweenCoords3d(mX, mY, mZ, X, Y, Z))
      
                if friendSet['instreamstate'].v then
                textforrender = v .. '['..sampGetPlayerIdByNickname(v)..']{FFFFFF} - Расстояние: {'..bit.tohex(join_argb(255,inicolors.friendstream[1],inicolors.friendstream[2],inicolors.friendstream[3])) .. '}'.. fuckingcoords
                else
                  textforrender = v .. '['..sampGetPlayerIdByNickname(v)..']'
              end
              else
                  if sampIsPlayerConnected(v) then textforrender = v .. '['..sampGetPlayerIdByNickname(v)..']' else textforrender = '' end
                end
                colorfriend = '0x'..bit.tohex(join_argb(255,inicolors.friendcolor[1],inicolors.friendcolor[2],inicolors.friendcolor[3]))
                y = y + friendSet['fOffs'].v
                if not isPauseMenuActive() then renderFontDrawTextAlign(fontfriendchecker,textforrender,x,y,colorfriend) end
      
              end
            end
          end
          
          end
        end
      
      end
 
  • Эм
Реакции: sdfy

sdfy

Известный
349
230
с моим говнокодом выйдет еще хуже, так что помоги пж
Мне кажется тебе с таким в раздел заказов, если ты ни строчки сам писать не хочешь. Если ты напишешь СВОЙ код и он не будет работать, мы с радостью поможем тебе