Jump to content

تمت الافادة + عندي طلب بسيط ثاني


Rockyz

Recommended Posts

السلام عليكم

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

تدور وكذا

وابي طلب ثاني

شرح ال progress bar

+

كيف اخلي دائرة تتحرك اذا ال progress bar

يشتغل

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

Edited by Guest
Link to comment

هذآ ينشئ لكك دائرة بالدي أكس

أول شيء هذا الكود موب من فنكشات ام تي اي الأساسية

فـ اذا تبي تستخدمه حط ذا الكود آول السكربت آو في آي مكان

function dxDrawCircle( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI ) 
    if ( type( posX ) ~= "number" ) or ( type( posY ) ~= "number" ) then 
        return false 
    end 
  
    local function clamp( val, lower, upper ) 
        if ( lower > upper ) then lower, upper = upper, lower end 
        return math.max( lower, math.min( upper, val ) ) 
    end 
  
    radius = type( radius ) == "number" and radius or 50 
    width = type( width ) == "number" and width or 5 
    angleAmount = type( angleAmount ) == "number" and angleAmount or 1 
    startAngle = clamp( type( startAngle ) == "number" and startAngle or 0, 0, 360 ) 
    stopAngle = clamp( type( stopAngle ) == "number" and stopAngle or 360, 0, 360 ) 
    color = color or tocolor( 255, 255, 255, 200 ) 
    postGUI = type( postGUI ) == "boolean" and postGUI or false 
  
    if ( stopAngle < startAngle ) then 
        local tempAngle = stopAngle 
        stopAngle = startAngle 
        startAngle = tempAngle 
    end 
  
    for i = startAngle, stopAngle, angleAmount do 
        local startX = math.cos( math.rad( i ) ) * ( radius - width ) 
        local startY = math.sin( math.rad( i ) ) * ( radius - width ) 
        local endX = math.cos( math.rad( i ) ) * ( radius + width ) 
        local endY = math.sin( math.rad( i ) ) * ( radius + width ) 
  
        dxDrawLine( startX + posX, startY + posY, endX + posX, endY + posY, color, width, postGUI ) 
    end 
  
    return true 
end 

والويكي معطيك مثآل عليه

addEventHandler( "onClientRender", root,  
    function( ) 
        dxDrawCircle( 200, 200, 50, 5, 1, 0, 90 ) 
    end 
) 
Link to comment
ممكن توضح لي المود الي تبي تسويه ؟

مثلا

في ثلاثةة ايديت

واحد تخلي فيه الاختصار يعني مثل bind 5 say Hi

وواحد تخلي فيه الون للاختصار

وواحد تخلي فيه الزر للاختصار

ونسيت شي :lol:

زر حذف الاختصار

Link to comment

... والخ #FF0000 سويت لك اللوان الي هم

Client :

addEventHandler("onClientGUIClick",root, 
function() 
if ( source == اسم الزر ) then 
local bind = guiGetText(اسم ايدت الـ Bind) 
local say = guiGetText(اسم ايدت الـكلام) 
local color = guiGetText(اسم ايدت اللون) 
local playername = getPlayerName(localPlayer) 
if ( bind and say and color and playername ) then 
triggerServerEvent("Bind",localPlayer,bind,say,color,playername) 
end 
end 
end 
) 

Server :

addEvent("Bind",true) 
addEventHandler("Bind",root, 
function(bind,say,color,playername) 
bindKey(source,tostring(bind),"down", 
function() 
    outputChatBox ( " " .. playername .." :  " .. color .. " " .. say .. " ",root,255,255,255,true) 
end 
) 
end 
) 
  

Link to comment

... والخ #FF0000 سويت لك اللوان الي هم

Client :

addEventHandler("onClientGUIClick",root, 
function() 
if ( source == اسم الزر ) then 
local bind = guiGetText(اسم ايدت الـ Bind) 
local say = guiGetText(اسم ايدت الـكلام) 
local color = guiGetText(اسم ايدت اللون) 
local playername = getPlayerName(localPlayer) 
if ( bind and say and color and playername ) then 
triggerServerEvent("Bind",localPlayer,bind,say,color,playername) 
end 
end 
end 
) 

Server :

addEvent("Bind",true) 
addEventHandler("Bind",root, 
function(bind,say,color,playername) 
bindKey(source,tostring(bind),"down", 
function() 
    outputChatBox ( " " .. playername .." :  " .. color .. " " .. say .. " ",root,255,255,255,true) 
end 
) 
end 
) 
  

هذا outputChatBox

انا اقصد مثل ال Bind

Link to comment

Client :

