Jump to content

طلب كود


Recommended Posts

getAccountName 

ذه كامل ؟

طب بص

عايز تعديل على الكود ذه

#Client

  
guiSetText(Account,"Your Account : "..acc,triggerServerEvent("accountya",localPlayer)) 

#Server

addEvent ("accountya",true) 
addEventHandler("accountya",root, 
function() 
local acc = getPlayerAccount(source) 
end) 

Link to comment
addEvent ("accountya",true) 
addEventHandler("accountya",root, 
function(acc) 
guiSetText(Account,"Your Account : "..acc.."  ") 
  
end 
  
  
) 
  
 ---------------------------------------------------- 
  
function() 
local acc = getAccountName(getPlayerAccount(source)) 
  
triggerClientEvent("accountya",source,acc) 
  
end 

Link to comment

^ كودك خطأ .

-- Client Side # 
addEventHandler( 'onClientResourceStart', resourceRoot, function ( ) 
    triggerServerEvent ( 'getAccount', localPlayer ) 
end) 
  
addEvent ( 'setAccount', true ) 
addEventHandler ( 'setAccount', root, function( acc ) 
    guiSetText ( Account, acc ) 
end) 

-- Server Side # 
addEvent ( 'getAccount', true ) 
addEventHandler ( 'getAccount', root, function ( ) 
    if getPlayerAccount ( client ) and not isGuestAccount ( getPlayerAccount ( client ) ) then 
        triggerClientEvent ( client, 'setAccount', client, getAccountName ( getPlayerAccount ( client ) ) ) 
        end 
    end 
) 
Edited by Guest
Link to comment

لأن ما يمديك تحطها بالكلينت, انا حطيتها بالتريقر ف السيرفر وارسلتها للكلينت

triggerClientEvent ( client, 'setAccount', client, getAccountName ( getPlayerAccount ( client ) ) )

addEventHandler ( 'setAccount', root, function( acc )

acc اذا ارسلت شي من السيرفر للكلينت او العكس, يجي زي البرامتر داخل الفنكشن مثل

Link to comment
^ كودك خطأ .

-- Client Side # 
addEventHandler( 'onClientResourceStart', resourceRoot, function ( ) 
    triggerServerEvent ( localPlayer, 'getAccount' ) 
end) 
  
addEvent ( 'setAccount', true ) 
addEventHandler ( 'setAccount', root, function( acc ) 
    guiSetText ( Account, acc ) 
end) 

-- Server Side # 
addEvent ( 'getAccount', true ) 
addEventHandler ( 'getAccount', root, function ( ) 
    if getPlayerAccount ( client ) and not isGuestAccount ( getPlayerAccount ( client ) ) then 
        triggerClientEvent ( client, 'setAccount', client, getAccountName ( getPlayerAccount ( client ) ) ) 
        end 
    end 
) 

سطر 3 بالكلنت عاكس الدنيا :mrgreen::mrgreen:

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