Jump to content

طلب كود


Adham

Recommended Posts

Posted

سلام عليكم انا عامل مود

وعامل ايديت

عامل button

عاوز اليكتب في الايديت مثلن

ادهم محمد ويضعط OK

يظهر الكلام العملو في الاديت يظهر في الشات

يعني مثلن انا عامل ايديت وكتبت فيه ادهم محمد وضعط علي ال BUTTOn

يظهر الكلام الكتبتو في الشات

Posted

كدا فيه خطا؟

addEventHandler ( "onClientGUIClick", resourceRoot,function () 
if ( source == OK ) then 
outputChatBox(" "..if guiGetText(edit).." ", 255, 0, 0) 
end 
end) 

Posted
كدا فيه خطا؟
addEventHandler ( "onClientGUIClick", resourceRoot,function () 
if ( source == OK ) then 
outputChatBox(" "..if guiGetText(edit).." ", 255, 0, 0) 
end 
end) 

addEventHandler ( "onClientGUIClick", resourceRoot,function () 
if ( source == OK ) then 
outputChatBox(" "..guiGetText(edit).." ", 255, 0, 0) 
end 
end) 

ال if كانت زياده

Posted

وين الخطا هنا مف تفتح اللوحة اصلن

GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(193, 156, 434, 240, ":: OutButChat Box ::", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1], false) 
        GUIEditor.label[1] = guiCreateLabel(26, 78, 154, 24, "in OutButChat Box :", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        edit = guiCreateEdit(139, 76, 276, 26, "", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(24, 155, 146, 40, "Start", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(221, 155, 146, 40, "X", false, GUIEditor.window[1])     
 end  
) 
  
  
  
  
function Strong ( )   
guiSetVisible ( GUIEditor.window[1],true )  
showCursor ( true ) -- اظهار الماوس  
end  
addCommandHandler ( "Test",Strong )  
  
  
  
  
addEventHandler ( "onClientGUIClick", resourceRoot,function () 
if ( source == GUIEditor.button[1] ) then 
outputChatBox(" "..guiGetText(edit).." ", 255, 0, 0) 
end 
end) 
  

Posted
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
  
        GUIEditor.window[1] = guiCreateWindow(193, 156, 434, 240, ":: OutButChat Box ::", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1], false) 
        GUIEditor.label[1] = guiCreateLabel(26, 78, 154, 24, "in OutButChat Box :", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        edit = guiCreateEdit(139, 76, 276, 26, "", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(24, 155, 146, 40, "Start", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(221, 155, 146, 40, "X", false, GUIEditor.window[1])     
  
  
  
  
addCommandHandler("Test", 
function ()   
guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) 
showCursor(guiSetVisible(GUIEditor.window[1])) 
end 
) 
  
  
  
  
addEventHandler ( "onClientGUIClick", resourceRoot,function () 
if ( source == GUIEditor.button[1] ) then 
outputChatBox(" "..guiGetText(edit).." ", 255, 0, 0) 
end 
end) 
  

جرب

Posted

طيب فيه مشكله

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

عاوز ميجيش كلام بالشات

فاضي كلام كدا

Posted

addEventHandler ( "onClientGUIClick", resourceRoot,function () 
if ( source == GUIEditor.button[1] ) then 
if guiGetText(edit) ~= '' then 
outputChatBox(" "..guiGetText(edit).." ", 255, 0, 0) 
end 
end 
end) 
Posted
addEventHandler ( "onClientGUIClick", resourceRoot,function () 
if ( source == GUIEditor.button[1] ) then 
if guiGetText(edit) ~= '' then 
outputChatBox(" "..guiGetText(edit).." ", 255, 0, 0) 
end 
end 
end) 

بس هاي الكود يخلي الكلام يظهر للاعب فقط اعتقد هو يبيه للسيرفر كله

Posted

طيب معلش ممكن طلب؟

عاوز لما يكتب شي بالايديت وضعط علي الزر

يتمسح الكتوب بالايديت

Posted
  
addEventHandler ( "onClientGUIClick", resourceRoot,function () 
local Sdit = guiGetText(edit) 
if ( source == GUIEditor.button[1] ) then 
if Sdit ~= ' ' then 
triggerServerEvent("Out", localPlayer, Sdit) 
setTimer ( guiSetText, 1000, 1, edit, "" ) 
end 
end 
end) 
  

server

  
addEvent("Out",true) 
addEventHandler("Out", root, 
function ( Sdit ) 
outputChatBox(" "..Sdit.." ", 255, 0, 0) 
end 
) 
  

Posted

ما طلع في الشات

كلنت

addEventHandler ( "onClientGUIClick", resourceRoot,function () 
local Sdit = guiGetText(edit) 
if ( source == GUIEditor.button[1] ) then 
if GUIEditor.edit[1] ~= '' then 
triggerServerEvent("Out", localPlayer, GUIEditor.edit[1]) 
guiSetText(GUIEditor.edit[1], " ") 
end 
end 
end) 

سرفر

addEvent("Out",true) 
addEventHandler("Out", root, 
function ( GUIEditor.edit[1] ) 
outputChatBox(" "..GUIEditor.edit[1].." ", 255, 0, 0) 
end 
) 
  

Posted
طيب معلش ممكن طلب؟

عاوز لما يكتب شي بالايديت وضعط علي الزر

يتمسح الكتوب بالايديت

addEventHandler("onClientGUIClick",root, 
function () 
if guiGetText(edit) ~= '' then 
if source == اسم البوتون then 
guiSetText(edit,) 
end 
end 
end 
) 

جرب هاي الكود للمسح

Posted
ما طلع في الشات

كلنت

addEventHandler ( "onClientGUIClick", resourceRoot,function () 
local Sdit = guiGetText(edit) 
if ( source == GUIEditor.button[1] ) then 
if GUIEditor.edit[1] ~= '' then 
triggerServerEvent("Out", localPlayer, GUIEditor.edit[1]) 
guiSetText(GUIEditor.edit[1], " ") 
end 
end 
end) 

سرفر

addEvent("Out",true) 
addEventHandler("Out", root, 
function ( GUIEditor.edit[1] ) 
outputChatBox(" "..GUIEditor.edit[1].." ", 255, 0, 0) 
end 
) 
  

ما اشتغل لانك غيرت اسم الايديت

انقل الكود صح

Posted
ما طلع في الشات

كلنت

addEventHandler ( "onClientGUIClick", resourceRoot,function () 
local Sdit = guiGetText(edit) 
if ( source == GUIEditor.button[1] ) then 
if Sdit ~= '' then 
triggerServerEvent("Out", localPlayer, GUIEditor.edit[1]) 
guiSetText(GUIEditor.edit[1], " ") 
end 
end 
end) 

سرفر

addEvent("Out",true) 
addEventHandler("Out", root, 
function ( GUIEditor.edit[1] ) 
outputChatBox(" "..GUIEditor.edit[1].." ", 255, 0, 0) 
end 
) 
  

كلنت

addEventHandler ( "onClientGUIClick", resourceRoot,function () 
local Sdit = guiGetText(GUIEditor.edit[1]) 
if ( source == GUIEditor.button[1] ) then 
if Sdit ~= '' then 
triggerServerEvent("Out", localPlayer, Sdit) 
guiSetText(GUIEditor.edit[1], " ") 
end 
end 
end) 

سرفر

addEvent("Out",true) 
addEventHandler("Out", root, 
function ( Sdit ) 
outputChatBox(" "..Sdit.." ", 255, 0, 0) 
end 
) 
  

Posted

addEventHandler ( "onClientGUIClick", resourceRoot,function () 
    if ( source == GUIEditor.button[1] ) then 
        local Sdit = guiGetText(edit) 
        if Sdit ~= '' then 
            triggerServerEvent("Out", localPlayer, Sdit) 
            setTimer(function () guiSetText(edit, " ")  end,600,1) 
        end 
    end 
end) 

addEvent("Out",true) 
addEventHandler("Out", root, 
function ( msg ) 
    outputChatBox(getPlayerName(client)..": "..msg.." ",root, 255, 0, 0) 
end 
) 

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