-
Posts
34 -
Joined
-
Last visited
Everything posted by ParadoxTR
-
My server is constantly lagging. when I communicate with my host provider, it says that there are no attacks and that the problem originated from you. This may be the cause of the problem?
-
Try it. if tonumber(para) < 10001 and tonumber(para) > 99 then
-
I want this to be right in the middle of all screen sizes. local x, y = guiGetScreenSize(); local h = 32; local rot = 0; local exists = {}; function drawLoader () if not mods then return; end if next (mods) then rot = rot + 1; local count = 0; for _ in pairs (exists) do count = count + 1; end local progress = count.."/"..#mods.." (%"..math.ceil((count/#mods)*100)..")"; if count == #mods then if getTickCount() > tick then removeEventHandler ("onClientRender", root, drawLoader); return; end end local rx, ry, rw, rh = 0, y-h, x/10, h; dxDrawImage (rx + 3, ry-4, 42, 42, "icon.png", rot, 0, 0); addOutlines (rx, ry, rw, rh, tocolor (150, 150, 150, 75), 2); dxDrawRectangle(rx, ry, rw, rh, tocolor(0, 0, 0, 125), false); dxDrawText (progress, rx + 42, ry, rw, (y-h) + h, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center"); end end function addOutlines(x, y, width, height, lineColor, lineSize, postGUI) dxDrawLine(x - 1, (y - lineSize), x - 1, y + height + (lineSize - 1), lineColor, lineSize, postGUI); --left dxDrawLine(x + width, (y) - 1, (x) - 1, (y) - 1, lineColor, lineSize, postGUI); -- top dxDrawLine((x) - 1, y + height, x + width, y + height, lineColor, lineSize, postGUI); -- bottom dxDrawLine(x + width, y - lineSize, x + width, y + height + (lineSize - 1), lineColor, lineSize, postGUI); -- right end
-
I make top level system, but server lagging. How can ı do? help me. sry my bad english Server function getPlayersSortByaData() local TopData = { } for i, v in ipairs( getAccounts() ) do if getAccountData ( v, 'level' ) then table.insert (TopData, { Name = i , Account = getAccountData ( v, 'nickname' ) or getAccountName(v) , aScore = getAccountData ( v, 'level' ) or 0 , aTecrube = tonumber(getAccountData ( v, 'level' ))+(tonumber(getAccountData ( v, 'experience' ))/100000) , } ) end end table.sort( TopData, function( a, b ) return( tonumber( a.aTecrube ) or 0 ) > ( tonumber( b.aTecrube ) or 0 ) end ) return TopData end addEvent("getTop2", true) addEventHandler("getTop2", root,function() triggerClientEvent(source, "SetData", source, getPlayersSortByaData()) end) addEvent("getTop3", true) addEventHandler("getTop3", root,function() createMoneySystem( source ) end) function createMoneySystem( player ) if not isElement( player ) then return end local Top = {} local CreatTop = executeSQLQuery( "SELECT * FROM FurkanBank" ) for i = 1, #CreatTop do table.insert(Top,{name = getAccountData(getAccount(CreatTop[i].hesap_adi),"nickname") or CreatTop[i].hesap_adi,score = CreatTop[i].para+getAccountData(getAccount(CreatTop[i].hesap_adi),"funmodev2-money")}) end if #CreatTop >0 then table.sort(Top, function(a,b) return (tonumber(a.score)or 0) > (tonumber(b.score)or 0) end) for k, data in ipairs(Top) do if k == 1 then triggerClientEvent (player,"deltTop2",player) end triggerClientEvent (player,"updateTopMoney",player,tostring(data.name),tostring(data.score),tonumber(k)) if k == 200 then table.remove(Top) break end end end end Client addEvent("SetData",true) addEventHandler("SetData",root,function ( Table ) guiGridListClear( WindowSiralamaList2 ) for i = 1,200 do local row = guiGridListAddRow ( WindowSiralamaList2 ) guiGridListSetColumnTitle(WindowSiralamaList2 ,column2, "Level") if ( Table [ i ].aScore ) then guiGridListSetItemText( WindowSiralamaList2, row, column, i , false, false ) guiGridListSetItemText( WindowSiralamaList2, row, column1, Table [i ].Account , false, false ) guiGridListSetItemText( WindowSiralamaList2, row, column2, Table [ i ].aScore , false, false ) guiGridListSetItemColor(WindowSiralamaList2, row, column1, 255, 255, 0) guiGridListSetItemColor(WindowSiralamaList2, row, column2, 0, 180, 255) guiGridListSetItemColor(WindowSiralamaList2, row, column, 255, 0, 0) end end end) addEvent("updateTopMoney",true) addEventHandler("updateTopMoney",root,function ( a,b,c ) local row = guiGridListAddRow ( WindowSiralamaList2 ) guiGridListSetItemText( WindowSiralamaList2, row, column, c , false, false ) guiGridListSetItemText( WindowSiralamaList2, row, column1, tostring(a) , false, false ) guiGridListSetItemText( WindowSiralamaList2, row, column2, "$"..formatNumber(tostring(b)).."" , false, false ) guiGridListSetItemColor(WindowSiralamaList2, row, column1, 255, 255, 0) guiGridListSetItemColor(WindowSiralamaList2, row, column2, 0, 180, 255) guiGridListSetItemColor(WindowSiralamaList2, row, column, 255, 0, 0) end) function deltTop2() guiGridListClear(WindowSiralamaList2) end addEvent("deltTop2", true) addEventHandler("deltTop2", root, deltTop2)
-
Hello guys, ı have a questions. exampleTable[player].kill How get a max value in this table? Could you show me an example.
-
Please help me.
-
local downloadFiles = { {"dosyalar/400.dff"}, {"dosyalar/400.txd"}, {"dosyalar/401.dff"}, {"dosyalar/401.txd"}, ...(so much) addEventHandler("onClientResourceStart", resourceRoot,function() Arkaplan = guiCreateStaticImage((0/1600)*w, (846/900)*h, (357/1600)*w, (54/900)*h, "resim.png", false) guiSetVisible(Arkaplan,true) Label1 = guiCreateLabel((1/1600)*w, (1/900)*h, (356/1600)*w, (27/900)*h, "Araçlar İndiriliyor (499.1 MB)", false, Arkaplan) guiSetFont(Label1, "default-bold-small") guiLabelSetColor(Label1, 254, 113, 0) guiLabelSetHorizontalAlign(Label1, "center", false) guiLabelSetVerticalAlign(Label1, "center") Label2 = guiCreateLabel((1/1600)*w, (27/900)*h, (356/1600)*w, (27/900)*h, "%0", false, Arkaplan) guiSetFont(Label2, "default-bold-small") guiLabelSetColor(Label2, 254, 113, 0) guiLabelSetHorizontalAlign(Label2, "center", false) guiLabelSetVerticalAlign(Label2, "center") for _, downFile in pairs(downloadFiles) do downloadFile(downFile[1]) end end) addEventHandler ( "onClientFileDownloadComplete", resourceRoot, function ( file, success) if ( success) then -----------------------------ARAÇLAR------------------------------ if ( file == "dosyalar/400.dff") then guiSetText(Label2,"%0") guiSetText(Label1,"Araçlar İndiriliyor (512 MB)") end if ( file == "dosyalar/400.txd") then guiSetText(Label2,"%1") txd = engineLoadTXD("dosyalar/400.txd",400) engineImportTXD(txd,400) dff = engineLoadDFF("dosyalar/400.dff",400) engineReplaceModel(dff,400) setElementData(localPlayer,"MB1",true) end ------------------------------------------------------------- if ( file == "dosyalar/401.dff") then guiSetText(Label2,"%2") end if ( file == "dosyalar/401.txd") then guiSetText(Label2,"%3") txd = engineLoadTXD("dosyalar/401.txd",401) engineImportTXD(txd,401) dff = engineLoadDFF("dosyalar/401.dff",401) engineReplaceModel(dff,401) setElementData(localPlayer,"MB2",true) end ...(so much) It's affecting performance. What is the problem?
-
I dont using httpdownloadurl.
-
for fast download.
-
I useing downloadfile because total 620mb.(cars,obje etc.)
-
Yes I using downloadFile. I make httpdownloadurl how can I do?
-
All players are having this problem. Host nitrado 22slot 2gb ram. Where can I learn my server bandwidth?
-
Why is my server loading too slow and sometimes not filling up?
-
My server name: SH Gaming Freeroam My server IP: 5.62.126.246:11400 Fake server IP: -149.202.55.95:21995 -5.196.126.37:22004 Screenshot: Other screenshot:
-
I made it but same warning.
-
I make turf system. I need help. Warning;(line 17) function TurfAktif(player) local PlayerClan = getElementData(player,"Clan") if not getElementData(resourceRoot,"ClanTurf1") then setElementData(resourceRoot,"ClanKisi",getElementData(resourceRoot,"ClanKisi")+1) setElementData(resourceRoot,"ClanTurf1",tostring(PlayerClan)) setRadarAreaFlashing ( Turf1Rectangle, true ) local t1 = setTimer(function() if getElementData(player,"Turf1")==true then TurfPercent = TurfPercent+10 _outputChatBox("Turf Yüzdesi: %"..TurfPercent.."", player, 0, 255, 0, true ) if TurfPercent >= 100 then _outputChatBox("Turf Yüzdesi: %100 | Turfu Kazandınız", player, 0, 255, 0, true ) setRadarAreaFlashing ( Turf1Rectangle, false ) setElementData(resourceRoot,"ClanTurf1",tostring(PlayerClan)) setElementData(resourceRoot,"Clan2Turf1","Bos") setElementData(resourceRoot,"WinnerClan",tostring(PlayerClan)) killTimer(t1) return end end end,5000,0) elseif getElementData(resourceRoot,"Clan2Turf1")=="Bos" then setElementData(resourceRoot,"Clan2Kisi",getElementData(resourceRoot,"Clan2Kisi")+1) setElementData(resourceRoot,"Clan2Turf1",tostring(PlayerClan)) setRadarAreaFlashing ( Turf1Rectangle, true ) local t2 = setTimer(function() if getElementData(player,"Turf1")==true then TurfPercent = TurfPercent+10 _outputChatBox("Turf Yüzdesi: %"..TurfPercent.."", player, 0, 255, 0, true ) if TurfPercent >= 100 then _outputChatBox("Turf Yüzdesi: %100 | Turfu Kazandınız", player, 0, 255, 0, true ) setRadarAreaFlashing ( Turf1Rectangle, false ) setElementData(resourceRoot,"ClanTurf1",tostring(PlayerClan)) setElementData(resourceRoot,"Clan2Turf1","Bos") setElementData(resourceRoot,"WinnerClan",tostring(PlayerClan)) killTimer(t2) return end end end,5000,0) elseif getElementData(resourceRoot,"ClanTurf1")==tostring(PlayerClan) then setElementData(resourceRoot,"ClanKisi",getElementData(resourceRoot,"ClanKisi")+1) elseif getElementData(resourceRoot,"Clan2Turf1")==tostring(PlayerClan) then setElementData(resourceRoot,"Clan2Kisi",getElementData(resourceRoot,"Clan2Kisi")+1) end end Please Help!
-
I solved the problem.
-
Marker has been is dimension 0. I'm going dimension 1 and go to marker place(I don't see) but the event was. I want different dimenion not working event. Help me. Sry my english is bad. function onBusinessMarkerHit(hElement, mDim) if getElementType(hElement) ~= "player" then return end if isPedInVehicle(hElement) then return end if not mDim then return end triggerClientEvent(hElement, "client:showInstructions", hElement) end function onBusinessMarkerLeave(hElement, mDim) if getElementType(hElement) ~= "player" then return end if isPedInVehicle(hElement) then return end if not mDim then return end triggerClientEvent(hElement, "client:hideInstructions", hElement) end
-
I create a ped. example; Ped = createPed ( 120, 5540.6654, 1020.55122, 1240.545 ) I want to this "Ped" is opened the car door.
-
I do it. Ped is not opened the car door. Please example.
-
How can I do? Can you explain a little.
-
I want you to get a ped opened the car door. How I do?
-
I want to run just with the m4 for 1 person. Please help.
-
How do I run with weapons, including sniper,m4,combat shoutgun ? I need help.