Jump to content

Rakan#

Members
  • Posts

    451
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Rakan#

  1. استعمل break عشان مايكرر بدون فايده
  2. استدبل H= H*1000*60*60*24 الى H=H*1000*60*60 بالخطا حطيتها على انه يوم بدال ساعه @+Source|>
  3. كيف مو ضابط ؟ مايشتغل ولا ماعرفت تعدله
  4. ويرحم والدينك كلمني خاص مو هنا
  5. @+Source|> جرب ذا الكود مو مجربه لكن اظن شغال function getTimeLeft(Timer) local h = math.floor(Timer/3600000) local m = math.floor(Timer/60000) local s = math.floor((Timer-m*60000)/1000) if h < 10 then h = "0"..h end if m < 10 then m = "0"..m end if s < 10 then s = "0"..s end return "("..h..":"..m..":"..s..")" end function getMS(H,M,S) H = H * 1000*60*60*24 M = M * 1000*60 S = S * 1000 return H+M+S end addCommandHandler("tst", function(player) h,m,s = 1,60,12 M=getMS(h,m,s) if M and tonumber(M) then if isTimer(aTimer) then killTimer(aTimer) end aTimer = setTimer( function() end,M,1) xTimer = setTimer( function() if isTimer(aTimer) then setGameType(getTimeLeft(getTimerDetails(aTimer))) else setGameType("انتهى العد") killTimer(xTimer) end end,1000,0) end end)
  6. createWater وين مبرمج الفيب ؟
  7. لو بغيت الصراحه مستغرب كيف مسوي مود كذا وقاعد تسوي طلبات بموقع البرمجه اسهل من الموجود بالمود ذا بكثير باختصار انت زارف حقوق خخ
  8. اطرح اكوادك كامله كامله
  9. اكوادك ناقصه !! لكن حاولت اسويها مع انها ناقصه . تفضل local mainKey = 'F2' -- The key to open panel </> GUIEditor = { gridlist = {}, button = {}, edit = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() privtechat = guiCreateWindow(0, 203, 464, 473, "|#| الــدردشــات الــخـــاصــة |#|", false) guiWindowSetSizable(privtechat, false) guiSetAlpha(privtechat, 1.00) guiSetVisible(privtechat, false) GUIEditor.edit[1] = guiCreateEdit(9, 31, 260, 41, "", false, privtechat) GUIEditor.gridlist[1] = guiCreateGridList(9, 88, 270, 375, false, privtechat) guiGridListAddColumn(GUIEditor.gridlist[1], "الاعــبــيــن ..#", 0.9) GUIEditor.label[1] = guiCreateLabel(324, 40, 85, 22, "Player Name ", false, privtechat) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(279, 34, 44, 38, "*", false, privtechat) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.label[3] = guiCreateLabel(399, 34, 44, 38, "*", false, privtechat) guiSetFont(GUIEditor.label[3], "sa-gothic") guiLabelSetColor(GUIEditor.label[3], 255, 0, 0) GUIEditor.button[1] = guiCreateButton(281, 202, 173, 51, "|#| فـــتـــح الــدردشــة |#|", false, privtechat) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF00FE00") GUIEditor.button[5] = guiCreateButton(281, 263, 173, 51, "|#| أغـــلاق |=| Close |#|", false, privtechat) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFF0000") GUIEditor.label[5] = guiCreateLabel(283, 430, 181, 16, "===================", false, privtechat) guiLabelSetColor(GUIEditor.label[5], 250, 2, 154) GUIEditor.label[6] = guiCreateLabel(283, 98, 181, 16, "Mr.Grand", false, privtechat) guiLabelSetColor(GUIEditor.label[6], 48, 203, 55) end ) bindKey( mainKey, 'down', function( ) guiSetVisible( privtechat, not guiGetVisible( privtechat ) ) showCursor( guiGetVisible( privtechat ) ) guiSetInputEnabled( guiGetVisible( privtechat ) ) for cNumber, _ in pairs( chat_Windows ) do if cNumber and isElement(cNumber) and getElementType(cNumber) == "player" then guiSetVisible( chat_Windows[cNumber].window, guiGetVisible( privtechat ) ) else destroyElement(chat_Windows[cNumber].window) end end end ); addEventHandler( 'onClientGUIChanged', root, function( ) if ( source == GUIEditor.edit[1] ) then local plrString = guiGetText( GUIEditor.edit[1] ) if ( plrString == '' or not plrString ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do addPlayer( player ) return end if ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Online' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do if ( getElementData( player, 'chatStatus' ) == 'Online' ) then addOnlinePlayer( player ) end end elseif ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Offline' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do if ( getElementData( player, 'chatStatus' ) == 'Offline' ) then addOfflinePlayer( player ) end end elseif ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Both (All)' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do addPlayer( player ) end end else guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do if ( string.find( string.upper( getPlayerName( player ) ), string.upper( plrString ) ) ) then addPlayer( player ) end return end if ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Online' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do if ( string.find( string.upper( getPlayerName( player ) ), string.upper( plrString ) ) ) then if ( getElementData( player, 'chatStatus' ) == 'Online' ) then addOnlinePlayer( player ) end end end elseif ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Offline' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do if ( string.find( string.upper( getPlayerName( player ) ), string.upper( plrString ) ) ) then if ( getElementData( player, 'chatStatus' ) == 'Offline' ) then addOfflinePlayer( player ) end end end elseif ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Both (All)' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do if ( string.find( string.upper( getPlayerName( player ) ), string.upper( plrString ) ) ) then addPlayer( player ) end end end end end end ); function checkIfTextChanged( player, text ) setTimer( function( ) if ( guiGetText( chat_Windows[player].editBox ) == text ) then triggerServerEvent( 'onServerCheckHide', Cplayer, player ) end end, 1000, 1 ) end; addEvent( 'onClientPokePlayer', true ); addEventHandler( 'onClientPokePlayer', root, function( pokedBy ) if ( getElementData( Cplayer, 'donotDisturb' ) ~= 'Enabled' ) then playSound( 'Wakeup.mp3' ) outputChatBox( '#FFFF00• Chat System :#FFFFFF The player : [ '..pokedBy..' ] - Poked you !', 255, 255, 255, true ) end end ); addEvent( 'onClientChangeButton', true ); addEventHandler( 'onClientChangeButton', root, function( Text ) guiSetText( GUIEditor.button[2], Text ) end ); function buildChattingWith( ) local row, column = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) if ( row == -1 or column == -1 ) then return end local player = getPlayerFromName( guiGridListGetItemText( GUIEditor.gridlist[1], row, column ) ) if ( getElementData( player, 'chatStatus' ) ~= 'Online' ) then outputChatBox( '#FF0000• ERROR :#FFFFFF Sorry, You cannot send a message to this player .. it\'s offline !', 255, 255, 255, true ) return end if ( not chat_Windows[player] ) then BuildChatting( player ) guiBringToFront( chat_Windows[player].window ) end end; addEvent( 'buildChattingWith', true ); addEventHandler( 'buildChattingWith', root, buildChattingWith ) function privateChatDoubleClicks( ) if ( source == GUIEditor.gridlist[1] ) then local Sel = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) if ( Sel == -1 ) then return end local player = getPlayerFromName( guiGridListGetItemText( GUIEditor.gridlist[1], Sel, 1 ) ) if ( player == Cplayer ) then outputChatBox( '#FF0000• ERROR :#FFFFFF You cannot chatting with yourself !', 255, 255, 255, true ) return end local serial = getElementData( player, 'chatSystem;playerSerial' ) triggerServerEvent( 'onServerCheckIfBlocked', Cplayer, serial ) end end; addEventHandler( 'onClientGUIDoubleClick', root, privateChatDoubleClicks ); -- BuildChatting addEvent( 'onClientReceiveMessage', true ); addEventHandler( 'onClientReceiveMessage', root, function( player, message ) if ( not chat_Windows[player] ) then BuildChatting( player ) end local oldMessages = guiGetText( chat_Windows[player].memo ) local newString = oldMessages..getPlayerName( player ):gsub( '#%x%x%x%x%x%x', '' )..' : '..message..'\n' guiSetText( chat_Windows[player].memo, newString ) guiMemoSetCaretIndex( chat_Windows[player].memo, string.len( oldMessages ) ) if ( guiGetVisible( GUIEditor.window[1] ) == false ) then if ( getElementData( Cplayer, 'donotDisturb' ) ~= 'Enabled' ) then outputChatBox( '#FFFF00• Chat System :#FFFFFF The player : [ '..getPlayerName( player )..' ] - Sent you a message !', 255, 255, 255, true ) playSound( 'Message.mp3' ) end end end ); function addPlayer( player ) local data = getElementData( player, 'chatStatus' ) or 'Online' local name = getPlayerName( player ) local r, g, b = getPlayerNametagColor( player ) local row = guiGridListAddRow( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, name, false, false ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 2, data, false, false ) guiGridListSetItemColor( GUIEditor.gridlist[1], row, 1, r, g, b ) if ( data == 'Online' ) then guiGridListSetItemColor( GUIEditor.gridlist[1], row, 2, 0, 200, 0 ) else guiGridListSetItemColor( GUIEditor.gridlist[1], row, 2, 200, 0, 0 ) end end; function addOnlinePlayer( player ) local data = getElementData( player, 'chatStatus' ) or 'Online' if ( data == 'Online' ) then local name = getPlayerName( player ) local r, g, b = getPlayerNametagColor( player ) local row = guiGridListAddRow( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, name, false, false ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 2, data, false, false ) guiGridListSetItemColor( GUIEditor.gridlist[1], row, 1, r, g, b ) guiGridListSetItemColor( GUIEditor.gridlist[1], row, 2, 0, 200, 0 ) end end; function addOfflinePlayer( player ) local data = getElementData( player, 'chatStatus' ) or 'Offline' if ( data == 'Offline' ) then local name = getPlayerName( player ) local r, g, b = getPlayerNametagColor( player ) local row = guiGridListAddRow( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, name, false, false ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 2, data, false, false ) guiGridListSetItemColor( GUIEditor.gridlist[1], row, 1, r, g, b ) guiGridListSetItemColor( GUIEditor.gridlist[1], row, 2, 200, 0, 0 ) end end; function player_Quit( player ) removePlayer( player ) destroyChattingWindow( player ) end; addEvent( 'onClientRemovePlayer', true ); addEventHandler( 'onClientRemovePlayer', root, player_Quit ) function player_ChangedName( player, name ) for i = 0, guiGridListGetRowCount( GUIEditor.gridlist[1] ) do if ( guiGridListGetItemText( GUIEditor.gridlist[1], i, 1 ) == name ) then guiGridListRemoveRow( GUIEditor.gridlist[1], i ) end end destroyChattingWindow( player ) setTimer( function( ) local Sel = guiComboBoxGetSelected( GUIEditor.combobox[1] ) if ( Sel == -1 ) then addPlayer( player ) return end if ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Online' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do if ( getElementData( player, 'chatStatus' ) == 'Online' ) then addOnlinePlayer( player ) end end elseif ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Offline' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do if ( getElementData( player, 'chatStatus' ) == 'Offline' ) then addOfflinePlayer( player ) end end elseif ( guiComboBoxGetItemText( GUIEditor.combobox[1], Sel ) == 'Both (All)' ) then guiGridListClear( GUIEditor.gridlist[1] ) for _, player in ipairs( getElementsByType( 'player' ) ) do addPlayer( player ) end end end, 1500, 1 ) end; addEvent( 'onClientRemovePlayer_ChangedName', true ); addEventHandler( 'onClientRemovePlayer_ChangedName', root, player_ChangedName ) function sendMessage( eleEdit ) local parent = getElementParent( source ) if ( parent == false or not parent ) then return end local player = getPlayerFromName( guiGetText( parent ) ) if ( player == false or not player ) then return end if ( eleEdit == chat_Windows[player].editBox ) then sendNewMessage( player ) end end; addEventHandler( 'onClientGUIAccepted', root, sendMessage ); addEventHandler( 'onClientResourceStart', resourceRoot, function( ) triggerServerEvent( 'onServerSetPlayerSerial', Cplayer ) setTimer( function( ) for _, player in ipairs( getElementsByType( 'player' ) ) do addPlayer( player ) end end, 1000, 1 ) end );
  10. اطرح اكواد الكلنت
  11. لاتتكلم خارج الموضوع كان بإمكانك تكلمني خاص . + مايمدي اخش الحين
  12. setGameType لازم سترنق انت حاطه تايمر . مايجي !
  13. can anyone help me ?
  14. هل يمكنك إعطائي سيرفر تجريبي 12 ساعه ثم أدفع ؟
  15. يمديك تسوي لوب على اللي انت مسويه . نفس الايديتور يسوي لك لوب اظن المهم اللي عليك تستعمل تحته الفنكشن وبس
  16. أتمنى منكم التفاهم .. بالخاص لخالد العمري رجع الموقع شغال بس طار السيرفر .. اتمنى تشوفوا حل .
  17. لآ سويتها له . مو كذا الطريقه هو يبيها على سلاح معين لككن الوظيفة ذي بالكلنت لازم تحط بها السلاح من createWeapon يعني خلاص تمت الإفاده .
  18. وشيل onPlayerWasted لان الارقمنت الاول مو لاعب .
  19. معليش بس . جاهز مابيجي مساعده فقط نقدم لك ... لكن لو ماعندك أي خبره برمجيه - ليه تفتح سيرفر من الأساس ؟ تعلم برمجه وحنا بنساعدك . لو كلامي زعلك اسف لكن ذي الحقيقه موفق
×
×
  • Create New...