Taken' Posted July 17, 2018 Author Posted July 17, 2018 (edited) server side : addEventHandler("onPlayerChat", root, function(text, chat) if chat == 0 then local lvl = tonumber(getElementData(source, "xLevelx")) or 0 if lvl and lvl ~= 0 then outputChatBox("["..tostring(lvl).."] "..getPlayerName(source).."#ffffff: "..text, root, 255, 255, 255, true) end end end ) Edited July 17, 2018 by Taken'
Taken' Posted July 17, 2018 Author Posted July 17, 2018 طيب بجرب شلته وصار يجي بس يجي اللفل 0 مع اني لفلي 44
EH10 Posted July 17, 2018 Posted July 17, 2018 addEventHandler("onPlayerChat", root, function(text, chat) if chat == 0 then local lvl = getElementData(source, "xLevelx") or 0 outputChatBox("["..tostring(lvl).."] "..getPlayerName(source).."#ffffff: "..text, root, 255, 255, 255, true) end end )
Taken' Posted July 17, 2018 Author Posted July 17, 2018 1 minute ago, EH10 said: addEventHandler("onPlayerChat", root, function(text, chat) if chat == 0 then local lvl = getElementData(source, "xLevelx") or 0 outputChatBox("["..tostring(lvl).."] "..getPlayerName(source).."#ffffff: "..text, root, 255, 255, 255, true) end end ) نفس المشكلة اللفل يجيني = 0 1 minute ago, Trefeor said: اطرح ملف السيرفر لمود اللفل طيب تعال خاص خلاصة الكلام الفكرة مأخذوه من سيرفر سرك لحرب العصابات وانا بحاول اسوي الحركه لنفسي فقط لا اكثر
EH10 Posted July 17, 2018 Posted July 17, 2018 addEventHandler("onPlayerChat", root, function(chat) if chat == 0 then local lvl = getElementData(source, "xLevelx") or 0 outputChatBox("["..tostring(lvl).."] "..getPlayerName(source).."#ffffff: "..lvl, root, 255, 255, 255, true) end end ) يد بالجوال ويد العب فورت نايت..
Doffy Posted July 17, 2018 Posted July 17, 2018 2 minutes ago, EH10 said: addEventHandler("onPlayerChat", root, function(chat) if chat == 0 then local lvl = getElementData(source, "xLevelx") or 0 outputChatBox("["..tostring(lvl).."] "..getPlayerName(source).."#ffffff: "..lvl, root, 255, 255, 255, true) end end ) يد بالجوال ويد العب فورت نايت.. وش نوع الحشيش
` Allawi Posted July 17, 2018 Posted July 17, 2018 addCommandHandler("test", function(player) setElementData(player,"xLevelx",50) end ) ضيف الكود ذا واكتب في اف 8 test ثم اكتب بالشات وشوف النتيجه
EH10 Posted July 17, 2018 Posted July 17, 2018 (edited) 4 minutes ago, #DesTroeyR said: وش نوع الحشيش هههههه ذبحت اثنين بيد وحده واليد الثانيه قاعد اشوف مشكلة ذا. Edited July 17, 2018 by EH10 1
EH10 Posted July 17, 2018 Posted July 17, 2018 من اليوم اعدل لك ومدري وش تبي. المهم بسالك وش تبي تسوي؟
Rockyz Posted July 17, 2018 Posted July 17, 2018 المشكلة من الداتا .. حط هذا الكود ولفل نفسك وشوف وش يطلع لك في الشات addEventHandler('onElementDataChange', root, function(data) if data == 'xLevelx' then if getElementType(source) == 'player' then outputChatBox('You\'re now level '..tostring(getElementData(source, data) or 1)..'!', source, 255, 255, 255, true) else outputChatBox('Error !', root, 255, 255, 255, true) end end end);
Taken' Posted July 17, 2018 Author Posted July 17, 2018 24 minutes ago, #,+( _xiRoc[K]; > said: المشكلة من الداتا .. حط هذا الكود ولفل نفسك وشوف وش يطلع لك في الشات addEventHandler('onElementDataChange', root, function(data) if data == 'xLevelx' then if getElementType(source) == 'player' then outputChatBox('You\'re now level '..tostring(getElementData(source, data) or 1)..'!', source, 255, 255, 255, true) else outputChatBox('Error !', root, 255, 255, 255, true) end end end); ارسل لك ملف سيرفر حق اللفل ؟ تعال خاص لو فاضي
No_name Posted July 17, 2018 Posted July 17, 2018 6 hours ago, Taken' said: ارسل لك ملف سيرفر حق اللفل ؟ تعال خاص لو فاضي ارسل ملف السيرفر بحاول اساعدك
MrBiG Posted July 18, 2018 Posted July 18, 2018 (edited) function onPlayerChatFunction ( textMessage , typeMessage ) if ( typeMessage == 0 ) then if ( getElementData ( source , "xLevelx" ) ) then local Level = getElementData ( source , "xLevelx" ) or 0 outputChatBox ( "["..Level.."] ".. getPlayerName ( source ) .."#ffffff: " ..textMessage , root , 255 , 255 , 255 , true ) else outputChatBox ("you have problem in level data" , root , 255 , 255 , 255 , true ) end end end addEventHandler ( "onPlayerChat" , root , onPlayerChatFunction ) Edited July 18, 2018 by Debo15
Guest Posted July 30, 2018 Posted July 30, 2018 الي فاهمه انه ما يبي يحط الكود عشان لا ينسسرق .. يخوي وش نسسوي به إحنا ؟
[T]|O|[P]George Posted July 30, 2018 Posted July 30, 2018 On 7/17/2018 at 13:44, Taken' said: سلام عليكم معى سؤال وش الطريقه الي اقدر اجيب فيها لفل قبل الاسم ؟ انا سيرفري حرب + الداتا هى xLevelx جربت local lvl = getElementData(source,"xLevelx") or 0 وبعدها احط في بداية الاوت بوت "..lvl.." ما ضبط معى يجيب اللفل 0 وانا يكون لفلى مثلا 44 جرب نفس كودك getElementData بعدين حط لك الداتا setElementData و رستر التاجات و تجيك باسمك
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