Jump to content

استفسار


Ahmed Eka

Recommended Posts

سلام عليكم

الحين هنا انا كان في مود السجن لما لاعبين يتسجنو التايمر حق واحد يعلق لاني ما مسوي جدول

الحين لما سويت جدول

صار يقلي ان 

Table is nil

وش اسوي ؟

 

 

 

  1. local players = { }
  2.  
  3.  
  4.  
  5. startJailTimer ( players[thePlayer] , theTimex )
  6. setElementInterior ( players[thePlayer], 6 )
  7. setElementDimension ( players[thePlayer], 1 )
  8. setElementPosition (players[thePlayer],264.56635, 77.97509, 1001.03906 )
  9. setElementData(players[thePlayer],"jailed",true)
  10.  

طبعا للاعب معرف بالفنكشن و كل شئ 

و لما اشيل الجدول يشتغل تمام ..

Link to comment
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

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 by NssoR
  • Like 1
Link to comment
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...