AL-SAYED Posted June 13, 2013 Share Posted June 13, 2013 شباب ويش الفنكشنات المطلوبه الى اذا لمست ماركر يطلع لي لوحه نكتب رساله وبعدين الرساله الا كتبها اللاعب توصلني على فايل في نفس المود Link to comment
iPrestege Posted June 13, 2013 Share Posted June 13, 2013 createMarker 'onClientMarkerHit' guiSetVisible guiGetVisible showCursor addEventHandler 'onClientGUIClick' guiGetText triggerServerEvent addEvent fileCreate fileExists fileWrite fileClose Link to comment
AL-SAYED Posted June 13, 2013 Author Share Posted June 13, 2013 fileCreate fileExists fileWrite fileClose سيرفر؟ Link to comment
AL-SAYED Posted June 13, 2013 Author Share Posted June 13, 2013 شلون اخليها تجيب اسمه بالرساله اذا فتحت الملف Link to comment
PaiN^ Posted June 13, 2013 Share Posted June 13, 2013 وليش ما تصير ؟ fileWrite( file, getPlayerName( player ) ) Link to comment
iPrestege Posted June 13, 2013 Share Posted June 13, 2013 Ex : addCommandHandler('create', function ( element ) local PlayerFile = fileCreate ( 'TestPlayerName.txt' ) if PlayerFile then fileWrite ( PlayerFile,tostring ( getPlayerName ( element ) ) ) fileClose ( PlayerFile ) end end ) تصير لية لا .. ؟ * بس لازم تغلق الملف مثل اللي سويتة بالمثال .. ولا مستحيل يصير [ = ذذ Link to comment
iPrestege Posted June 13, 2013 Share Posted June 13, 2013 اذا كودي اي وظيفة يجي اذا كودكـ .. اطرحة Link to comment
AL-SAYED Posted June 13, 2013 Author Share Posted June 13, 2013 [2013-06-13 15:32:20] WARNING: jobsystem\server.lua:7: Bad argument @ 'getPlayerName' [Expected element at argument 1, got nil] Link to comment
AL-SAYED Posted June 13, 2013 Author Share Posted June 13, 2013 addEvent("job",true) addEventHandler("job",getRootElement(), function ( element,edit) local jobfile = fileCreate("job.txt") if (jobfile) then fileWrite ( jobfile,edit ,tostring ( getPlayerName ( element ) ) ) fileClose(jobfile) end end ) Link to comment
iPrestege Posted June 13, 2013 Share Posted June 13, 2013 addEvent("job",true) addEventHandler("job",getRootElement(), function ( edit ) local jobfile = fileCreate("job.txt") if (jobfile) then fileWrite ( jobfile," "..edit.." "..getPlayerName ( source ).." " ) fileClose(jobfile) end end ) Link to comment
AL-SAYED Posted June 13, 2013 Author Share Posted June 13, 2013 (edited) مضبوط بس ليش عربي ما يكتبب + وماتنعرض الا رساله وحده في الملف عطني شنو استخدم بس انا بسوي وبحاول Edited June 13, 2013 by Guest Link to comment
iPrestege Posted June 13, 2013 Share Posted June 13, 2013 مدري عن العربي يمكن لانة مايصير ذذ بـ النسبة لـ الملف قصدك انة بس يمدي ملف واحد ؟ مايمدي اكثر من واحد ؟ Link to comment
PaiN^ Posted June 13, 2013 Share Posted June 13, 2013 تكتب على الكتابة الموجودة fileWrite لأن عشان تجيب الكلام المكتوب في الملف, ثم ضيف عليه الرسالة الجديدة fileRead, fileIsEOF إستخدم + عشان يكتب عربي UTF8 إحفظه بترميز Link to comment
AL-SAYED Posted June 13, 2013 Author Share Posted June 13, 2013 لا انا ابي بملف نفسه تجي رسالتين مثلا ha7soon: i will be -------------- jafar : i will be Link to comment
AL-SAYED Posted June 14, 2013 Author Share Posted June 14, 2013 addEvent("job",true) addEventHandler("job",getRootElement(), function ( edit ) local jobfile = fileCreate("job.lua") if (jobfile) then fileWrite ( jobfile," "..edit.." "..getPlayerName ( source ).." " ) fileClose(jobfile) local jobfile = fileOpen("job.lua", true) if jobfile then local H7 while not fileIsEOF(jobfile) do H7 = fileRead(jobfile, 5000) fileClose(jobfile) end end end end ) Link to comment
PaiN^ Posted June 14, 2013 Share Posted June 14, 2013 غير مجرب : addEvent( "job", true ) addEventHandler( "job", getRootElement( ), function( edit ) local H7 local jopFile = fileExists( "jop.lua" ) if not jopFile then jobfile = fileCreate( "job.lua" ) else jobfile = fileOpen( "job.lua" ) end if jobfile then while not fileIsEOF( jobfile ) do H7 = fileRead( jobfile, 500 ) end fileWrite( jobfile, H7.."\n\n"..getPlayerName ( source ).." : "..edit ) end fileClose( jobfile ) end ) 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