Jump to content

طلب تصحيح


yazan

Recommended Posts

سلام عليكم ودي تعديل على ذي تكتب رساله في ادت ططعل رساله في لوحه

توضيح اكثر الكونسل يكتب يكبس اف 2 يطلع له لوحه فيها ادت يكتب رساله و يكبس ارسال

ططلع للكل في لوحه

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]) 
  
function open() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
    guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) 
end 
bindKey("F12","down",open) 
  
          addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local Data = guiGetText ( GUIEditor_Edit[1] )       
            if Data ~= "" then 
                triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) 
            end 
    end) 

Link to comment
  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

وش مافهمت ولا شيء

==

تحديث #

جرب :

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]) 
  
function open() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
    guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) 
end 
bindKey("F12","down",open) 
  
 addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local Data = guiGetText ( GUIEditor_Edit[1] )       
            if Data ~= "" then 
                triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) 
                   end 
            end 
     end 
) 

Edited by Guest
Link to comment

ما في سيرفر هو لزم في بس ما عرفت اعمله

برستيج اقلك تكبس اف 12 و انت معك ادمنيه كونسل ططلع لوحه فيها ادت تكتب رساله في ادت و تكبس ارسال ترسل للجميع في لوحه رقم 2 و شوي و تختفي

Link to comment
  
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]) 
  
function open() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
    guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then  
end 
bindKey("F12","down",open) 
  
 addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local Data = guiGetText ( GUIEditor_Edit[1] )       
            if Data ~= "" then 
                triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) 
                   end 
            end 
     end 
) 
  

Edited by Guest
Link to comment
addEvent ( "onSendDataToALL", true ) 
addEventHandler ( "onSendDataToALL", root, 
    function ( Data ) 
        if tostring ( Data ) then 
            for _, v in ipairs ( getElementsByType ( "player" ) ) do 
                    outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) 
                end 
            end 
        end 
    end 
) 
  

ذا لكن مو عارف اطلع بل لوحه ولا اخفاء لها

Link to comment

مو عارف اعمل ارسل للوحه ولا اخفاء لها

الحين ذا كلنت و سيرفر

سيرفر

addEvent ( "onSendDataToALL", true ) 
addEventHandler ( "onSendDataToALL", root, 
    function ( Data ) 
        if tostring ( Data ) then 
            for _, v in ipairs ( getElementsByType ( "player" ) ) do 
                    outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) 
                end 
            end 
        end 
    end 
) 

كلنت

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]) 
  
function open() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
    guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
end 
bindKey("F12","down",open) 
  
 addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local Data = guiGetText ( GUIEditor_Edit[1] )       
            if Data ~= "" then 
                triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) 
                   end 
            end 
     end 
) 
  

Link to comment

جرب

addEvent ( "onSendDataToALL", true ) 
addEventHandler ( "onSendDataToALL", root, 
    function ( Data ) 
        if tostring ( Data ) and isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source) ), aclGetGroup ( "Admin" ) ) then 
            for _, v in ipairs ( getElementsByType ( "player" ) ) do 
                    outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) 
                    triggerClientEvent( getRootElement(), "setText", Data ) 
                end 
            end 
        end 
    end 
) 

  
  
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]) 
  
function open() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
    guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) 
bindKey("F12","down",open) 
  
 addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local Data = guiGetText ( GUIEditor_Edit[1] )       
            if Data ~= "" then 
                triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) 
                   end 
            end 
     end 
) 
  
addEvent("setText", true) 
addEventHandler("setText", root, 
function(Data) 
guiSetText("المكان الي تبي", Data) 
end) 
  

لاتنسى تغير السطر الي قبل الأخير في كيلنت

Link to comment
جرب
addEvent ( "onSendDataToALL", true ) 
addEventHandler ( "onSendDataToALL", root, 
    function ( Data ) 
        if tostring ( Data ) and isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source) ), aclGetGroup ( "Admin" ) ) then 
            for _, v in ipairs ( getElementsByType ( "player" ) ) do 
                    outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) 
                    triggerClientEvent( getRootElement(), "setText", Data ) 
                end 
            end 
        end 
    end 
) 

  
  
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]) 
  
function open() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
    guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) 
bindKey("F12","down",open) 
  
 addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local Data = guiGetText ( GUIEditor_Edit[1] )       
            if Data ~= "" then 
                triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) 
                   end 
            end 
     end 
) 
  
addEvent("setText", true) 
addEventHandler("setText", root, 
function(Data) 
guiSetText("المكان الي تبي", Data) 
end) 
  

لاتنسى تغير السطر الي قبل الأخير في كيلنت

rootElement = ?? > source -_-

Link to comment

عدلت الأخطاء الي في كودك

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]) 
  
function open() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
    guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) 
end 
    bindKey("F12","down",open) 
  
 addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local Data = guiGetText ( GUIEditor_Edit[1] )       
            if Data ~= "" then 
                triggerServerEvent ( "onSendDataToAll", getLocalPlayer(), Data ) 
                   end 
            end 
     end 
) 
  
addEvent("setText", true) 
addEventHandler("setText", root, 
function(v) 
guiSetText( المكان الي تبي, guiGetText(GUIEditor_Edit[1])) 
end) 

addEvent ( "onSendDataToAll", true ) 
addEventHandler ( "onSendDataToAll", root, 
    function ( Data ) 
        if tostring ( Data ) and isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source) ), aclGetGroup ( "Admin" ) ) then 
            for _, v in ipairs ( getElementsByType ( "player" ) ) do 
                    outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) 
                    triggerClientEvent( getRootElement(), "setText", v ) 
                end 
            end 
        end 
) 

ملاحضة:

انا جربته وشغال بس انت عدل المكان الي تبي تحط فيه الكلام

Link to comment

لم يتم التجربة

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

Link to comment

-- Server --

تعديل بسيط على كود عناد فية خطأ في الحساب ذذ

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 
            outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, root, 225, 0, 0, true ) 
        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 
) 
  

جرب

Link to comment

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