Jump to content

سأعدوني مشكله ^_


RdX

Recommended Posts

client side

  
Moneystats = guiCreateLabel(200,120,150,16,"",false,statswin) 
    guiSetFont(Moneystats,"default-bold-small") 
addEventHandler ( "onClientGUIClick", resourceRoot, 
    function (  ) 
        if ( source == gridOnlinePlayers ) then 
            local select = guiGridListGetItemText ( source, guiGridListGetSelectedItem ( source ), 1 ); 
            if ( select and select ~= "" ) then 
                triggerServerEvent ( "getMoney", localPlayer, select ); 
            end 
        end 
    end 
); 
  
addEvent ( "SetMoneyInLabel", true ); 
addEventHandler ( "SetMoneyInLabel", root, 
    function ( money ) 
        guiSetText ( Moneystats, "Money : " .. money ); 
    end 
); 
  

Link to comment

server side

  
addEvent ( "getMoney", true ); 
addEventHandler ( "getMoney", root, 
    function ( select ) 
        local gPlayer = getPlayerFromName ( select); 
        if gPlayer == false then return end 
        local pMoney = getPlayerMoney ( gPlayer ); 
        triggerClientEvent ( source, "SetMoneyInLabel", source, pMoney ); 
    end 
); 
  

Link to comment
addEvent ( "SetMoneyInLabel", true ); 
addEventHandler ( "SetMoneyInLabel", root, 
    function ( money ) 
   addEventHandler("onClientRender" , root , CheckMoney) 
    end 
  
function CheckMoney () 
        guiSetText ( Moneystats, "Money : " .. money ) 
    end 
  

..........................................?

Link to comment

  
gridOnlinePlayers = guiCreateGridList(20,90,172,280,false,statswin) 
    guiGridListSetSortingEnabled(gridOnlinePlayers, false) 
    column = guiGridListAddColumn(gridOnlinePlayers,"Name",0.9) 
    for _,player in ipairs(getElementsByType("player")) do 
        local row = guiGridListAddRow (gridOnlinePlayers) 
      guiGridListSetItemText(gridOnlinePlayers,row,1,string.gsub (getPlayerName(localPlayer), "#%x%x%x%x%x%x",""),false,false) 
    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...