addEventHandler("onClientGUIClick",root, 
function() 
if ( source == اسم الزر ) then 
local bind = guiGetText(اسم ايدت الـ Bind) 
local say = guiGetText(اسم ايدت الـكلام) 
local color = guiGetText(اسم ايدت اللون) 
local playername = getPlayerName(localPlayer) 
if ( bind and say and color and playername ) then 
triggerServerEvent("Bind",localPlayer,bind,say,color,playername) 
elseif ( bind == "7" and say == "" and color == "" ) then 
triggerServerEvent("7",localPlayer) 
end 
end 
end 
) 

Server :

addEvent("Bind",true) 
addEventHandler("Bind",root, 
function(bind,say,color,playername) 
bindKey(source,tostring(bind),"down", 
function() 
    outputChatBox ( " " .. playername .." :  " .. color .. " " .. say .. " ",root,255,255,255,true) 
end 
) 
end 
) 
  
  
local keyTable = { "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "mouse_wheel_up", "mouse_wheel_down", "arrow_l", "arrow_u", 
 "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", 
 "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", 
 "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "F1", "F2", "F3", "F4", "F5", 
 "F6", "F7", "F8", "F9", "F10", "F11", "F12", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", 
 "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" } 
  
addEvent("7",true) 
addEventHandler("7",root, 
function() 
    for _,i in ipairs(keyTable)do  
        for _,v in ipairs(getFunctionsBoundToKey(source,i))do  
            unbindKey(source,tostring(i),"down") 
        end 
    end 
end 
) 
Link to comment
Client :

addEventHandler("onClientGUIClick",root, 
function() 
if ( source == اسم الزر ) then 
local bind = guiGetText(اسم ايدت الـ Bind) 
local say = guiGetText(اسم ايدت الـكلام) 
local color = guiGetText(اسم ايدت اللون) 
local playername = getPlayerName(localPlayer) 
if ( bind and say and color and playername ) then 
triggerServerEvent("Bind",localPlayer,bind,say,color,playername) 
elseif ( bind == "7" and say == "" and color == "" ) then 
triggerServerEvent("7",localPlayer) 
end 
end 
end 
) 

Server :

addEvent("Bind",true) 
addEventHandler("Bind",root, 
function(bind,say,color,playername) 
bindKey(source,tostring(bind),"down", 
function() 
    outputChatBox ( " " .. playername .." :  " .. color .. " " .. say .. " ",root,255,255,255,true) 
end 
) 
end 
) 
  
  
local keyTable = { "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "mouse_wheel_up", "mouse_wheel_down", "arrow_l", "arrow_u", 
 "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", 
 "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", 
 "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "F1", "F2", "F3", "F4", "F5", 
 "F6", "F7", "F8", "F9", "F10", "F11", "F12", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", 
 "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" } 
  
addEvent("7",true) 
addEventHandler("7",root, 
function() 
    for _,i in ipairs(keyTable)do  
        for _,v in ipairs(getFunctionsBoundToKey(source,i))do  
            unbindKey(source,tostring(i),"down") 
        end 
    end 
end 
) 

اسف اذا تعبتك

مدري ذا الي ابيه او لا

لاكن بوضح لك اكثر

مثلا عندي زر Remove Bind

يكتب رقم الزر في ايديت ال bind

اذا ضغط زر Remove Bind

تنحذف كل الاختصارات الي فيه

يعني مثلا كتبت في زر bind رقم او زر 7 الخ ..

يحذف كل اختصار في رقم 7

او اذا كتبت z

تنمسح كل الاختصارات الي فيه

^_^

Link to comment

Client :

addEventHandler("onClientGUIClick",root, 
function() 
if ( source == اسم الزر ) then 
local bind = guiGetText(اسم ايدت الــ Bind) 
if ( bind ~= " " or bind ~= "") then 
triggerServerEvent("RemoveBind",localPlayer,bind) 
end 
end 
end 
) 

Server :

  
addEvent("RemoveBind",true) 
addEventHandler("RemoveBind",root, 
function(i) 
        for _,v in ipairs(getFunctionsBoundToKey(source,i))do  
            unbindKey(source,tostring(i),"down") 
        end 
    end 
) 
Link to comment
Client :
addEventHandler("onClientGUIClick",root, 
function() 
if ( source == زر الي يحذف ) then 
local bind = guiGetText(اسم ايدت الــ Bind) 
if ( bind ~= " " or bind ~= "") then 
triggerServerEvent("RemoveBind",localPlayer,bind) 
end 
end 
end 
) 

Server :

  
addEvent("RemoveBind",true) 
addEventHandler("RemoveBind",root, 
function(i) 
        for _,v in ipairs(getFunctionsBoundToKey(source,i))do  
            unbindKey(source,tostring(i),"down") 
        end 
    end 
) 

مشكوووور ماتقصر بس في مشكلة مالها علاقة ب الموضوع :D

اني اذا اضغط SELECT ALL مايتحدد كل شي

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