Jump to content

x[ تصحيح كود ]x


Recommended Posts

Posted

السلام عليكم

عندي كود فيه مشكلة

addEventHandler( "onClientResourceStart",root,
function ()
triggerServerEvent("ReSend",localPlayer)
end
)

-- GUI Elements

addEvent("Add", true)
addEventHandler("Add", root,
function(one,Hours)
guiSetVisible(GUIEditor.gridlist[1], false) guiSetVisible(GUIEditor.gridlist[1], true)
guiGridListClear(GUIEditor.gridlist[1])
local item = guiGridListAddRow(GUIEditor.gridlist[1])
local itemName = guiGridListSetItemText(GUIEditor.gridlist[1], item, 1, one ..'- ' .. getPlayerName(Hours[one].name), false, false)
local itemName2 = guiGridListSetItemText(GUIEditor.gridlist[1], item, 2, Hours[one].time, false, false)
guiGridListSetItemColor(GUIEditor.gridlist[1], item, 1, 255, 0, 0)
guiGridListSetItemColor(GUIEditor.gridlist[1], item, 2, 0, 255, 0)
end
)

 

-- S
function getHours()
playersTable = {} ;
for i, v in ipairs(getElementsByType('player')) do 
local Acc = getPlayerAccount ( v )
if ( Acc ) and not isGuestAccount ( Acc ) then 
local playerData = getAccountData ( Acc, "Hours" ) or 0
local Hour, Min, Sec = unpack( split ( playerData, ":" ) )
table.insert(playersTable, {name = v, time = playerData})
end
end
table.sort (
        playersTable,
        function ( a, b )
            return ( tostring ( a.time ) or "" ) > ( tostring ( b.time ) or "" )
        end
    )
return playersTable
end

addEvent("ReSend", true)
addEventHandler("ReSend", root,
function()
setTimer ( Timer, 1000, 0 )
end
)


function Timer ()
local Hours = getHours()
for one = 1, #getElementsByType('player') do
if one >= 30 then return end
if (Hours[1]) then 
triggerClientEvent(root,"Add",root,one,Hours)
end
end
end

 

I couldn't wait for success, so I went ahead without it.

Posted

سطر 15
فيه غلط ..
وعندك بعد استقبال 
مسوي اخفاء واظهار بنفس الوقت ..
, وارسل الديبق ان وجد بعد التصحيح

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted

تمام بس سطر 15 مفهمتش الخطا و كلاينت و لا سيرفر

I couldn't wait for success, so I went ahead without it.

Posted
8 hours ago, #MR.NaiF said:

تمام بس سطر 15 مفهمتش الخطا و كلاينت و لا سيرفر

سيرفر , مسوي السورت خاطئ,,

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted
12 hours ago, iMr.WiFi..! said:

سيرفر , مسوي السورت خاطئ,,

مفهمتش بس شكرا انا حليت المشكلة من زمان

I couldn't wait for success, so I went ahead without it.

Posted
23 minutes ago, #MR.NaiF said:

مفهمتش بس شكرا انا حليت المشكلة من زمان

Programming Skills : 80 %

أنت قربت تختم البرمجة وماتعرف السورس :D

  • Like 1

من أراد الفشل عليه بالنجاح

Posted

المشكلة مكنتش من هنا اصلا وانا حليتها خلاص شكرا

@#BrosS

I couldn't wait for success, so I went ahead without it.

Posted
4 hours ago, #MR.NaiF said:

المشكلة مكنتش من هنا اصلا وانا حليتها خلاص شكرا

@#BrosS

الكذب على النفس مابينفعك -.- , وبتوفيق لك : )

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted

 

المشكلة مش من هنا والمود اشتغل

استخدمت المنت داتا 

المود كله كلاينت

I couldn't wait for success, so I went ahead without it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...