Jump to content

قيم مود


mody134

Recommended Posts

Posted

معاىة قيم مود واما يجى الاعب يختار البداية يعلق بالجو 
يعنى ابى اظبط احداثيات البداية مع القيم مود وكل ما اجى اظبطها تخرب فى حل ؟

Posted

SkinsTable = {
    {'White - الثوب الأبيض', 46},
    {'Black - الثوب الأسود', 124},
    {'cJ - سي جي', 0},
    {'SWAT - سوات', 285}
}

PlacesTable = {
    {'Naqhil - النخيل', {2123.20996, 1397.87036,10.81252}, 2090.78320, 1352.45483, 26.16319, 2121.17480, 1397.20032, 10.81252},
    {'Dairy - الدائري', {1700.37024, 1377.66125, 10.76069}, 1750.06689, 1466.01208, 33.82446, 1691.81689, 1406.40369, 11.70338},
    {'Long street - الشارع الطويل', {-3029.71167, 8151.00195, 5.00000}, -3003.84033, 8001.17578, 42.45436, -3037.01245, 8098.71191, 5.00000},
    {'Starten - البداية', {-3484.82813, -3012.32129, 13.58312}, -3291.45117, -2977.70557, 35.43901, -3368.39355, -3024.78101, 4.90781}
}


GUIEditor = {
    label = {}
}
RememberMe = {
    Selection = {}
}
SetThisPlace = {
    Button = {}
}
AccountName = {
    Edit = {}
}
GoToServer = {
    Button = {}
}
SetThisSkin = {
    Button = {}
}
AccountPassword = {
    Edit = {}
}
CustomSkinID = {
    Edit = {}
}
PreviewPlace = {
    Button = {}
}
Login = {
    Button = {}
}
Skins = {
    GridList = {}
}
PreviewSkin = {
    Button = {}
}
Places = {
    GridList = {}
}
RegisterNew = {
    Button = {}
}

