فتى تبوك Posted December 20, 2012 Share Posted December 20, 2012 السلام عليكم ورحمة الله وبركاته مساكم الله بالخير يالربع ياشباب انا ابي احط اسم السيرفر والكود مدري فيه غلط ولا لا guiSetText(ServerNam,"name server: "..getElementData(root, "ServerName")) addEventHandler("onResourceStart", resourceRoot, function() setElementData(root, "ServerName", getServerName()) end) Link to comment
TD[M]ER Posted December 20, 2012 Share Posted December 20, 2012 السلام عليكم ورحمة الله وبركاتهمساكم الله بالخير يالربع ياشباب انا ابي احط اسم السيرفر والكود مدري فيه غلط ولا لا guiSetText(ServerNam,"name server: "..getElementData(root, "ServerName")) addEventHandler("onResourceStart", resourceRoot, function() setElementData(root, "ServerName", getServerName()) end) --- server side addEvent("update",true) addEventHandler("update",root, function(client) local name = getServerName() triggerClientEvent(client,"update",name) end) -- client side addEvent("update",true) addEventHandler("update",root, function(name) guiSetText(اسم الليبل,"Server Name: " ..tostring(name).. "") end) Link to comment
فتى تبوك Posted December 20, 2012 Author Share Posted December 20, 2012 ماظبط حقك ياتدمير يابعدي Link to comment
кιηg-αвα∂у Posted December 20, 2012 Share Posted December 20, 2012 Client guiSetText(اسم اليبل,"Server Name : "..getElementData(root, "ServerName")) Server addEventHandler("onResourceStart", resourceRoot, function() setElementData(root, "ServerName", getServerName()) end) Link to comment
فتى تبوك Posted December 20, 2012 Author Share Posted December 20, 2012 Client guiSetText(اسم اليبل,"Server Name : "..getElementData(root, "ServerName")) Server addEventHandler("onResourceStart", resourceRoot, function() setElementData(root, "ServerName", getServerName()) end) ناسخ الكود الي حاطه انا Link to comment
|Mr|-Talal07-| Posted December 20, 2012 Share Posted December 20, 2012 جرب ذا -- Client Side addEventHandler("onClientResourceStart",resourceRoot, function () setTimer(guiSetText,1000,1,LabelName,"Server Name : " .. getElementData(localPlayer,"ServerName")) end ) -- Server Side addEventHandler("onResourceStart",resourceRoot, function () for i,v in ipairs(getElementsByType("player")) do setElementData(v,"ServerName",getServerName()) end end ) addEventHandler("onPlayerJoin",root, function () setElementData(source,"ServerName",getServerName()) end ) Link to comment
فتى تبوك Posted December 20, 2012 Author Share Posted December 20, 2012 جرب ذا -- Client Side addEventHandler("onClientResourceStart",resourceRoot, function () setTimer(guiSetText,1000,1,LabelName,"Server Name : " .. getElementData(localPlayer,"ServerName")) end ) -- Server Side addEventHandler("onResourceStart",resourceRoot, function () for i,v in ipairs(getElementsByType("player")) do setElementData(v,"ServerName",getServerName()) end end ) addEventHandler("onPlayerJoin",root, function () setElementData(source,"ServerName",getServerName()) end ) ماظبط Link to comment
iPrestege Posted December 20, 2012 Share Posted December 20, 2012 (edited) جرب كود طلآل اللي فوق ^ Edited December 20, 2012 by Guest Link to comment
|Mr|-Talal07-| Posted December 20, 2012 Share Posted December 20, 2012 طيب جرب ذا اذا ما اشتغل عندك خطاا label وغير الى اسم الابل -- Client Side -- addEventHandler("onClientResourceStart",resourceRoot, function () triggerServerEvent("onGetServerName",localPlayer) end ) addEvent("onGetted",true) addEventHandler("onGetted",root, function (name) guiSetText(label,"Server Name : " .. name) end ) -- Server Side -- addEvent("onGetServerName",true) addEventHandler("onGetServerName",root, function () local name = getServerName() triggerClientEvent(source,"onGetted",source,name) end ) Link to comment
abu5lf Posted December 20, 2012 Share Posted December 20, 2012 جرب ذا -- Client Side addEventHandler("onClientResourceStart",resourceRoot, function () setTimer(guiSetText,1000,1,LabelName,"Server Name : " .. getElementData(localPlayer,"ServerName")) end ) -- Server Side addEventHandler("onResourceStart",resourceRoot, function () for i,v in ipairs(getElementsByType("player")) do setElementData(v,"ServerName",getServerName()) end end ) addEventHandler("onPlayerJoin",root, function () setElementData(source,"ServerName",getServerName()) end ) كل مايدخل لاعب تجيب اسم السيرفر (: Link to comment
|Mr|-Talal07-| Posted December 20, 2012 Share Posted December 20, 2012 جرب ذا -- Client Side addEventHandler("onClientResourceStart",resourceRoot, function () setTimer(guiSetText,1000,1,LabelName,"Server Name : " .. getElementData(localPlayer,"ServerName")) end ) -- Server Side addEventHandler("onResourceStart",resourceRoot, function () for i,v in ipairs(getElementsByType("player")) do setElementData(v,"ServerName",getServerName()) end end ) addEventHandler("onPlayerJoin",root, function () setElementData(source,"ServerName",getServerName()) end ) كل مايدخل لاعب تجيب اسم السيرفر (: طيب االاعب اذا دخل يسير له داتا لاسم السيرفر في مشكلة Link to comment
./BlackBird# Posted December 20, 2012 Share Posted December 20, 2012 guiSetText(ServerNam,"name server: "..getElementData(resourceRoot, "ServerName")) addEventHandler("onResourceStart", resourceRoot, function() setElementData(resourceRoot, "ServerName", getServerName()) end) Link to comment
3NAD Posted December 20, 2012 Share Posted December 20, 2012 -- Server Side addEvent ( "WhatIsTheServerName", true ) addEventHandler ( "WhatIsTheServerName", root, function ( ) ServerName = getServerName ( ) or "N/A" triggerClientEvent ( source, "onGetServerName", source, ServerName ) end ) -- Client Side triggerServerEvent ( "WhatIsTheServerName", localPlayer ) addEvent ( "onGetServerName", true ) addEventHandler ( "onGetServerName", root, function ( theName ) if theName then guiSetText ( ServerNam, "name server: ".. tostring ( theName ) ) end end ) Link to comment
فتى تبوك Posted December 20, 2012 Author Share Posted December 20, 2012 يعطيك العافيه اخوي عناد عرفت المشكله وتم الحل رحت لسطر 1272 لقيت كود مدري منين جا ومسحته وظبط بيض الله وجهك يابعد حيي Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now