Ahmed Eka Posted September 25, 2016 Share Posted September 25, 2016 سلام عليكم الحين هنا انا كان في مود السجن لما لاعبين يتسجنو التايمر حق واحد يعلق لاني ما مسوي جدول الحين لما سويت جدول صار يقلي ان Table is nil وش اسوي ؟ local players = { } startJailTimer ( players[thePlayer] , theTimex ) setElementInterior ( players[thePlayer], 6 ) setElementDimension ( players[thePlayer], 1 ) setElementPosition (players[thePlayer],264.56635, 77.97509, 1001.03906 ) setElementData(players[thePlayer],"jailed",true) طبعا للاعب معرف بالفنكشن و كل شئ و لما اشيل الجدول يشتغل تمام .. Link to comment
iPrestege Posted September 25, 2016 Share Posted September 25, 2016 يعطيك انة الجدول نيل في سطر؟ وش الكود اللي يطلع فية نيل؟ هل هو التايمر؟ Link to comment
!#NssoR_) Posted September 25, 2016 Share Posted September 25, 2016 26 minutes ago, #KraTos^_^ said: debugscript 3 7 hours ago, M[A]X said: صار يقلي ان Table is nil وش اسوي ؟ Link to comment
#BrosS Posted September 25, 2016 Share Posted September 25, 2016 مايقلك اي سطر بالظبط ؟ Link to comment
!#NssoR_) Posted September 25, 2016 Share Posted September 25, 2016 حتي لو عرفت السطر ماراح تحلها لأنه مو حاط الكود كامل عشان تعرف وين المشكلة, حاطلك جزء بسيط من الكود Link to comment
Ahmed Eka Posted September 25, 2016 Author Share Posted September 25, 2016 17 hours ago, Mr.Pres[T]ege said: يعطيك انة الجدول نيل في سطر؟ وش الكود اللي يطلع فية نيل؟ هل هو التايمر؟ لا على الجدول نفسه يجي بسطر الجدول .. 12 hours ago, NssoR said: حتي لو عرفت السطر ماراح تحلها لأنه مو حاط الكود كامل عشان تعرف وين المشكلة, حاطلك جزء بسيط من الكود local players = { } function JailHim(jailed,theJails,time,timeDes,showWho,timeReady) players[thePlayer] = getPlayerFromName(jailed) if not players[thePlayer] then exports["guimessages"]:outputServer(" Please Select a Player !",source,255,0,0,255,true) return end removePedFromVehicle(players[thePlayer]) for k,v in ipairs ( jTable ) do end if tostring(time) then if timeReady == true then theTimex = tonumber(time) else theTimex = gettok ( time, 1, string.byte(timeDes) ) end if timeDes == "Hours" then theTimex = math.floor(theTimex*60*60*1000) elseif timeDes == "Minutes" then theTimex = math.floor(theTimex*60*1000) elseif timeDes == "Seconds" then theTimex = math.floor(theTimex*1000) end startJailTimer ( players[thePlayer] , theTimex ) setElementInterior ( players[thePlayer], 6 ) setElementDimension ( players[thePlayer], 1 ) setElementPosition (players[thePlayer],264.56635, 77.97509, 1001.03906 ) setElementData(players[thePlayer],"jailed",true) toggleControl(players[thePlayer],"fire",false) end end Link to comment
!#NssoR_) Posted September 25, 2016 Share Posted September 25, 2016 (edited) local players = { } function JailHim(jailed,theJails,time,timeDes,showWho,timeReady) local thePlayer = getPlayerFromName(jailed) if not ( thePlayer ) then return exports["guimessages"]:outputServer(" Error no player with this name "..jailed,root,255,0,0,255,true) end players[thePlayer] = thePlayer if not players[thePlayer] then exports["guimessages"]:outputServer(" Please Select a Player !",thePlayer,255,0,0,255,true) return end removePedFromVehicle(players[thePlayer]) for k,v in ipairs ( jTable ) do end if tostring(time) then if timeReady == true then theTimex = tonumber(time) else theTimex = gettok ( time, 1, string.byte(timeDes) ) end if timeDes == "Hours" then theTimex = math.floor(theTimex*60*60*1000) elseif timeDes == "Minutes" then theTimex = math.floor(theTimex*60*1000) elseif timeDes == "Seconds" then theTimex = math.floor(theTimex*1000) end startJailTimer ( players[thePlayer] , theTimex ) setElementInterior ( players[thePlayer], 6 ) setElementDimension ( players[thePlayer], 1 ) setElementPosition (players[thePlayer],264.56635, 77.97509, 1001.03906 ) setElementData(players[thePlayer],"jailed",true) toggleControl(players[thePlayer],"fire",false) end end تأكد ان طريقتك لإستخدام الوظيفة تكون زي كذا JailHim ( getPlayerName(source) , ....... ) تأكد انك تحط اسم اللاعب مو قيمة اللاعب مو تحط النقاط هذي .... لأن انا مسويها عشان مولازم اكتب باقي الارقمنتات حقت الكود فـ اختصارها بنقاط Edited September 25, 2016 by NssoR 1 Link to comment
Ahmed Eka Posted September 25, 2016 Author Share Posted September 25, 2016 12 hours ago, NssoR said: local players = { } function JailHim(jailed,theJails,time,timeDes,showWho,timeReady) local thePlayer = getPlayerFromName(jailed) if not ( thePlayer ) then return exports["guimessages"]:outputServer(" Error no player with this name "..jailed,root,255,0,0,255,true) end players[thePlayer] = thePlayer if not players[thePlayer] then exports["guimessages"]:outputServer(" Please Select a Player !",thePlayer,255,0,0,255,true) return end removePedFromVehicle(players[thePlayer]) for k,v in ipairs ( jTable ) do end if tostring(time) then if timeReady == true then theTimex = tonumber(time) else theTimex = gettok ( time, 1, string.byte(timeDes) ) end if timeDes == "Hours" then theTimex = math.floor(theTimex*60*60*1000) elseif timeDes == "Minutes" then theTimex = math.floor(theTimex*60*1000) elseif timeDes == "Seconds" then theTimex = math.floor(theTimex*1000) end startJailTimer ( players[thePlayer] , theTimex ) setElementInterior ( players[thePlayer], 6 ) setElementDimension ( players[thePlayer], 1 ) setElementPosition (players[thePlayer],264.56635, 77.97509, 1001.03906 ) setElementData(players[thePlayer],"jailed",true) toggleControl(players[thePlayer],"fire",false) end end تأكد ان طريقتك لإستخدام الوظيفة تكون زي كذا JailHim ( getPlayerName(source) , ....... ) تأكد انك تحط اسم اللاعب مو قيمة اللاعب مو تحط النقاط هذي .... لأن انا مسويها عشان مولازم اكتب باقي الارقمنتات حقت الكود فـ اختصارها بنقاط ادري اوكي بجرب .. 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