ReturnHomePage = {
    Button = {}
}
RematchPassword = {
    Edit = {}
}
NewAccountName = {
    Edit = {}
}
NewAccountPassword = {
    Edit = {}
}
RegisterAccount = {
    Button = {}
}
local screenW, screenH = guiGetScreenSize()
setElementData(localPlayer, 'POSITION', false)
setElementData(localPlayer, 'SKIN', false)
TimerFound = 5
Cplayer = getLocalPlayer()
ReturnToUserPanel = {}
ReturnToUserPanel.ButtonX = guiCreateButton(0.43, 0.91, 0.15, 0.04, "الرجوع للوحة الدخول", true)
guiSetFont(ReturnToUserPanel.ButtonX, "default-bold-small")
guiSetProperty(ReturnToUserPanel.ButtonX, "NormalTextColour", "FFFF1800")
guiSetVisible(ReturnToUserPanel.ButtonX, false)
EnterUserPanel = guiCreateWindow((screenW - 531) / 2, (screenH - 607) / 2, 531, 607, "# - | لوحة دخول المستخدم | - #", false)
guiWindowSetSizable(EnterUserPanel, false)
guiSetAlpha(EnterUserPanel, 1.00)
guiSetProperty(EnterUserPanel, "CaptionColour", "FFD1572C")
guiSetVisible(EnterUserPanel, false)
GUIEditor.label[1] = guiCreateLabel(10, 24, 507, 27, "أهلا وسهلا بك في السيرفر, رجاءا قم بالدخول إلى حسابك او تسجيل حساب جديد للأكمال .!", false, EnterUserPanel)
guiSetFont(GUIEditor.label[1], "default-bold-small")
guiLabelSetColor(GUIEditor.label[1], 0, 168, 255)
guiLabelSetHorizontalAlign(GUIEditor.label[1], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[1], "center")
Login.Button.EnterUserPanel = guiCreateButton(20, 107, 172, 26, "تسجيل الدخول", false, EnterUserPanel)
guiSetFont(Login.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(Login.Button.EnterUserPanel, "NormalTextColour", "FFFF4200")
GUIEditor.label[2] = guiCreateLabel(427, 75, 89, 22, "- إسم حسابك : ", false, EnterUserPanel)
guiSetFont(GUIEditor.label[2], "default-bold-small")
guiLabelSetColor(GUIEditor.label[2], 60, 255, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[2], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[2], "center")
AccountName.Edit.EnterUserPanel = guiCreateEdit(237, 75, 190, 22, "", false, EnterUserPanel)
GUIEditor.label[3] = guiCreateLabel(427, 107, 89, 22, "- كلمة المرور :", false, EnterUserPanel)
guiSetFont(GUIEditor.label[3], "default-bold-small")
guiLabelSetColor(GUIEditor.label[3], 255, 0, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[3], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[3], "center")
AccountPassword.Edit.EnterUserPanel = guiCreateEdit(237, 107, 190, 22, "", false, EnterUserPanel)
guiEditSetMasked(AccountPassword.Edit.EnterUserPanel, true)
GUIEditor.label[4] = guiCreateLabel(403, 152, 113, 23, "* ليس لديك حساب ؟", false, EnterUserPanel)
guiSetFont(GUIEditor.label[4], "default-bold-small")
guiLabelSetColor(GUIEditor.label[4], 0, 168, 255)
guiLabelSetHorizontalAlign(GUIEditor.label[4], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[4], "center")
RegisterNew.Button.EnterUserPanel = guiCreateButton(237, 152, 166, 23, "تسجيل حساب جديد", false, EnterUserPanel)
guiSetFont(RegisterNew.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(RegisterNew.Button.EnterUserPanel, "NormalTextColour", "FFFF4200")
GUIEditor.label[5] = guiCreateLabel(10, 180, 506, 15, "ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ", false, EnterUserPanel)
guiSetFont(GUIEditor.label[5], "default-bold-small")
guiLabelSetColor(GUIEditor.label[5], 255, 0, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false)
GUIEditor.label[6] = guiCreateLabel(10, 199, 506, 36, "تستطيع من خلال هذه الأختيارات ان تضع شخصية خاصة بك\n-  عندما تموت ستعيد الريسباون مع هذه الشخصية والمكان الذي اخترته", false, EnterUserPanel)
guiSetFont(GUIEditor.label[6], "default-bold-small")
guiLabelSetColor(GUIEditor.label[6], 0, 168, 255)
guiLabelSetHorizontalAlign(GUIEditor.label[6], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[6], "center")
Places.GridList.EnterUserPanel = guiCreateGridList(10, 239, 227, 180, false, EnterUserPanel)
guiGridListAddColumn(Places.GridList.EnterUserPanel, "^ [ المكان ] ^", 0.9)
guiSetFont(Places.GridList.EnterUserPanel, "default-bold-small")
Skins.GridList.EnterUserPanel = guiCreateGridList(289, 239, 227, 180, false, EnterUserPanel)
guiGridListAddColumn(Skins.GridList.EnterUserPanel, "^ [ الشخصية ] ^", 0.9)
guiSetFont(Skins.GridList.EnterUserPanel, "default-bold-small")
GUIEditor.label[7] = guiCreateLabel(389, 424, 127, 23, "* اختيار شخصية خاصة :", false, EnterUserPanel)
guiSetFont(GUIEditor.label[7], "default-bold-small")
guiLabelSetColor(GUIEditor.label[7], 0, 138, 255)
guiLabelSetHorizontalAlign(GUIEditor.label[7], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[7], "center")
CustomSkinID.Edit.EnterUserPanel = guiCreateEdit(322, 425, 67, 22, "", false, EnterUserPanel)
GUIEditor.label[8] = guiCreateLabel(279, 424, 37, 22, "- ID :", false, EnterUserPanel)
guiSetFont(GUIEditor.label[8], "default-bold-small")
guiLabelSetColor(GUIEditor.label[8], 255, 0, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[8], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[8], "center")
SetThisSkin.Button.EnterUserPanel = guiCreateButton(335, 503, 181, 27, "وضع الشخصية المحددة", false, EnterUserPanel)
guiSetFont(SetThisSkin.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(SetThisSkin.Button.EnterUserPanel, "NormalTextColour", "FF2AFF00")
SetThisPlace.Button.EnterUserPanel = guiCreateButton(10, 502, 181, 27, "وضع المكان المحدد", false, EnterUserPanel)
guiSetFont(SetThisPlace.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(SetThisPlace.Button.EnterUserPanel, "NormalTextColour", "FF2AFF00")
GoToServer.Button.EnterUserPanel = guiCreateButton(183, 570, 162, 27, "الدخول إلى السيرفر", false, EnterUserPanel)
guiSetFont(GoToServer.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(GoToServer.Button.EnterUserPanel, "NormalTextColour", "FFFF4200")
GUIEditor.label[9] = guiCreateLabel(10, 539, 506, 15, "ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ", false, EnterUserPanel)
guiSetFont(GUIEditor.label[9], "default-bold-small")
guiLabelSetColor(GUIEditor.label[9], 255, 0, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[9], "center", false)
RememberMe.Selection.EnterUserPanel = guiCreateCheckBox(20, 75, 172, 22, "# Remember me | تذكرني", false, false, EnterUserPanel)
guiSetFont(RememberMe.Selection.EnterUserPanel, "default-bold-small")
guiSetProperty(RememberMe.Selection.EnterUserPanel, "NormalTextColour", "FF1EFF00")
PreviewSkin.Button.EnterUserPanel = guiCreateButton(335, 456, 181, 27, "عرض الشخصية المحددة", false, EnterUserPanel)
guiSetFont(PreviewSkin.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(PreviewSkin.Button.EnterUserPanel, "NormalTextColour", "FFFF0029")
PreviewPlace.Button.EnterUserPanel = guiCreateButton(10, 456, 181, 27, "عرض المكان المحدد", false, EnterUserPanel)
guiSetFont(PreviewPlace.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(PreviewPlace.Button.EnterUserPanel, "NormalTextColour", "FFFF0029")

addEventHandler( 'onClientGUIClick', root,
function()
if (source == PreviewSkin.Button.EnterUserPanel) then
local getSelectedSkin = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
local getSkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
if (getSelectedSkin == -1) and (getSkinID == "") then outputChatBox( '* ERROR : #FFFFFF قم بتحديد شخصية أو ضع رقم الشخصية الخاصة أولا .!', 255, 0, 0, true ) return end
if (getSelectedSkin ~= -1) and (getSkinID ~= "" and tonumber(getSkinID)) then outputChatBox( '* ERROR : #FFFFFF رجاءا .. حدد خيار واحد فقط, اختر الشخصية من القائمة او ضع رقم الشخصية في الفراغ .!', 255, 0, 0, true ) return end
if (getSelectedSkin == -1) and (getSkinID ~= "" and not tonumber(getSkinID)) then outputChatBox( '* ERROR : #FFFFFF قم بوضع رقم الشخصية بشكل صحيح .!', 255, 0, 0, true ) return end
if (getSelectedSkin == -1) and (getSkinID ~= "" and tonumber(getSkinID)) then
SkinID = getSkinID end
if (getSelectedSkin ~= -1) and (getSkinID == "") then
SkinID = guiGridListGetItemData(Skins.GridList.EnterUserPanel, getSelectedSkin, 1)
end
setTime( 2, 0 )
playSoundFrontEnd(49)
guiSetVisible(EnterUserPanel, false)
fadeCamera(true)
if (isElement(SKIN)) then destroyElement(SKIN)
end
SKIN = createPed(SkinID, 2232.68188, 1090.45618, 75.55769)
setCameraMatrix(2232.90771, 1093.95605, 75.82514, 2232.68188, 1090.45618, 75.55769)
guiSetVisible(ReturnToUserPanel.ButtonX, true)
elseif (source == ReturnToUserPanel.ButtonX) then
guiSetVisible(ReturnToUserPanel.ButtonX, false)
guiSetVisible(EnterUserPanel, true)
fadeCamera(false)
elseif (source == PreviewPlace.Button.EnterUserPanel) then
local getSelectedPlace = guiGridListGetSelectedItem(Places.GridList.EnterUserPanel)
if (getSelectedPlace == -1) then outputChatBox( '* ERROR : #FFFFFF قم بتحديد مكان أولا .!', 255, 0, 0, true ) return end
setCameraMatrix(PlacesTable[getSelectedPlace +1][3],PlacesTable[getSelectedPlace +1][4],PlacesTable[getSelectedPlace +1][5],PlacesTable[getSelectedPlace +1][6],PlacesTable[getSelectedPlace +1][7],PlacesTable[getSelectedPlace +1][8])
guiSetVisible(ReturnToUserPanel.ButtonX, true)
setTime( 12, 0 )
playSoundFrontEnd(49)
guiSetVisible(EnterUserPanel, false)
fadeCamera(true)
end
end
)

addEvent( 'setInfoForPlayer', true )
addEventHandler( 'setInfoForPlayer', root,
function(AccountName_, AccountPass_)
guiSetText(AccountName.Edit.EnterUserPanel, AccountName_)
guiSetText(AccountPassword.Edit.EnterUserPanel, AccountPass_)
guiCheckBoxSetSelected(RememberMe.Selection.EnterUserPanel, true)
end
)

RegAccWindow = guiCreateWindow((screenW - 327) / 2, (screenH - 194) / 2, 327, 194, "# - | تسجيل حساب جديد | - #", false)
guiWindowSetSizable(RegAccWindow, false)
guiSetAlpha(RegAccWindow, 1.00)
guiSetProperty(RegAccWindow, "CaptionColour", "FFFF4645")
guiSetVisible(RegAccWindow, false)
Label1_ = guiCreateLabel(184, 35, 134, 21, "إسم الحساب الخاص بك :", false, RegAccWindow)
guiSetFont(Label1_, "default-bold-small")
guiLabelSetColor(Label1_, 230, 196, 93)
guiLabelSetHorizontalAlign(Label1_, "right", false)
guiLabelSetVerticalAlign(Label1_, "center")
NewAccountName.Edit.RegAccWindow = guiCreateEdit(12, 35, 172, 21, "", false, RegAccWindow)
Label2_ = guiCreateLabel(184, 67, 133, 21, "كلمة سر حسابك الجديد :", false, RegAccWindow)
guiSetFont(Label2_, "default-bold-small")
guiLabelSetColor(Label2_, 230, 196, 93)
guiLabelSetHorizontalAlign(Label2_, "right", false)
guiLabelSetVerticalAlign(Label2_, "center")
NewAccountPassword.Edit.RegAccWindow = guiCreateEdit(12, 66, 172, 22, "", false, RegAccWindow)
Label3_ = guiCreateLabel(184, 98, 133, 23, "أعــد ادخـال كلمة الســر :", false, RegAccWindow)
guiSetFont(Label3_, "default-bold-small")
guiLabelSetColor(Label3_, 230, 196, 93)
guiLabelSetHorizontalAlign(Label3_, "right", false)
guiLabelSetVerticalAlign(Label3_, "center")
RematchPassword.Edit.RegAccWindow = guiCreateEdit(12, 99, 172, 22, "", false, RegAccWindow)
RegisterAccount.Button.RegAccWindow = guiCreateButton(10, 159, 148, 25, "تسجيل الحساب الجديد", false, RegAccWindow)
guiSetFont(RegisterAccount.Button.RegAccWindow, "default-bold-small")
guiSetProperty(RegisterAccount.Button.RegAccWindow, "NormalTextColour", "FF43FF48")
ReturnHomePage.Button.RegAccWindow = guiCreateButton(170, 159, 147, 25, "الرجوع للصفحة الرئيسية", false, RegAccWindow)
guiSetFont(ReturnHomePage.Button.RegAccWindow, "default-bold-small")
guiSetProperty(ReturnHomePage.Button.RegAccWindow, "NormalTextColour", "FFFF4342")

for _, place in ipairs(PlacesTable) do 
local item = guiGridListAddRow(Places.GridList.EnterUserPanel)
local itemText = guiGridListSetItemText(Places.GridList.EnterUserPanel , item, 1, place[1], false, false)
local itemID = guiGridListSetItemData(Places.GridList.EnterUserPanel , item, 1, place[2])
local itemColor = guiGridListSetItemColor(Places.GridList.EnterUserPanel, item, 1, 255, 255, 0)
end

for _, skin in ipairs(SkinsTable) do 
local item = guiGridListAddRow(Skins.GridList.EnterUserPanel)
local itemText = guiGridListSetItemText(Skins.GridList.EnterUserPanel , item, 1, skin[1], false, false)
local itemID = guiGridListSetItemData(Skins.GridList.EnterUserPanel , item, 1, skin[2])
local itemColor = guiGridListSetItemColor(Skins.GridList.EnterUserPanel , item, 1, 255, 255, 0)
end

addEventHandler( 'onClientGUIClick', root,
function()
if (source == Login.Button.EnterUserPanel) then
if (guiCheckBoxGetSelected(RememberMe.Selection.EnterUserPanel) == true) then getRememberMeStatus = true
else if(guiCheckBoxGetSelected(RememberMe.Selection.EnterUserPanel) == false) then getRememberMeStatus = false end end
local AccountName = guiGetText(AccountName.Edit.EnterUserPanel)
local AccountPass = guiGetText(AccountPassword.Edit.EnterUserPanel)
if (AccountName ~= "" and AccountPassword ~= "") then
triggerServerEvent( 'checkForLogin', Cplayer, getRememberMeStatus, AccountName, AccountPass )
else outputChatBox( '* ERROR : #FFFFFF قم بأدخال اسم الحساب او كلمة السر بشكل صحيح .!', 255, 0, 0, true ) return end
elseif (source == RegisterNew.Button.EnterUserPanel) then
triggerServerEvent( 'checkLoginedOrNot', Cplayer )
elseif (source == RegisterAccount.Button.RegAccWindow ) then
local NewAccountName = guiGetText(NewAccountName.Edit.RegAccWindow)
local NewAccountPass = guiGetText(NewAccountPassword.Edit.RegAccWindow)
local AccountRematchPass = guiGetText(RematchPassword.Edit.RegAccWindow )
if (NewAccountName ~= "" and NewAccountPass ~= "" and AccountRematchPass ~= "") then
if (NewAccountPass ~= AccountRematchPass) then outputChatBox( '* ERROR : #FFFFFF كلمات السر التي أدخلتها غير متطابقة .!', 255, 0, 0, true ) return end
triggerServerEvent( 'checkForRegisterNewAccount', Cplayer, NewAccountName, NewAccountPass )
end
elseif (source == SetThisSkin.Button.EnterUserPanel) then
local getSkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
if (getSkinID ~= "" and not tonumber(getSkinID)) then outputChatBox( '* ERROR : #FFFFFF قم بوضع رقم الشخصية بشكل صحيح .!', 255, 0, 0, true ) return end
if (getSkinID == "") then
local getSelectedItem = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
if (getSelectedItem == -1) then outputChatBox( '* ERROR : #FFFFFF قم بتحديد شخصية أو ضع رقم الشخصية الخاصة أولا .!', 255, 0, 0, true ) return end
local SkinID = guiGridListGetItemData(Skins.GridList.EnterUserPanel, getSelectedItem, 1)
triggerServerEvent( 'setSkinData', Cplayer, SkinID )
guiSetEnabled(SetThisSkin.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisSkin.Button.EnterUserPanel, true)
else 
local getSelectedItem = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
if (getSelectedItem ~= -1) then outputChatBox( '* ERROR : #FFFFFF رجاءا .. حدد خيار واحد فقط, اختر الشخصية من القائمة او ضع رقم الشخصية في الفراغ .!', 255, 0, 0, true ) return end
local SkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
triggerServerEvent( 'setSkinData', Cplayer, SkinID )
guiSetEnabled(SetThisSkin.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisSkin.Button.EnterUserPanel, true)
end
elseif (source == SetThisPlace.Button.EnterUserPanel) then
local getSelectedItem = guiGridListGetSelectedItem(Places.GridList.EnterUserPanel)
if (getSelectedItem == -1) then outputChatBox( '* ERROR : #FFFFFF قم بتحديد مكان أولا .!', 255, 0, 0, true ) return end
local PlaceName = guiGridListGetItemText(Places.GridList.EnterUserPanel, getSelectedItem, 1)
local xSpawn, ySpawn, zSpawn = unpack(guiGridListGetItemData(Places.GridList.EnterUserPanel, getSelectedItem, 1))
triggerServerEvent( 'setPositionData', Cplayer, PlaceName, xSpawn, ySpawn, zSpawn )
guiSetEnabled(SetThisPlace.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisPlace.Button.EnterUserPanel, true)
elseif (source == GoToServer.Button.EnterUserPanel) then
if (guiGetEnabled(Login.Button.EnterUserPanel) ~= false) then  outputChatBox( '* ERROR : #FFFFFF لم تسجل دخولك إلى الحساب الخاص بك .!', 255, 0, 0, true ) return end
if (getElementData(localPlayer, 'POSITION') == false) or (getElementData(localPlayer, 'SKIN') == false) then outputChatBox( '* ERROR : #FFFFFF لم نتمكن من التعرف على الشخصية او المكان الذي اخترته .!', 255, 0, 0, true ) return end
guiSetEnabled(GoToServer.Button.EnterUserPanel, false)
TimerForGo = setTimer(function()
TimerFound = TimerFound - 1
XvalueTimer = setTimer(guiSetText, 1000, 0, GoToServer.Button.EnterUserPanel, 'سيتم الدخول خلال : ' .. TimerFound)
if (TimerFound == -1) then
guiSetVisible(EnterUserPanel, false)
showCursor(false)
guiSetInputEnabled(false)
setPedFrozen(localPlayer, false)
if (isElement(SKIN)) then destroyElement(SKIN) end
setCameraTarget(Cplayer)
triggerServerEvent( 'SpawnPlayerInSelectedSettinges', Cplayer )
killTimer(XvalueTimer)
killTimer(TimerForGo)
TimerFound = 5 
end
end, 1000, 0)
elseif (source == ReturnHomePage.Button.RegAccWindow) then
guiSetVisible(RegAccWindow, false)
guiSetVisible(EnterUserPanel, true)
end
end
)

addEvent( 'openRegisterNewAccountPanel', true )
addEventHandler( 'openRegisterNewAccountPanel', root,
function()
guiSetVisible(EnterUserPanel, false)
guiSetVisible(RegAccWindow, true)
end
)

addEvent( 'LoginedSeccessfully', true )
addEventHandler( 'LoginedSeccessfully', root,
function()
guiSetText(Login.Button.EnterUserPanel, 'تم تسجيل الدخول')
guiSetEnabled(Login.Button.EnterUserPanel, false)
guiSetEnabled(RegisterNew.Button.EnterUserPanel, false)
guiEditSetReadOnly(AccountName.Edit.EnterUserPanel, true)
guiEditSetReadOnly(AccountPassword.Edit.EnterUserPanel, true)
end
)

addEvent( 'setAccountToEdits', true )
addEventHandler( 'setAccountToEdits', root,
function(NewAccountName, NewAccountPass)
guiSetText(AccountName.Edit.EnterUserPanel, NewAccountName)
guiSetText(AccountPassword.Edit.EnterUserPanel, NewAccountPass)
guiSetVisible(RegAccWindow, false)
guiSetVisible(EnterUserPanel, true)
end
)

function setPedLoginMode()
triggerServerEvent( 'checkForInfoSavedOrNot', Cplayer )
setElementPosition(Cplayer, 184.63850, 1648.93506, 982.90533)
setPedFrozen(Cplayer, true)
fadeCamera(false)
guiSetVisible(EnterUserPanel, true)
guiSetInputEnabled(true)
showCursor(true)
end
addEventHandler("onClientResourceStart", resourceRoot, setPedLoginMode)

Posted
 

SkinsTable = {
    {'White - الثوب الأبيض', 46},
    {'Black - الثوب الأسود', 124},
    {'cJ - سي جي', 0},
    {'SWAT - سوات', 285}
}

PlacesTable = {
    {'Naqhil - النخيل', {2123.20996, 1397.87036,10.81252}, 2090.78320, 1352.45483, 26.16319, 2121.17480, 1397.20032, 10.81252},
    {'Dairy - الدائري', {1700.37024, 1377.66125, 10.76069}, 1750.06689, 1466.01208, 33.82446, 1691.81689, 1406.40369, 11.70338},
    {'Long street - الشارع الطويل', {-3029.71167, 8151.00195, 5.00000}, -3003.84033, 8001.17578, 42.45436, -3037.01245, 8098.71191, 5.00000},
    {'Starten - البداية', {-3484.82813, -3012.32129, 13.58312}, -3291.45117, -2977.70557, 35.43901, -3368.39355, -3024.78101, 4.90781}
}


GUIEditor = {
    label = {}
}
RememberMe = {
    Selection = {}
}
SetThisPlace = {
    Button = {}
}
AccountName = {
    Edit = {}
}
GoToServer = {
    Button = {}
}
SetThisSkin = {
    Button = {}
}
AccountPassword = {
    Edit = {}
}
CustomSkinID = {
    Edit = {}
}
PreviewPlace = {
    Button = {}
}
Login = {
    Button = {}
}
Skins = {
    GridList = {}
}
PreviewSkin = {
    Button = {}
}
Places = {
    GridList = {}
}
RegisterNew = {
    Button = {}
}

ReturnHomePage = {
    Button = {}
}
RematchPassword = {
    Edit = {}
}
NewAccountName = {
    Edit = {}
}
NewAccountPassword = {
    Edit = {}
}
RegisterAccount = {
    Button = {}
}
local screenW, screenH = guiGetScreenSize()
setElementData(localPlayer, 'POSITION', false)
setElementData(localPlayer, 'SKIN', false)
TimerFound = 5
Cplayer = getLocalPlayer()
ReturnToUserPanel = {}
ReturnToUserPanel.ButtonX = guiCreateButton(0.43, 0.91, 0.15, 0.04, "الرجوع للوحة الدخول", true)
guiSetFont(ReturnToUserPanel.ButtonX, "default-bold-small")
guiSetProperty(ReturnToUserPanel.ButtonX, "NormalTextColour", "FFFF1800")
guiSetVisible(ReturnToUserPanel.ButtonX, false)
EnterUserPanel = guiCreateWindow((screenW - 531) / 2, (screenH - 607) / 2, 531, 607, "# - | لوحة دخول المستخدم | - #", false)
guiWindowSetSizable(EnterUserPanel, false)
guiSetAlpha(EnterUserPanel, 1.00)
guiSetProperty(EnterUserPanel, "CaptionColour", "FFD1572C")
guiSetVisible(EnterUserPanel, false)
GUIEditor.label[1] = guiCreateLabel(10, 24, 507, 27, "أهلا وسهلا بك في السيرفر, رجاءا قم بالدخول إلى حسابك او تسجيل حساب جديد للأكمال .!", false, EnterUserPanel)
guiSetFont(GUIEditor.label[1], "default-bold-small")
guiLabelSetColor(GUIEditor.label[1], 0, 168, 255)
guiLabelSetHorizontalAlign(GUIEditor.label[1], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[1], "center")
Login.Button.EnterUserPanel = guiCreateButton(20, 107, 172, 26, "تسجيل الدخول", false, EnterUserPanel)
guiSetFont(Login.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(Login.Button.EnterUserPanel, "NormalTextColour", "FFFF4200")
GUIEditor.label[2] = guiCreateLabel(427, 75, 89, 22, "- إسم حسابك : ", false, EnterUserPanel)
guiSetFont(GUIEditor.label[2], "default-bold-small")
guiLabelSetColor(GUIEditor.label[2], 60, 255, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[2], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[2], "center")
AccountName.Edit.EnterUserPanel = guiCreateEdit(237, 75, 190, 22, "", false, EnterUserPanel)
GUIEditor.label[3] = guiCreateLabel(427, 107, 89, 22, "- كلمة المرور :", false, EnterUserPanel)
guiSetFont(GUIEditor.label[3], "default-bold-small")
guiLabelSetColor(GUIEditor.label[3], 255, 0, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[3], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[3], "center")
AccountPassword.Edit.EnterUserPanel = guiCreateEdit(237, 107, 190, 22, "", false, EnterUserPanel)
guiEditSetMasked(AccountPassword.Edit.EnterUserPanel, true)
GUIEditor.label[4] = guiCreateLabel(403, 152, 113, 23, "* ليس لديك حساب ؟", false, EnterUserPanel)
guiSetFont(GUIEditor.label[4], "default-bold-small")
guiLabelSetColor(GUIEditor.label[4], 0, 168, 255)
guiLabelSetHorizontalAlign(GUIEditor.label[4], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[4], "center")
RegisterNew.Button.EnterUserPanel = guiCreateButton(237, 152, 166, 23, "تسجيل حساب جديد", false, EnterUserPanel)
guiSetFont(RegisterNew.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(RegisterNew.Button.EnterUserPanel, "NormalTextColour", "FFFF4200")
GUIEditor.label[5] = guiCreateLabel(10, 180, 506, 15, "ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ", false, EnterUserPanel)
guiSetFont(GUIEditor.label[5], "default-bold-small")
guiLabelSetColor(GUIEditor.label[5], 255, 0, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false)
GUIEditor.label[6] = guiCreateLabel(10, 199, 506, 36, "تستطيع من خلال هذه الأختيارات ان تضع شخصية خاصة بك\n-  عندما تموت ستعيد الريسباون مع هذه الشخصية والمكان الذي اخترته", false, EnterUserPanel)
guiSetFont(GUIEditor.label[6], "default-bold-small")
guiLabelSetColor(GUIEditor.label[6], 0, 168, 255)
guiLabelSetHorizontalAlign(GUIEditor.label[6], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[6], "center")
Places.GridList.EnterUserPanel = guiCreateGridList(10, 239, 227, 180, false, EnterUserPanel)
guiGridListAddColumn(Places.GridList.EnterUserPanel, "^ [ المكان ] ^", 0.9)
guiSetFont(Places.GridList.EnterUserPanel, "default-bold-small")
Skins.GridList.EnterUserPanel = guiCreateGridList(289, 239, 227, 180, false, EnterUserPanel)
guiGridListAddColumn(Skins.GridList.EnterUserPanel, "^ [ الشخصية ] ^", 0.9)
guiSetFont(Skins.GridList.EnterUserPanel, "default-bold-small")
GUIEditor.label[7] = guiCreateLabel(389, 424, 127, 23, "* اختيار شخصية خاصة :", false, EnterUserPanel)
guiSetFont(GUIEditor.label[7], "default-bold-small")
guiLabelSetColor(GUIEditor.label[7], 0, 138, 255)
guiLabelSetHorizontalAlign(GUIEditor.label[7], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[7], "center")
CustomSkinID.Edit.EnterUserPanel = guiCreateEdit(322, 425, 67, 22, "", false, EnterUserPanel)
GUIEditor.label[8] = guiCreateLabel(279, 424, 37, 22, "- ID :", false, EnterUserPanel)
guiSetFont(GUIEditor.label[8], "default-bold-small")
guiLabelSetColor(GUIEditor.label[8], 255, 0, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[8], "right", false)
guiLabelSetVerticalAlign(GUIEditor.label[8], "center")
SetThisSkin.Button.EnterUserPanel = guiCreateButton(335, 503, 181, 27, "وضع الشخصية المحددة", false, EnterUserPanel)
guiSetFont(SetThisSkin.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(SetThisSkin.Button.EnterUserPanel, "NormalTextColour", "FF2AFF00")
SetThisPlace.Button.EnterUserPanel = guiCreateButton(10, 502, 181, 27, "وضع المكان المحدد", false, EnterUserPanel)
guiSetFont(SetThisPlace.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(SetThisPlace.Button.EnterUserPanel, "NormalTextColour", "FF2AFF00")
GoToServer.Button.EnterUserPanel = guiCreateButton(183, 570, 162, 27, "الدخول إلى السيرفر", false, EnterUserPanel)
guiSetFont(GoToServer.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(GoToServer.Button.EnterUserPanel, "NormalTextColour", "FFFF4200")
GUIEditor.label[9] = guiCreateLabel(10, 539, 506, 15, "ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ", false, EnterUserPanel)
guiSetFont(GUIEditor.label[9], "default-bold-small")
guiLabelSetColor(GUIEditor.label[9], 255, 0, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[9], "center", false)
RememberMe.Selection.EnterUserPanel = guiCreateCheckBox(20, 75, 172, 22, "# Remember me | تذكرني", false, false, EnterUserPanel)
guiSetFont(RememberMe.Selection.EnterUserPanel, "default-bold-small")
guiSetProperty(RememberMe.Selection.EnterUserPanel, "NormalTextColour", "FF1EFF00")
PreviewSkin.Button.EnterUserPanel = guiCreateButton(335, 456, 181, 27, "عرض الشخصية المحددة", false, EnterUserPanel)
guiSetFont(PreviewSkin.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(PreviewSkin.Button.EnterUserPanel, "NormalTextColour", "FFFF0029")
PreviewPlace.Button.EnterUserPanel = guiCreateButton(10, 456, 181, 27, "عرض المكان المحدد", false, EnterUserPanel)
guiSetFont(PreviewPlace.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(PreviewPlace.Button.EnterUserPanel, "NormalTextColour", "FFFF0029")

addEventHandler( 'onClientGUIClick', root,
function()
if (source == PreviewSkin.Button.EnterUserPanel) then
local getSelectedSkin = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
local getSkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
if (getSelectedSkin == -1) and (getSkinID == "") then outputChatBox( '* ERROR : #FFFFFF قم بتحديد شخصية أو ضع رقم الشخصية الخاصة أولا .!', 255, 0, 0, true ) return end
if (getSelectedSkin ~= -1) and (getSkinID ~= "" and tonumber(getSkinID)) then outputChatBox( '* ERROR : #FFFFFF رجاءا .. حدد خيار واحد فقط, اختر الشخصية من القائمة او ضع رقم الشخصية في الفراغ .!', 255, 0, 0, true ) return end
if (getSelectedSkin == -1) and (getSkinID ~= "" and not tonumber(getSkinID)) then outputChatBox( '* ERROR : #FFFFFF قم بوضع رقم الشخصية بشكل صحيح .!', 255, 0, 0, true ) return end
if (getSelectedSkin == -1) and (getSkinID ~= "" and tonumber(getSkinID)) then
SkinID = getSkinID end
if (getSelectedSkin ~= -1) and (getSkinID == "") then
SkinID = guiGridListGetItemData(Skins.GridList.EnterUserPanel, getSelectedSkin, 1)
end
setTime( 2, 0 )
playSoundFrontEnd(49)
guiSetVisible(EnterUserPanel, false)
fadeCamera(true)
if (isElement(SKIN)) then destroyElement(SKIN)
end
SKIN = createPed(SkinID, 2232.68188, 1090.45618, 75.55769)
setCameraMatrix(2232.90771, 1093.95605, 75.82514, 2232.68188, 1090.45618, 75.55769)
guiSetVisible(ReturnToUserPanel.ButtonX, true)
elseif (source == ReturnToUserPanel.ButtonX) then
guiSetVisible(ReturnToUserPanel.ButtonX, false)
guiSetVisible(EnterUserPanel, true)
fadeCamera(false)
elseif (source == PreviewPlace.Button.EnterUserPanel) then
local getSelectedPlace = guiGridListGetSelectedItem(Places.GridList.EnterUserPanel)
if (getSelectedPlace == -1) then outputChatBox( '* ERROR : #FFFFFF قم بتحديد مكان أولا .!', 255, 0, 0, true ) return end
setCameraMatrix(PlacesTable[getSelectedPlace +1][3],PlacesTable[getSelectedPlace +1][4],PlacesTable[getSelectedPlace +1][5],PlacesTable[getSelectedPlace +1][6],PlacesTable[getSelectedPlace +1][7],PlacesTable[getSelectedPlace +1][8])
guiSetVisible(ReturnToUserPanel.ButtonX, true)
setTime( 12, 0 )
playSoundFrontEnd(49)
guiSetVisible(EnterUserPanel, false)
fadeCamera(true)
end
end
)

addEvent( 'setInfoForPlayer', true )
addEventHandler( 'setInfoForPlayer', root,
function(AccountName_, AccountPass_)
guiSetText(AccountName.Edit.EnterUserPanel, AccountName_)
guiSetText(AccountPassword.Edit.EnterUserPanel, AccountPass_)
guiCheckBoxSetSelected(RememberMe.Selection.EnterUserPanel, true)
end
)

RegAccWindow = guiCreateWindow((screenW - 327) / 2, (screenH - 194) / 2, 327, 194, "# - | تسجيل حساب جديد | - #", false)
guiWindowSetSizable(RegAccWindow, false)
guiSetAlpha(RegAccWindow, 1.00)
guiSetProperty(RegAccWindow, "CaptionColour", "FFFF4645")
guiSetVisible(RegAccWindow, false)
Label1_ = guiCreateLabel(184, 35, 134, 21, "إسم الحساب الخاص بك :", false, RegAccWindow)
guiSetFont(Label1_, "default-bold-small")
guiLabelSetColor(Label1_, 230, 196, 93)
guiLabelSetHorizontalAlign(Label1_, "right", false)
guiLabelSetVerticalAlign(Label1_, "center")
NewAccountName.Edit.RegAccWindow = guiCreateEdit(12, 35, 172, 21, "", false, RegAccWindow)
Label2_ = guiCreateLabel(184, 67, 133, 21, "كلمة سر حسابك الجديد :", false, RegAccWindow)
guiSetFont(Label2_, "default-bold-small")
guiLabelSetColor(Label2_, 230, 196, 93)
guiLabelSetHorizontalAlign(Label2_, "right", false)
guiLabelSetVerticalAlign(Label2_, "center")
NewAccountPassword.Edit.RegAccWindow = guiCreateEdit(12, 66, 172, 22, "", false, RegAccWindow)
Label3_ = guiCreateLabel(184, 98, 133, 23, "أعــد ادخـال كلمة الســر :", false, RegAccWindow)
guiSetFont(Label3_, "default-bold-small")
guiLabelSetColor(Label3_, 230, 196, 93)
guiLabelSetHorizontalAlign(Label3_, "right", false)
guiLabelSetVerticalAlign(Label3_, "center")
RematchPassword.Edit.RegAccWindow = guiCreateEdit(12, 99, 172, 22, "", false, RegAccWindow)
RegisterAccount.Button.RegAccWindow = guiCreateButton(10, 159, 148, 25, "تسجيل الحساب الجديد", false, RegAccWindow)
guiSetFont(RegisterAccount.Button.RegAccWindow, "default-bold-small")
guiSetProperty(RegisterAccount.Button.RegAccWindow, "NormalTextColour", "FF43FF48")
ReturnHomePage.Button.RegAccWindow = guiCreateButton(170, 159, 147, 25, "الرجوع للصفحة الرئيسية", false, RegAccWindow)
guiSetFont(ReturnHomePage.Button.RegAccWindow, "default-bold-small")
guiSetProperty(ReturnHomePage.Button.RegAccWindow, "NormalTextColour", "FFFF4342")

for _, place in ipairs(PlacesTable) do 
local item = guiGridListAddRow(Places.GridList.EnterUserPanel)
local itemText = guiGridListSetItemText(Places.GridList.EnterUserPanel , item, 1, place[1], false, false)
local itemID = guiGridListSetItemData(Places.GridList.EnterUserPanel , item, 1, place[2])
local itemColor = guiGridListSetItemColor(Places.GridList.EnterUserPanel, item, 1, 255, 255, 0)
end

for _, skin in ipairs(SkinsTable) do 
local item = guiGridListAddRow(Skins.GridList.EnterUserPanel)
local itemText = guiGridListSetItemText(Skins.GridList.EnterUserPanel , item, 1, skin[1], false, false)
local itemID = guiGridListSetItemData(Skins.GridList.EnterUserPanel , item, 1, skin[2])
local itemColor = guiGridListSetItemColor(Skins.GridList.EnterUserPanel , item, 1, 255, 255, 0)
end

addEventHandler( 'onClientGUIClick', root,
function()
if (source == Login.Button.EnterUserPanel) then
if (guiCheckBoxGetSelected(RememberMe.Selection.EnterUserPanel) == true) then getRememberMeStatus = true
else if(guiCheckBoxGetSelected(RememberMe.Selection.EnterUserPanel) == false) then getRememberMeStatus = false end end
local AccountName = guiGetText(AccountName.Edit.EnterUserPanel)
local AccountPass = guiGetText(AccountPassword.Edit.EnterUserPanel)
if (AccountName ~= "" and AccountPassword ~= "") then
triggerServerEvent( 'checkForLogin', Cplayer, getRememberMeStatus, AccountName, AccountPass )
else outputChatBox( '* ERROR : #FFFFFF قم بأدخال اسم الحساب او كلمة السر بشكل صحيح .!', 255, 0, 0, true ) return end
elseif (source == RegisterNew.Button.EnterUserPanel) then
triggerServerEvent( 'checkLoginedOrNot', Cplayer )
elseif (source == RegisterAccount.Button.RegAccWindow ) then
local NewAccountName = guiGetText(NewAccountName.Edit.RegAccWindow)
local NewAccountPass = guiGetText(NewAccountPassword.Edit.RegAccWindow)
local AccountRematchPass = guiGetText(RematchPassword.Edit.RegAccWindow )
if (NewAccountName ~= "" and NewAccountPass ~= "" and AccountRematchPass ~= "") then
if (NewAccountPass ~= AccountRematchPass) then outputChatBox( '* ERROR : #FFFFFF كلمات السر التي أدخلتها غير متطابقة .!', 255, 0, 0, true ) return end
triggerServerEvent( 'checkForRegisterNewAccount', Cplayer, NewAccountName, NewAccountPass )
end
elseif (source == SetThisSkin.Button.EnterUserPanel) then
local getSkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
if (getSkinID ~= "" and not tonumber(getSkinID)) then outputChatBox( '* ERROR : #FFFFFF قم بوضع رقم الشخصية بشكل صحيح .!', 255, 0, 0, true ) return end
if (getSkinID == "") then
local getSelectedItem = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
if (getSelectedItem == -1) then outputChatBox( '* ERROR : #FFFFFF قم بتحديد شخصية أو ضع رقم الشخصية الخاصة أولا .!', 255, 0, 0, true ) return end
local SkinID = guiGridListGetItemData(Skins.GridList.EnterUserPanel, getSelectedItem, 1)
triggerServerEvent( 'setSkinData', Cplayer, SkinID )
guiSetEnabled(SetThisSkin.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisSkin.Button.EnterUserPanel, true)
else 
local getSelectedItem = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
if (getSelectedItem ~= -1) then outputChatBox( '* ERROR : #FFFFFF رجاءا .. حدد خيار واحد فقط, اختر الشخصية من القائمة او ضع رقم الشخصية في الفراغ .!', 255, 0, 0, true ) return end
local SkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
triggerServerEvent( 'setSkinData', Cplayer, SkinID )
guiSetEnabled(SetThisSkin.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisSkin.Button.EnterUserPanel, true)
end
elseif (source == SetThisPlace.Button.EnterUserPanel) then
local getSelectedItem = guiGridListGetSelectedItem(Places.GridList.EnterUserPanel)
if (getSelectedItem == -1) then outputChatBox( '* ERROR : #FFFFFF قم بتحديد مكان أولا .!', 255, 0, 0, true ) return end
local PlaceName = guiGridListGetItemText(Places.GridList.EnterUserPanel, getSelectedItem, 1)
local xSpawn, ySpawn, zSpawn = unpack(guiGridListGetItemData(Places.GridList.EnterUserPanel, getSelectedItem, 1))
triggerServerEvent( 'setPositionData', Cplayer, PlaceName, xSpawn, ySpawn, zSpawn )
guiSetEnabled(SetThisPlace.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisPlace.Button.EnterUserPanel, true)
elseif (source == GoToServer.Button.EnterUserPanel) then
if (guiGetEnabled(Login.Button.EnterUserPanel) ~= false) then  outputChatBox( '* ERROR : #FFFFFF لم تسجل دخولك إلى الحساب الخاص بك .!', 255, 0, 0, true ) return end
if (getElementData(localPlayer, 'POSITION') == false) or (getElementData(localPlayer, 'SKIN') == false) then outputChatBox( '* ERROR : #FFFFFF لم نتمكن من التعرف على الشخصية او المكان الذي اخترته .!', 255, 0, 0, true ) return end
guiSetEnabled(GoToServer.Button.EnterUserPanel, false)
TimerForGo = setTimer(function()
TimerFound = TimerFound - 1
XvalueTimer = setTimer(guiSetText, 1000, 0, GoToServer.Button.EnterUserPanel, 'سيتم الدخول خلال : ' .. TimerFound)
if (TimerFound == -1) then
guiSetVisible(EnterUserPanel, false)
showCursor(false)
guiSetInputEnabled(false)
setPedFrozen(localPlayer, false)
if (isElement(SKIN)) then destroyElement(SKIN) end
setCameraTarget(Cplayer)
triggerServerEvent( 'SpawnPlayerInSelectedSettinges', Cplayer )
killTimer(XvalueTimer)
killTimer(TimerForGo)
TimerFound = 5 
end
end, 1000, 0)
elseif (source == ReturnHomePage.Button.RegAccWindow) then
guiSetVisible(RegAccWindow, false)
guiSetVisible(EnterUserPanel, true)
end
end
)

addEvent( 'openRegisterNewAccountPanel', true )
addEventHandler( 'openRegisterNewAccountPanel', root,
function()
guiSetVisible(EnterUserPanel, false)
guiSetVisible(RegAccWindow, true)
end
)

addEvent( 'LoginedSeccessfully', true )
addEventHandler( 'LoginedSeccessfully', root,
function()
guiSetText(Login.Button.EnterUserPanel, 'تم تسجيل الدخول')
guiSetEnabled(Login.Button.EnterUserPanel, false)
guiSetEnabled(RegisterNew.Button.EnterUserPanel, false)
guiEditSetReadOnly(AccountName.Edit.EnterUserPanel, true)
guiEditSetReadOnly(AccountPassword.Edit.EnterUserPanel, true)
end
)

addEvent( 'setAccountToEdits', true )
addEventHandler( 'setAccountToEdits', root,
function(NewAccountName, NewAccountPass)
guiSetText(AccountName.Edit.EnterUserPanel, NewAccountName)
guiSetText(AccountPassword.Edit.EnterUserPanel, NewAccountPass)
guiSetVisible(RegAccWindow, false)
guiSetVisible(EnterUserPanel, true)
end
)

function setPedLoginMode()
triggerServerEvent( 'checkForInfoSavedOrNot', Cplayer )
setElementPosition(Cplayer, 184.63850, 1648.93506, 982.90533)
setPedFrozen(Cplayer, true)
fadeCamera(false)
guiSetVisible(EnterUserPanel, true)
guiSetInputEnabled(true)
showCursor(true)
end
addEventHandler("onClientResourceStart", resourceRoot, setPedLoginMode)

ملاحظتين
1

2
وقت تطرح كود اطرحه بصيغة
lua

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