Jump to content

طلب كود اظهار المال في الفري روم


Recommended Posts

بسم الله الرحمن الرحيم

السلام عليكم ورحمة الله وبركاتة ~

طلبي هو كود آظهار المال في الفري روم نفس البنق

وشرح المكان واذا كان نفس البنق مايحتاج شرح الاكواد بس ><

والسلآم عليكم ورحمة الله وبركاتة ~ فهد

Link to comment

الي فهمتة من الكود واللي لقيتة بس السيرفر ؟

اللي هوو النفكشن اللي يوضع بالسيرفر :

function checkMoney(thePlayer, command) 
    local money = getPlayerMoney(thePlayer)                                -- get the amount of money from the player who entered the command 
    if (money > 1000) then                                                 -- if money is more than 1000 
        outputChatBox("You are rich: " .. tostring(money), thePlayer)  -- output this message together with the money 
    else 
        outputChatBox("Poor guy...", thePlayer)                        -- and else, output this message 
    end 
end 
addCommandHandler("checkMoney", checkMoney)                

+

الكلنت مآلقيتة ><

Link to comment

>< الكود مايجي لبل مثل الاسم والبنق الاسم والبنق اضفتهم فوق الكيل >< ابي اضيف المآل >< بس مافهمت الكود صح >< يختلف عن الاسم والبنق الاسم والبنق

{'lbl', id='YourName', text = 'اسمكـ:'},

{'lbl', id='name', text='', width=150},

{'lbl', id='YourPing', text = 'بنقكـ:'},

{'lbl', id='ping', text='', width=45},

هذا فوق الازرار + المال يختلف ؟ >< لآني مآفهمت الكود ><

Link to comment

+ الكلنت حق الاسم والبنق :

  
function updatePing() 
    local ping = getPlayerPing(g_Me) 
    setControlText(wndMain, 'ping', ping ) 
    setControlText(wndMain, 'name', tostring(string.gsub(getPlayerName(g_Me),'#%x%x%x%x%x%x', ''))) 
end 
  

ذذ >< يختلف عن الفلوس :roll:

Link to comment

الأكواد منقوله من موضوع آخر الأكواد لـ سعد لاكن مع التعديل جرب هذا

----

أول شي تروح الى ازرار ال wndMain

تضيف فوق زر انتحار او kill

فوق هذا الزر

  
        {'btn', id='kill', onclick=killLocalPlayer}, 
  

تحط

  
        {'lbl', id='Your Money:'}, 
        {'lbl', id='Money', text='', width=45}, 
        {'br'}, 
  
  

كذا خلصنا من الأزار

---------------------------------------

يبقى لنا عمل الوظيفه

تطلع فوق تحط هذي الوظيفه

  
  
function updatePing() 
    local Money = getPlayerMoney(g_Me) 
    setControlText(wndMain, 'Money', Money ) 
end 
  
  
  

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

  
function mainWndShow() 
---تحطه هنا 
  

هذا اللي تحطه

  
    updateMoney = updateMoney or setTimer(updateMoney, 2000, 0) 
  

يصير كذا

  
  
function mainWndShow() 
    if not getPedOccupiedVehicle(g_Me) then 
        hideControls(wndMain, 'repair', 'flip', 'upgrades', 'color', 'paintjob', 'lightson', 'lightsoff') 
    end 
    updateTimer = updateTimer or setTimer(updateGUI, 2000, 0) 
    updateMoney = updateMoney or setTimer(updateMoney, 2000, 0)  ---اhere 
    updateGUI(true)  
end 
  

-----------------------

بعدها تدور على اسم الوظيفه ذي

  
function mainWndClose() 
---تحطه هنا 
  

هذا اللي تحطه

  
    killTimer(updateMoney) 
    updateMoney = nil 
  
  

يصير كذا

  
function mainWndClose() 
    killTimer(updateTimer) 
    updateTimer = nil 
    killTimer(updateMoney) ---here 
    updateMoney = nil ---here 
    colorPicker.closeSelect() 
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...