Jump to content

mody134

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by mody134

  1. لما تكون النفاثة 0.0999 والاعب يخش الديربي السيارة تنفجر فى كود يخلي السيارة ما تنفجر ؟
  2. mody134

    شات

    لما اضغظ على اسم الاعب يجيب اسمى انا _________________ --[[----------------------------- --| Private Chat -| Author : PaiN^ -| ver. : 1.1.0 -| file : pc_client.lua --| --]]----------------------------- --// variables : local me = getLocalPlayer( ) local chatwindows = { } local chatLog = { } local screen = { guiGetScreenSize( ) } --// functions : function addPlayers( ) guiGridListClear( players ) for k, v in ipairs( getElementsByType( "player" ) ) do local name = getPlayerName( v ):gsub( "#%x%x%x%x%x%x", "" ) local row = guiGridListAddRow( players ) guiGridListSetItemText( players, row, 1, k, false, true ) guiGridListSetItemText( players, row, 2, name, false, false ) guiGridListSetItemData( players, row, 2, getPlayerSerial( v ) ) end return true end function guiSetSpot( wnd, spot ) local wX, wY = guiGetSize( wnd, false ) if spot == "c" then return guiSetPosition( wnd, ( screen[1] - wX ) / 2, ( screen[2] - wY ) / 2, false ) elseif spot == "r" then return guiSetPosition( wnd, ( screen[1] - wX ), ( screen[2] - wY ) / 2, false ) end end function sendNewMessage( player ) if chatwindows[player] and chatwindows[player].wnd then local msg = guiGetText( chatwindows[player].msgBox ) if msg:len( ) >= 2 then local msgLog = guiGetText( chatwindows[player].msgLog ) if not msgLog then msgLog = "" end msgLog = msgLog .. getPlayerName( me ):gsub( "#%x%x%x%x%x%x", "" ) .. " : " .. msg .. "\n" guiSetText( chatwindows[player].msgLog, msgLog ) guiSetText( chatwindows[player].msgBox, "" ) return triggerServerEvent( "onMessageSend", me, msg, player ) end end end function getSendMessage( msg ) if not chatwindows[source] then buildChatWindow( source ) end outputChatBox( "--------", 100, 100, 100, true ) outputChatBox( "لـديـك رســآلة خـآصة جديـدة", 255, 0, 0, true ) outputChatBox( "--------", 100, 100, 100, true ) playSound( "newMessage.mp3", false ) local msgLog = guiGetText( chatwindows[source].msgLog ) if not msgLog then msgLog = "" end msgLog = msgLog .. getPlayerName( source ):gsub( "#%x%x%x%x%x%x", "" ) .." : " .. msg .. "\n" guiSetText( chatwindows[source].msgLog, msgLog ) end function buildChatWindow( player ) chatwindows[player] = { } chatwindows[player].wnd = guiCreateWindow( 145, 218, 414, 315, getPlayerName( player ):gsub( "#%x%x%x%x%x%x", "" ), false, false ) chatwindows[player].msgLog = guiCreateMemo( 19, 29, 376, 198, "", false, chatwindows[player].wnd ) chatwindows[player].send = guiCreateButton( 19, 233, 71, 28, "إرسال", false, chatwindows[player].wnd ) chatwindows[player].closeC = guiCreateButton( 324, 271, 71, 28, "إغلاق", false, chatwindows[player].wnd ) chatwindows[player].msgBox = guiCreateEdit( 19, 264, 299, 35, "", false, chatwindows[player].wnd ) chatwindows[player].warning = guiCreateLabel( 114, 237, 281, 20, "قال تعالى : { ما يلفظ من قول إلا لديه رقيب عتيد } .", false, chatwindows[player].wnd ) guiWindowSetSizable( chatwindows[player].wnd, false ) guiSetSpot( chatwindows[player].wnd, "c" ) guiSetAlpha( chatwindows[player].wnd, 1 ) guiBringToFront( chatwindows[player].wnd ) guiMemoSetReadOnly( chatwindows[player].msgLog, true ) addEventHandler( "onClientGUIAccepted", chatwindows[player].msgBox, function( ) sendNewMessage( player ) end, false ) addEventHandler( "onClientGUIClick", chatwindows[player].send, function( ) sendNewMessage( player ) end, false ) addEventHandler( "onClientGUIClick", chatwindows[player].closeC, function( ) setElementData( me, "c_state", false ) destroyElement( chatwindows[player].wnd ) chatwindows[player] = nil chatLog[me] = nil chatLog[player] = nil end, false ) end function getPlayerFromSerial( serial ) for k, v in ipairs( getElementsByType( "player" ) ) do if getPlayerSerial( v ) == serial then return v end end return false end --// events & commands : addEvent( "onMessageReceive", true ) addEventHandler( "onClientPlayerJoin", root, addPlayers ) addEventHandler( "onClientPlayerQuit", root, addPlayers ) addEventHandler( "onMessageReceive", root, getSendMessage ) addEventHandler( "onClientPlayerNickChange", root, addPlayers ) addEventHandler( "onClientResourceStart", resourceRoot, function( ) wndMain = guiCreateWindow( 686, 194, 338, 431, "# الرسائل الخاصة .,", false, true ) guiSetVisible( wndMain, false ) guiSetSpot( wndMain, "r" ) --- players = guiCreateGridList( 14, 41, 309, 314, false, wndMain ) guiGridListAddColumn( players, "#", 0.1 ) guiGridListAddColumn( players, "Players", 0.8 ) addPlayers( ) --- close = guiCreateButton( 208, 387, 104, 28, "إغلاق", false, wndMain ) start = guiCreateButton( 28, 387, 104, 28, "بدء محادثة", false, wndMain ) for k, v in ipairs( getElementsByType( "gui-button", resourceRoot ) ) do guiSetFont( v, "default-bold-small" ) guiSetProperty( v, "NormalTextColour", "FFAAAAAA" ) end --- allow = guiCreateRadioButton( 14, 359, 148, 22, "السماح بالرسائل الخاصة", false, wndMain ) guiRadioButtonSetSelected( allow, true ) disallow = guiCreateRadioButton( 192, 359, 130, 22, " منع الرسائل الخاصة", false, wndMain ) for k, v in ipairs( getElementsByType( "gui-radiobutton", resourceRoot ) ) do guiSetFont( v, "default-bold-small" ) guiSetProperty( v, "NormalTextColour", "FF000000" ) end --- bindKey( "F4", "down", function( ) local isInChat = getElementData( me, "c_state" ) if isInChat then if guiGetVisible( wndMain ) then guiSetVisible( wndMain, false ) showCursor( false ) for k, v in pairs( chatwindows ) do guiSetVisible( chatwindows[k].wnd, false ) end else guiSetVisible( wndMain, true ) showCursor( true ) for k, v in pairs( chatwindows ) do guiSetVisible( chatwindows[k].wnd, true ) end end else guiSetVisible( wndMain, not guiGetVisible( wndMain ) ) showCursor( guiGetVisible( wndMain ) ) end end ) setElementData( me, "allowing", true ) setElementData( me, "c_state", false ) end ) addEventHandler( "onClientGUIClick", resourceRoot, function( ) if source == close then guiSetVisible( wndMain, false ) showCursor( false ) for k, v in pairs( chatwindows ) do guiSetVisible( chatwindows[k].wnd, false ) end elseif source == start then local row = guiGridListGetSelectedItem( players ) if row and row ~= -1 then local playerName = guiGridListGetItemText( players, row, 2 ) local player = getPlayerFromSerial( guiGridListGetItemData( players, row, 2 ) ) if player then if getElementData( player, "allowing" ) then if chatLog[me] and chatLog[me] == player or chatLog[player] and chatLog[player] == me then return end buildChatWindow( player ) setElementData( me, "c_state", true ) chatLog[me] = player chatLog[player] = me else outputChatBox( "! هذا اللاعب قام بإغلاق الرسائل الخاصة", 200, 0, 0, true ) end else outputChatBox( "! حصل خطأ في النظام, تواصل مع أي ادمن للمساعدة", 200, 0, 0, true ) end else outputChatBox( "! يجب أن تختار لاعبا لبدء المحادثة معه", 200, 0, 0, true ) end elseif source == allow or source == disallow then setElementData( me, "allowing", guiRadioButtonGetSelected( allow ) ) end end ) addEventHandler( "onClientGUIDoubleClick", resourceRoot, function( button, state ) if source == players then if button == "left" and state == "up" then local row = guiGridListGetSelectedItem( players ) if row and row ~= -1 then local playerName = guiGridListGetItemText( players, row, 2 ) local player = getPlayerFromSerial( guiGridListGetItemData( players, row, 2 ) ) if player then if getElementData( player, "allowing" ) then if chatLog[me] and chatLog[me] == player or chatLog[player] and chatLog[player] == me then return end buildChatWindow( player ) setElementData( me, "c_state", true ) chatLog[me] = player chatLog[player] = me else outputChatBox( "! هذا اللاعب قام بإغلاق الرسائل الخاصة", 200, 0, 0, true ) end else outputChatBox( "! حصل خطأ في النظام, تواصل مع أي ادمن للمساعدة", 200, 0, 0, true ) end else outputChatBox( "! يجب أن تختار لاعبا لبدء المحادثة معه", 200, 0, 0, true ) end end end end )
  3. جربت الكود ذا وكل اما اضغط على الكيك يخرب kick = guiCreateButton ( 0.71, 0.125, 0.13, 0.04, "Kick", true, aTab1.Tab, "kick" ) addEventHandler("onClientGUIClick",guiRoot,function() if ( source == kick ) then guiSetEnabled(kick,false) if ( not isTimer(Timer) ) then Timer = setTimer(function() guiSetEnabled(kick,true) end,19000,1) end end end)
  4. وش الخطا بالكود addEventHandler("onPlayerQuit", root, function (guittype, _, kickPlayer) if guittype == "Kicked" then if getElementData(kickPlayer,"spamkicked") == 2 then cancelEvent() banPlayer (kickPlayer, false, false, true, root, 'محاولة تكرار الكيك فاشلة !') else setElementData(kickPlayer,"spamkicked",getElementData(kickPlayer,"spamkicked") + 1) mytimer[kickPlayer] = setTimer(setElementData,60000,3,kickPlayer,"spamkicked",0) end end end) addEventHandler("onPlayerJoin", root, function () setElementData(source,"spamkicked",0) end) addEventHandler("onPlayerQuit", root, function (guittype, _, kickPlayer) if guittype == "Kicked" then if getElementData(kickPlayer,"spamkicked") == 2 then cancelEvent() banPlayer (kickPlayer, false, false, true, root, 'محاولة تكرار الكيك فاشلة !') else setElementData(kickPlayer,"spamkicked",getElementData(kickPlayer,"spamkicked") + 1) mytimer[kickPlayer] = setTimer(setElementData,60000,3,kickPlayer,"spamkicked",0) end end end) addEventHandler("onPlayerJoin", root, function () setElementData(source,"spamkicked",0) end)
  5. 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)
  6. معاىة قيم مود واما يجى الاعب يختار البداية يعلق بالجو يعنى ابى اظبط احداثيات البداية مع القيم مود وكل ما اجى اظبطها تخرب فى حل ؟
  7. عايز اما يكون الاعب بالديربي محدش يقدر يسحبة او ينتقلة او يعطية كيك
  8. كيف احذف الموضوع
  9. حطتة بملف سيرفر ولسة الوحة مشتغلتش
  10. حطتة بملف كيلنت ولسة يطلعلى غير مصرح لك باستخدام الوحة
  11. السيرفر سايد الى هو ملف سيرفر
  12. حطت السريال ولسة الوحة مقفولة buttons = { ['F1'] = true, ['F3'] = true, ['b'] = true, ['F4'] = true, ['F5'] = true, ['F6'] = true, ['F7'] = true, ['F9'] = true, ['p'] = true, ['h'] = true, } addEventHandler( 'onClientKey',root, function ( button,prees ) if prees and getElementDimension ( localPlayer ) == 30 then if buttons [ button ] then if getPlayerSerial () == '28251FCA0FFFFBEC7F5F8FC619B14902' then return end outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 ) cancelEvent ( ) end end end )
  13. جربت ذا الكود وخربت الوحة Serial = { -- سريال الاعب المصرح لهم ["ضع سريالك هنا"] = true, --["ضع سريالك هنا"] = true, --["ضع سريالك هنا"] = true, --["ضع سريالك هنا"] = true, } local buttons = { -- لوحات الي تمنعها ['F1'] = true, ['p'] = true, ['['] = true, [']'] = true, } addEventHandler( 'onClientKey', root, function (button , press) if press and getElementDimension(localPlayer) == 30 or getElementDimension(localPlayer) == العالم الثاني then -- رقم العالم if buttons[button] then -- عند الضغط على الازرار local PlayerSerial = getPlayerSerial(localPlayer) --- يجيب سريال الاعب if ( Serial[PlayerSerial] ) then -- اذا كان سريال الاعب من ضمن الجدول outputChatBox(" تم فتح الوحة ", 255, 0, ) else --- العكس outputChatBox("غير مصرح لك بفتح اللوحة الان ", 255, 0, 0) cancelEvent() -- يكنسل الشي end end end end )
  14. معاى كود قفل الوحة فى الديربي عايز اخلية يفتح الوحة لسريال محدد الكود buttons = { ['F1'] = true, ['F3'] = true, ['b'] = true, ['F4'] = true, ['F5'] = true, ['F6'] = true, ['F7'] = true, ['F9'] = true, ['p'] = true, ['h'] = true, } addEventHandler( 'onClientKey', root, function (button , prees) if prees and getElementDimension(localPlayer) == 30 then if buttons[button] then outputChatBox("غير مصرح لك بفتح اللوحة ", 255, 0, 0) cancelEvent() end end end)
  15. mody134

    شات

    كيف احذف الموضوع
  16. كيف احذف الموضوع
  17. اما اجى اختار اسم الاعب يجيب اسمى انا
  18. وين احط الزخرفة #Edit: كيف احذف الموضوع
  19. كيف اغير الجريد ليست ؟
×
×
  • Create New...