Guest Posted November 3, 2018 Share Posted November 3, 2018 شباب بدي أسوي dxDrawText لما اللاعب يدخل السيرفر و تروح لما اللااعب ينزل يلعب بعد ما يسوي تسجيل دخول Link to comment
^iiEcoo'x_) Posted November 3, 2018 Share Posted November 3, 2018 -- #Client 'onClientPlayerJoin' 'onClientRender' addEventHandler removeEventHandler -- #Server 'onPlayerLogin' triggerClientEvent Link to comment
Guest Posted November 4, 2018 Share Posted November 4, 2018 (edited) local screenW, screenH = guiGetScreenSize() addEvent( "onLogin", true ) function dxdraw () dxDrawText("رسالتي", (screenW - 496) / 2, (screenH - 79) / 2, ((screenW - 496) / 2) + 496, ( (screenH - 79) / 2) + 79, tocolor(255, 255, 255, 255), 1.20, "bankgothic", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender",root,dxdraw) addEventHandler( "onLogin", localPlayer, dxdraw ) سيرفر سايد: function renderit () triggerClientEvent ( source, "onLogin" ) end addEventHandler("onPlayerLogin",root,renderit) Edited November 4, 2018 by Guest Link to comment
Guest Posted November 4, 2018 Share Posted November 4, 2018 ليش مو شغال؟ ضفت removeEventHandler Link to comment
#\_oskar_/# Posted November 4, 2018 Share Posted November 4, 2018 اذا تقصد يظهر الكلام وهو عنده تحميل استخدم textCreateTextItem الفنكشن سيرفر Link to comment
Guest Posted November 4, 2018 Share Posted November 4, 2018 أنا بدي على أول ما اللاعب يدخل اول شي تجيه هذيك الرسالة Link to comment
#7k[A,]yH_,) Posted November 4, 2018 Share Posted November 4, 2018 3 minutes ago, Scarfas said: أنا بدي على أول ما اللاعب يدخل اول شي تجيه هذيك الرسالة onPlayerJoin Link to comment
Guest Posted November 4, 2018 Share Posted November 4, 2018 function renderit () triggerClientEvent ( source, "onLogin" ) removeEventHandler("onClientRender",root,dxdraw) end addEventHandler("onPlayerLogin",root,renderit) addEventHandler("onPlayerJoin",root,renderit) addEvent( "onLogin", true ) local screenW, screenH = guiGetScreenSize() function dxdraw () dxDrawText("text", (screenW - 496) / 2, (screenH - 79) / 2, ((screenW - 496) / 2) + 496, ( (screenH - 79) / 2) + 79, tocolor(255, 255, 255, 255), 1.20, "bankgothic", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender",root,dxdraw) addEventHandler( "onLogin", localPlayer, dxdraw ) مو شغاال Link to comment
#7k[A,]yH_,) Posted November 4, 2018 Share Posted November 4, 2018 function renderit () triggerClientEvent ( source, "onLogin" ) removeEventHandler("onClientRender",root,dxdraw) end addEventHandler("onPlayerLogin",root,renderit) addEvent( "onLogin", true ) local screenW, screenH = guiGetScreenSize() function dxdraw () dxDrawText("text", (screenW - 496) / 2, (screenH - 79) / 2, ((screenW - 496) / 2) + 496, ( (screenH - 79) / 2) + 79, tocolor(255, 255, 255, 255), 1.20, "bankgothic", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender",root,dxdraw) addEventHandler( "onLogin", localPlayer, dxdraw ) Link to comment
Guest Posted November 4, 2018 Share Posted November 4, 2018 ؟؟؟؟؟؟؟؟ فهمت إيش بدي اسوي؟ Link to comment
Guest Posted November 4, 2018 Share Posted November 4, 2018 addEvent( "onLogin", true ) local screenW, screenH = guiGetScreenSize() function dxdraw () dxDrawText("text", (screenW - 496) / 2, (screenH - 79) / 2, ((screenW - 496) / 2) + 496, ( (screenH - 79) / 2) + 79, tocolor(255, 255, 255, 255), 1.20, "bankgothic", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender",root,dxdraw) addEventHandler( "onLogin", dxdraw ) addEventHandler( "onClientPlayerJoin",dxdraw) function renderit () triggerClientEvent ( source, "onLogin" ) removeEventHandler("onClientRender",root,dxdraw) end 4 hours ago, Scarfas said: أنا بدي على أول ما اللاعب يدخل اول شي تجيه هذيك الرسالة أنت قلت لما يدخل اللاعب .. ومسوي حدث لما يسجل بتظهر . جرب الكود فوق ! Link to comment
#\_oskar_/# Posted November 5, 2018 Share Posted November 5, 2018 كل الاكواد المطروحه غلط يا صاحب الموضوع وضح طلبك تبي اللي عنده تحميل يظهر له الكلام ولا ايش بالضبط ؟ Link to comment
^iiEcoo'x_) Posted November 7, 2018 Share Posted November 7, 2018 @*AnGeL - الله يهديك . Link to comment
ميدوح Posted November 7, 2018 Share Posted November 7, 2018 On 04/11/2018 at 13:34, Scarfas said: function renderit () triggerClientEvent ( source, "onLogin" ) removeEventHandler("onClientRender",root,dxdraw) end addEventHandler("onPlayerLogin",root,renderit) addEventHandler("onPlayerJoin",root,renderit) addEvent( "onLogin", true ) local screenW, screenH = guiGetScreenSize() function dxdraw () dxDrawText("text", (screenW - 496) / 2, (screenH - 79) / 2, ((screenW - 496) / 2) + 496, ( (screenH - 79) / 2) + 79, tocolor(255, 255, 255, 255), 1.20, "bankgothic", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender",root,dxdraw) addEventHandler( "onLogin", localPlayer, dxdraw ) مو شغاال ======== --Client.lua local screenW, screenH = guiGetScreenSize() addEvent( "onLogin", true ) function dxdraw () dxDrawText("رسالتي", (screenW - 496) / 2, (screenH - 79) / 2, ((screenW - 496) / 2) + 496, ( (screenH - 79) / 2) + 79, tocolor(255, 255, 255, 255), 1.20, "bankgothic", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender",root,dxdraw) addEventHandler( "onLogin", localPlayer, dxdraw ) setTimer ( function() removeEventHandler("onClientRender",root,dxdraw) end, 1000, 1 ) -------------- --server.lua function renderit () triggerClientEvent ( source, "onLogin" ) end addEventHandler("onPlayerLogin",root,renderit) addEventHandler("onPlayerJoin",root,renderit) Link to comment
Guest Posted November 7, 2018 Share Posted November 7, 2018 8 hours ago, #_iMr,[E]coo said: @*AnGeL - الله يهديك . أمين ويهدي الكل . Link to comment
^iiEcoo'x_) Posted November 7, 2018 Share Posted November 7, 2018 (edited) function TextStats ( ) triggerClientEvent ( source , 'TextShowing' , source , string.sub ( eventName , 9 ) ) end addEventHandler ( 'onPlayerLogin' , root , TextStats ) addEventHandler ( 'onPlayerJoin' , root , TextStats ) function DrawText ( ) end addEvent ( 'TextShowing' , true ) addEventHandler ( 'TextShowing' , root , function ( EventName ) if ( EventName == 'Login' ) then removeEventHandler ( 'onClientRender' , root , DrawText ) else addEventHandler ( 'onClientRender' , root , DrawText ) end end ) Edited November 7, 2018 by #_iMr,[E]coo Link to comment
N3xT Posted November 7, 2018 Share Posted November 7, 2018 56 minutes ago, #_iMr,[E]coo said: function TextStats ( ) triggerClientEvent ( source , 'TextShowing' , source , string.sub ( eventName , 9 ) ) end addEventHandler ( 'onPlayerLogin' , root , TextStats ) addEventHandler ( 'onPlayerJoin' , root , TextStats ) function DrawText ( ) end addEvent ( 'TextShowing' , true ) addEventHandler ( 'TextShowing' , root , function ( EventName ) if ( EventName == 'Login' ) then removeEventHandler ( 'onClientRender' , root , DrawText ) else addEventHandler ( 'onClientRender' , root , DrawText ) end end ) السطر الثاني اسم الحدث غير معرف Link to comment
^iiEcoo'x_) Posted November 7, 2018 Share Posted November 7, 2018 4 minutes ago, N3xT said: السطر الثاني اسم الحدث غير معرف eventName: This is the string of the name of the event that was called upon (i.e. the event name that was added with addEventHandler). https://wiki.multitheftauto.com/wiki/Event_system Link to comment
N3xT Posted November 7, 2018 Share Posted November 7, 2018 1 minute ago, #_iMr,[E]coo said: eventName: This is the string of the name of the event that was called upon (i.e. the event name that was added with addEventHandler). https://wiki.multitheftauto.com/wiki/Event_system هل جربت الكود؟, لأن اللي اذكره لازم تعرفه داخل الفنكشن Link to comment
^iiEcoo'x_) Posted November 7, 2018 Share Posted November 7, 2018 2 minutes ago, N3xT said: هل جربت الكود؟, لأن اللي اذكره لازم تعرفه داخل الفنكشن لا ما في داعي , في مثال هنا https://wiki.multitheftauto.com/wiki/Vector/Vector3 1 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