Jump to content

3NAD

Members
  • Posts

    1,992
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by 3NAD

  1. 3NAD

    About ' MTA Wiki '.

    Thank you. i Created a page, but how can i add lua code ?
  2. Hello, How can i add a lua code at MTA Wiki / Useful functions ?
  3. فيها تأثير سحري ..
  4. -- Server Side aOpen_ = function ( plr_ ) local plrAccount = getPlayerAccount ( plr_ ) if not isGuestAccount ( plrAccount ) then if isObjectInACLGroup ("user."..getAccountName ( plrAccount ), aclGetGroup ( "Console" ) ) then triggerClientEvent ( plr_, "OpenWindow", plr_ ) end end end for _, v in ipairs (getElementsByType ( "player" ) ) do bindKey ( v, "f2", "down", aOpen_ ) end addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "f2", "down", aOpen_ ) end ) -- Client Side addEvent ( "OpenWindow", true ) addEventHandler ( "OpenWindow", root, function ( ) if not guiGetVisible(theWindow) then guiSetVisible(theWindow, true) showCursor(true) else guiSetVisible(theWindow, false) showCursor(false) end end )
  5. @ AboShanab ^ ذذذذذذذذذذ مضضيع الحبيب هو طلب عرض الدم والدرع مهوب شراء ..
  6. وظيفة تغيير قيَم القريد لست إلى أسماء اللاعبين .. changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; -- end of ' function ' مثآل : wnd = guiCreateWindow ( 100, 100, 400, 400, "Test", false ); -- Create Window grid = guiCreateGridList ( 25, 30, 350, 350, false, wnd ); -- Create Gridlist col = guiGridListAddColumn ( grid, "Players", 0.9 ); -- Create Column changeGridListItemToPlayersName ( grid, col ); -- Set Gridlist Values
  7. ورني كودك كلنت
  8. -- Client Side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) Label = guiCreateLabel(67,29,306,37,"",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) addEvent ( "onOpenDataWindow", true ) addEventHandler ( "onOpenDataWindow", root, function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible( GUIEditor_Window[1] ) ) end ) addEventHandler ( "onClientGUIClick", root, function ( ) if source == GUIEditor_Button[1] then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data == "" then return end triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end ) addEvent ( "onSendDataToPlayers", true ) addEventHandler ( "onSendDataToPlayers", root, function ( name, data ) guiSetText ( Label, "["..name.."] : "..data ) end ) -- Server Side aOpen_ = function ( plr_ ) local plrAccount = getPlayerAccount ( plr_ ) if not isGuestAccount ( plrAccount ) then if isObjectInACLGroup ("user."..getAccountName ( plrAccount ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( plr_, "onOpenDataWindow", plr_ ) end end end addEvent ( "onSendDataToAll", true ) addEventHandler ( "onSendDataToAll", root, function ( Data ) if tostring ( Data ) then triggerClientEvent ( root, "onSendDataToPlayers", root, getPlayerName(source), Data ) end end ) for _, v in ipairs (getElementsByType ( "player" ) ) do bindKey ( v, "f12", "down", aOpen_ ) end addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "f12", "down", aOpen_ ) end )
  9. هي راح تسبب لاق لأنه راح يسوي تريقر في اقل من الثانية ذذ
  10. لم يتم التجربة .. -- Server Side setPlayerData_ = function ( player ) setElementData ( player, "playerIP", getPlayerIP ( player ) or "N/A" ) end for i, v in next, getElementsByType ( "player" ) do setPlayerData_ ( v ) end addEventHandler ( "onPlayerJoin", root, function ( ) setPlayerData_ ( source ) end ) -- Client Side guiSetText ( GUIEditor.label[9], getElementData ( localPlayer, "playerIP" ) ) -- حطه مع وظيفة فتح النافذة
  11. 3NAD

    help

    زايد end الكود صحيح بس عندك
  12. https://wiki.multitheftauto.com/wiki/OnC ... oxAccepted
  13. لووول الأكواد جته جاهزة مو صعب عليه يبدل سطر واحد
  14. -- Client Side Wnd = guiCreateWindow ( 241,515,317,120, "No Subject", false ) On = guiCreateButton ( 70,30,50,50, "On", false, Wnd ) Off = guiCreateButton ( 10,30,50,50, "Off", false, Wnd ) addEventHandler ( "onClientGUIClick", root, function ( ) if source == On then triggerServerEvent ( "onChangeNameValue", localPlayer, localPlayer, "on" ) elseif source == Off then triggerServerEvent ( "onChangeNameValue", localPlayer, localPlayer, "off" ) end end ) -- Server Side local name = "name" local time = 30 local timer = {} local disable = {} addEvent ( "onChangeNameValue", true ) addEventHandler ( "onChangeNameValue", root, function ( player, value ) if value == "on" then if disable [ player ] then return end addEventHandler ( "onPlayerChat", root, mute ) outputChatBox ( getPlayerName ( player ).." is busy", root, 255, 0, 0, true ) disable [ player ] = true else if not disable [ player ] then return end removeEventHandler ( "onPlayerChat", root, mute ) outputChatBox ( getPlayerName ( player ).." is is Available", root, 255, 255, 0, true ) disable [ player ] = false end end ) function mute ( msg, type ) if type == 0 then if string.find ( msg, name ) then setPlayerMuted ( source, true ) outputChatBox ( "* You Are Muted For " .. time .. " sec.", source, 255, 0, 0, true ) timer [source] = setTimer ( endMute, time * 1000, 1, source ) end end end function endMute ( player ) if player and getElementType ( player ) == "player" then setPlayerMuted ( player, false ) outputChatBox ( "* You Can Talk Now", player, 0, 255, 0, true ) end end addEventHandler ( "onPlayerQuit", root, function ( ) if isTimer ( timer [source] ) then killTimer ( timer [source] ) end end )
  15. -- Client Side Wnd = guiCreateWindow ( 241,515,317,120, "No Subject", false ) On = guiCreateButton ( 70,30,50,50, "On", false, Wnd ) Off = guiCreateButton ( 10,30,50,50, "Off", false, Wnd ) addEventHandler ( "onClientGUIClick", root, function ( ) if source == On then triggerServerEvent ( "onChangeNameValue", localPlayer, localPlayer, "on" ) elseif source == Off then triggerServerEvent ( "onChangeNameValue", localPlayer, localPlayer, "off" ) end end ) -- Server Side local name = "name" local time = 30 local timer = {} addEvent ( "onChangeNameValue", true ) addEventHandler ( "onChangeNameValue", root, function ( player, value ) if value == "on" then addEventHandler ( "onPlayerChat", root, mute ) outputChatBox ( getPlayerName ( player ).." is busy", root, 255, 0, 0, true ) else removeEventHandler ( "onPlayerChat", root, mute ) outputChatBox ( getPlayerName ( player ).." is is Available", root, 255, 255, 0, true ) end end ) function mute ( msg, type ) if type == 0 then if string.find ( msg, name ) then setPlayerMuted ( source, true ) outputChatBox ( "* You Are Muted For " .. time .. " sec.", source, 255, 0, 0, true ) timer [source] = setTimer ( endMute, time * 1000, 1, source ) end end end function endMute ( player ) if player and getElementType ( player ) == "player" then setPlayerMuted ( player, false ) outputChatBox ( "* You Can Talk Now", player, 0, 255, 0, true ) end end addEventHandler ( "onPlayerQuit", root, function () if isTimer ( timer [source] ) then killTimer ( timer [source] ) end end )
  16. aOpen_ = function ( plr_ ) local plrAccount = getPlayerAccount ( plr_ ) if plrAccount and not isGuestAccount ( plrAccount ) then if isObjectInACLGroup ("user."..getAccountName ( plrAccount ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( plr_, "onOpenDataWindow", plr_ ) end end end فقط ذذ and كان ناقص
  17. لم يتم التجربة aImage = { } addEventHandler ( "onClientGUIClick", root, function ( ) if source == Button then if aImage [ img ] then local img = guiStaticImageLoadImage ( wnd, "1.png" ) aImage [ img ] = false else local img = guiStaticImageLoadImage ( wnd, "2.png" ) aImage [ img ] = true end end end )
  18. لم يتم التجربة -- Client Side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) addEvent ( "onOpenDataWindow", true ) addEventHandler ( "onOpenDataWindow", root, function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible( GUIEditor_Window[1] ) ) end ) addEventHandler ( "onClientGUIClick", root, function ( ) if source == GUIEditor_Button[1] then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data == "" then return end triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end ) -- Server Side for _, v in ipairs ( getElementsByType ( "player" ) ) do bindKey ( v, "f12", "down", aOpen_ ) end addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "f12", "down", aOpen_ ) end ) aOpen_ = function ( plr_ ) local plrAccount = getPlayerAccount ( plr_ ) if plrAccount not isGuestAccount ( plrAccount ) then if isObjectInACLGroup ("user."..getAccountName ( plrAccount ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( plr_, "onOpenDataWindow", plr_ ) end end end addEvent ( "onSendDataToAll", true ) addEventHandler ( "onSendDataToAll", root, function ( Data ) if tostring ( Data ) then outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, root, 225, 0, 0, true ) end end )
  19. resourcePassword مو صعب على شخص برمج لوحة ادمنية كاملة ان يسوي لوحة صغيرة تضع فيها باسورد المود . ( إن وجد في المود كود و ايضاً هي تقدر تجتاز خانة الباس بسهولة لأن حتى عند تشفير المود تبقى النصوص ظاهرة
  20. local name = getServerName ( ) function onStart ( rss ) if name == "اسم السيرفر" then outputChatBox ( "welcome to server"..name, root, 255, 255, 0, true ) else deleteResource ( getResourceName ( rss ) ) end end addEventHandler ( "onResourceStart", resourceRoot, onStart ) وتقدر تسوي شرط عن اسم المود addEventHandler ( "onResourceStart", resourceRoot, function ( rss ) if getResourceName ( rss ) ~= "اسم المود" then -- anything end end )
  21. إذا كان قصدك تبي تحمي المود من السرقة فيه طريقة ثانية اذا ماكان اسم السيررفر مطابق يطفي المود local name = getServerName ( ) function onStart ( ) if name == "اسم السيرفر" then outputChatBox ( "welcome to server"..name, root, 255, 255, 0, true ) else cancelEvent ( ) end end addEventHandler ( "onResourceStart", resourceRoot, onStart )
×
×
  • Create New...