Jump to content

طلب شرح برمجه فري روم xX[شرح]Xx


Recommended Posts

برمجة الفري روم؟ هذي جديده!؟

من قالك ان الفري روم له برمجه خاصه؟

هي مجرد اكواد برمجيه ومستخدم طرق لوا عشان يسويها واغلبها من خلال الجداول والميتا تيبل, مافيه شي اسمه برمجة الفري روم!

Link to comment

هههههههههههههههههههههههههههه

شكلك تقصد برمجة الفري روم بطريقة سهلة

يعني

باستخدام useful functions

شوف يا حبيبي

تعلم البرمجة والأساسيات

وبرمج وصمم والشباب هنا ما يقصرون لا معي ولا معك

انا كمان مبتدأ وفي طريق التطور

بالتوفيق للجميع

Link to comment
guiCreateWindow 
guiCreateButton 
onClientGUIClick 
guiCreateGridList 
onClientDoubleGUIClick 
guiGridListSetItemText 
guiGridListGetItemData 
getElementPosition 
setElementPosition  
triggerServerEvent 
createVehicle 
--تنزل سيارة من القريد ليست 
guiCreateButton 
onClientGUIClick 
killPed 
--انتحار 
guiCreateButton 
onClientGUIClick 
guiCreateGridList 
onClientDoubleGUIClick 
guiGridListSetItemText 
guiGridListGetItemData 
setPedSkin 
--تأخذ سكين 
guiCreateButton 
onClientGUIClick 
guiCreateGridList 
onClientDoubleGUIClick 
guiGridListSetItemText 
guiGridListGetItemData 
giveWeapon 
--تاخذ سلاح 
guiCreateButton 
onClientGUIClick 
guiCreateGridList 
onClientDoubleGUIClick 
guiGridListSetItemText 
guiGridListGetItemData 
setPedAnimation 
--تغير الحركات 
guiCreateCheckBox 
givePedJetPack 
--تأخذ جت باك 
guiCreateButton 
onClientGUIClick 
guiCreateGridList 
onClientDoubleGUIClick 
guiGridListSetItemText 
guiGridListGetItemData 
setTime 
--تغير الوقت 
guiCreateButton 
onClientGUIClick 
guiCreateGridList 
onClientDoubleGUIClick 
guiGridListSetItemText 
guiGridListGetItemData 
setGameSpeed 
--تغير السرعة 
guiCreateButton 
onClientGUIClick 
guiCreateGridList 
onClientDoubleGUIClick 
guiGridListSetItemText 
guiGridListGetItemData 
setWeather 
--تغير الجو 
guiCreateButton 
onClientGUIClick 
fixVehicle 
--تصليح السيارة 
guiCreateCheckBox 
setTimeFrozen 
--ايقاف الوقت 

Link to comment

عادي سوي لك جداول وسوي اختصارات الموضوع مب صعب شوف كـ مثال انا ابي اغير اسماء الوظائف سويت كذا (كل واحد وطريقته طبعاً)ء

Funcs = { 
    ['setVisible'] = guiSetVisible, 
    ['setMovable'] = guiWindowSetMovable, 
    ['setProperty'] = guiSetProperty, 
} 
  
gui = {}; 
gui.__index = gui 
  
function gui:new( type, gui, ... ) 
    local g; 
    for k,v in pairs ( Funcs ) do 
        if k == type then 
            g = v 
        break 
        end 
    end 
        return g ( gui, unpack ( {...} ) ) 
end 
  
local button = guiCreateButton ( 200,200,70,70, 'Test', false ) 
  
addCommandHandler ( 'show', function( _, state ) 
    if state == 'false' then state = false else state = true end 
    gui:new ( 'setVisible', button, state ) 
end) 

واذا تبي الطريقه نفس حق الفري روم شوف طريقتي كيف سويتها؟

gui اول شي سويت جدول بـ وظايف الـ,

guiFunctions = { 
    ['wnd'] = guiCreateWindow, 
    ['btn'] = guiCreateButton, 
    ['lbl'] = guiCreateLabel, 
} 

بعدها راح استخدم جدول ثاني اللي هو حق النافذه او اللبل او الزر اللي بسويه زي كذا:

mainWindow = { 
    'wnd', 
    x = 200, 
    y = 200, 
    width = 100, 
    height = 200, 
    text = 'Test Window', 
    relative = false 
} 

للحين تمام ذولي مالهم اي فايده ! لازم نفعلهم نسوي وظيفه كذا :

gui = {}; 
gui.__index = gui 
  
  
function gui:create ( guiElem ) 
    if guiFunctions[guiElem[1]] then 
        return guiFunctions[guiElem[1]](guiElem.x, guiElem.y, guiElem.width, guiElem.height, guiElem.text, guiElem.relative ) 
    end 
end 

طيب كذا حلو الحين اللي باقي نستخدم الوظيفه كذا :

gui:create ( mainWindow ) 

بكذا سوينا زي طريقة الفري روم مع اختلاف بسيط قلت لك ذي طريقتي وعندك اكثر من طريقه تقدر تستخدمها وتحاول فيها , الاكواد كامله :

guiFunctions = { 
    ['wnd'] = guiCreateWindow, 
    ['btn'] = guiCreateButton, 
    ['lbl'] = guiCreateLabel, 
} 
  
mainWindow = { 
    'wnd', 
    x = 200, 
    y = 200, 
    width = 100, 
    height = 200, 
    text = 'Test Window', 
    relative = false 
} 
  
gui = {}; 
gui.__index = gui 
  
  
function gui:create ( guiElem ) 
    if guiFunctions[guiElem[1]] then 
        guiFunctions[guiElem[1]](guiElem.x, guiElem.y, guiElem.width, guiElem.height, guiElem.text, guiElem.relative ) 
    end 
end 
  
gui:create ( mainWindow ) 

ملاحظه : الأكواد غير مجربه .

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