السلام عليكم ورحمة الله وبركاته
ابي اعرف وش يسوي هالاكواد ؟
(:
step1 = function()
nickname = tostring(guiGetText(payEdit1))
account = tostring(guiGetText(payEdit2))
if account ~= "" and nickname ~= "" then
guiSetEnabled(staffPayTab1, false)
guiSetEnabled(staffPayTab2, true)
guiSetSelectedTab(staffPayPanel, staffPayTab2)
end
end
step2 = function()
nickname = tostring(guiGetText(payEdit1))
account = tostring(guiGetText(payEdit2))
grade = tonumber(guiGetText(payEdit3))
if grade ~= nil then
guiSetEnabled(staffPayTab2, false)
guiSetEnabled(staffPayTab3, true)
guiSetSelectedTab(staffPayPanel, staffPayTab3)
triggerServerEvent("staffpay.step2", localPlayer, account, nickname, grade)
end
end
step3 = function(l_3_0)
pay = l_3_0
nickname = tostring(guiGetText(payEdit1))
account = tostring(guiGetText(payEdit2))
grade = tonumber(guiGetText(payEdit3))
guiSetText(payLabel4, account .. "'s payment is calculated to be:\n$" .. l_3_0 .. "\nClick to confirm payment to bank account:\n" .. account)
end
addEvent("staffpay.gui3", true)
addEventHandler("staffpay.gui3", root, step3)
cancelstep3 = function()
guiSetEnabled(staffPayTab1, true)
guiSetEnabled(staffPayTab2, false)
guiSetEnabled(staffPayTab3, false)
guiSetText(payEdit1, "")
guiSetText(payEdit2, "")
guiSetText(payEdit3, "")
guiSetSelectedTab(staffPayPanel, staffPayTab1)
end
step4 = function()
guiSetEnabled(staffPayTab1, true)
guiSetEnabled(staffPayTab2, false)
guiSetEnabled(staffPayTab3, false)
guiSetSelectedTab(staffPayPanel, staffPayTab1)
triggerServerEvent("staffpay.payAccount", localPlayer, account, pay)
guiSetText(payEdit1, "")
guiSetText(payEdit2, "")
guiSetText(payEdit3, "")
end