Jump to content

تصحيح كود


Mohamed

Recommended Posts

Posted (edited)
  
Watherlistgu = { 
    {"Morning","09:00",9}, 
    {"Noon ","12:00",12}, 
    {"Night","22:00",22}, 
    {"Midhight ","00:00",00}, 
    {"Evening","20:00",20}, 
    {"Down","05:00",05}, 
    {"Afternoon","15:00",15}, 
 } 
for v,mk in ipairs(Watherlistgu) do 
    local row = guiGridListAddRow(ClockList) 
    guiGridListSetItemText(  ClockList, row,1,mk[1],false,false) 
    guiGridListSetItemData(  ClockList, row,1,{mk[2],mk[3],mk[4]}) 
    guiGridListSetItemText ( ClockList, row, 2, mk[2],false,false) 
    guiGridListSetItemData ( ClockList, row, 2,tostring ( v ) ) 
    guiGridListSetItemColor( ClockList, row, 1, 0, 255, 0 ) 
end 
  
addEventHandler("onClientGUIClick",root, 
function () 
local sel = guiGridListGetSelectedItem(ClockList) 
if source == Clockstart then 
if sel ~= -1 then 
local setTime = unpack(guiGridListGetItemData(ClockList,"http://cityadspix.com/tsclick-FDQCWPPK-JHFDQDB0?url=http%3A%2F%2Fwww.svyaznoy.ru%2Fcatalog%2Faudiovideo%2F1567%2F1471863&sa=wp&bt=20&pt=9&lt=2&tl=3&im=NTY1LTAtMTQxMzM2ODE3NC0xNjA5ODQyOQ%3D%3D&prdct=3a0e3f0c3e09&kw=sel%2C1))" target="_blank" alt="Sony 50mm f/1.8 OSS (SEL-50F18)" title="Sony 50mm f/1.8 OSS (SEL-50F18)" style="">sel,1)) 
getTime ( localPlayer, setTime ) 
end 
end 
end 
) 
  

Edited by Guest
Posted

جـرب ,#

local Watherlistgu = { 
    {"Morning","09:00",9}, 
    {"Noon ","12:00",12}, 
    {"Night","22:00",22}, 
    {"Midhight ","00:00",00}, 
    {"Evening","20:00",20}, 
    {"Down","05:00",05}, 
    {"Afternoon","15:00",15}, 
} 
  
for v,mk in ipairs(Watherlistgu) do 
    local row = guiGridListAddRow(ClockList) 
    guiGridListSetItemText(  ClockList, row,1,mk[1],false,false) 
    guiGridListSetItemData(  ClockList, row,1,{mk[2],mk[3],mk[4]}) 
    guiGridListSetItemText ( ClockList, row, 2, mk[2],false,false) 
    guiGridListSetItemData ( ClockList, row, 2,tostring ( v ) ) 
    guiGridListSetItemColor( ClockList, row, 1, 0, 255, 0 ) 
end 
  
addEventHandler("onClientGUIClick",root, 
function () 
local sel = guiGridListGetSelectedItem(ClockList) 
if source == Clockstart then 
if sel ~= -1 then 
local setTime = unpack(guiGridListGetItemData(ClockList,sel,1)) 
getTime ( localPlayer, setTime ) 
end 
end 
end 
) 
Posted

مو شغال انا عمل قوس من قبل بس عرضت الكود خطاء انا لما اضغط على الزر ما يتغير الوقت هذي المشكل

Posted

اول شي مو حاطط الدقائق

ثاني شي

هاد يجيب الوقت و ما فية ارقمنت شو يلي حاطة جواتة

getTime

Posted

جـرب ,#

local Watherlistgu = { 
    {"Morning","09:00",9}, 
    {"Noon ","12:00",12}, 
    {"Night","22:00",22}, 
    {"Midhight ","00:00",00}, 
    {"Evening","20:00",20}, 
    {"Down","05:00",05}, 
    {"Afternoon","15:00",15}, 
} 
  
for v,mk in ipairs(Watherlistgu) do 
    local row = guiGridListAddRow(ClockList) 
    guiGridListSetItemText(  ClockList, row,1,mk[1],false,false) 
    guiGridListSetItemData(  ClockList, row,1,{mk[2],mk[3],mk[4]}) 
    guiGridListSetItemText ( ClockList, row, 2, mk[2],false,false) 
    guiGridListSetItemData ( ClockList, row, 2,tostring ( v ) ) 
    guiGridListSetItemColor( ClockList, row, 1, 0, 255, 0 ) 
end 
  
addEventHandler("onClientGUIClick",root, 
function () 
local sel = guiGridListGetSelectedItem(ClockList) 
if source == Clockstart then 
if sel ~= -1 then 
local setTime = unpack(guiGridListGetItemData(ClockList,sel,1)) 
setTime ( localPlayer, sel ) 
end 
end 
end 
) 
Posted (edited)

^ غلط

edit:

تفضل

  
local Watherlistgu = { 
    {"Morning","09:00",9}, 
    {"Noon ","12:00",12}, 
    {"Night","22:00",22}, 
    {"Midhight ","00:00",00}, 
    {"Evening","20:00",20}, 
    {"Down","05:00",05}, 
    {"Afternoon","15:00",15}, 
} 
  
for v,mk in ipairs(Watherlistgu) do 
    local row = guiGridListAddRow(ClockList) 
    guiGridListSetItemText(  ClockList, row,1,mk[1],false,false) 
    guiGridListSetItemText ( ClockList, row, 2, mk[2],false,false) 
    guiGridListSetItemData ( ClockList, row, 1,mk[3] ) 
    guiGridListSetItemColor( ClockList, row, 1, 0, 255, 0 ) 
end 
  
addEventHandler("onClientGUIClick",root, 
function () 
if source == Clockstart then 
local sel = guiGridListGetSelectedItem(ClockList) 
if sel ~= -1 then 
local time = tonumber(guiGridListGetItemData(ClockList,sel,1)) 
setTime ( time ,0) 
end 
end 
end 
) 

Edited by Guest

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...