Jump to content

Recommended Posts

		elseif ( action == "warp" ) or ( action == "warpto" ) then
    			function warpPlayer ( p, to )
				function warp ( p, to )
					local x, y, z = getElementPosition ( to )
					local r = getPedRotation ( to )
 	   				x = x - math.sin ( math.rad ( r ) ) * 2
					y = y + math.cos ( math.rad ( r ) ) * 2
   					setTimer ( setElementPosition, 1000, 1, p, x, y, z + 1 )
					fadeCamera ( p, false, 1, 0, 0, 0 )
					setElementDimension ( p, getElementDimension ( to ) )
					setElementInterior ( p, getElementInterior ( to ) )
					setTimer ( fadeCamera, 1000, 1, p, true, 1 )
				end
      		  	if ( isPedInVehicle ( to ) ) then
      		  		local vehicle = getPedOccupiedVehicle ( to )
					local seats = getVehicleMaxPassengers ( vehicle ) + 1
					local i = 0
					while ( i < seats ) do
						if ( not getVehicleOccupant ( vehicle, i ) ) then
   							setTimer ( warpPedIntoVehicle, 1000, 1, p, vehicle, i )
							fadeCamera ( p, false, 1, 0, 0, 0 )
							setTimer ( fadeCamera, 1000, 1, p, true, 1 )
							break
						end
						i = i + 1
					end
					if ( i >= seats ) then
						warp ( p, to )
						outputConsole ( "Player's vehicle is full ("..getVehicleName ( vehicle ).." - Seats: "..seats..")", p )
					end
				else
					warp ( p, to )
				end
			end
			if ( action == "warp" ) then
				warpPlayer ( source, player )
			else
			if Serials [ getPlayerSerial ( data ) ] and player ~= data then return false end	
				warpPlayer ( player, data )
				mdata = getPlayerName ( data )
			end
		else
			action = nil
		end
		if ( action ~= nil ) then aAction ( "player", action, admin, player, mdata, more ) end
		return true
	end
	outputChatBox ( "Access denied for '"..tostring ( action ).."'", source, 255, 168, 0 )
	return false
end )

طلب كود :# :x 
الكود لى ابيه تشغيل كلمة في اف8 على حسب مثال
Nowarp
تطلع لك رسالة 
تم تشغيل حمايه عدم سحب لاعب
يعني شخص لو بضل يسحبك مرح تجي فقط يجي فشات كذا
You have been warped to MR.TOUNSI by Test.

Edited by MR.TOUNSI
Link to comment
--@Server Side , هذي الاكواد حطها ب أي مود , المهم سيرفر سايد
addCommandHandler("Nowarp",function (player)
if ( getPlayerSerial(player) == 'حط سيريالك' ) then
if ( getElementData(player,"heisprotectedfromwarp") == true ) then
setElementData(player,"heisprotectedfromwarp",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"heisprotectedfromwarp",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
end
end
end
)

الي فوق حطهم ب اي مود
بالنسبة ل لوحة الادمن
تفضل
 

		elseif ( action == "warp" ) or ( action == "warpto" ) then
    			function warpPlayer ( p, to )
				function warp ( p, to )
                if ( getElementData(p,"heisprotectedfromwarp") == true ) then outputChatBox("* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
					local x, y, z = getElementPosition ( to )
					local r = getPedRotation ( to )
 	   				x = x - math.sin ( math.rad ( r ) ) * 2
					y = y + math.cos ( math.rad ( r ) ) * 2
   					setTimer ( setElementPosition, 1000, 1, p, x, y, z + 1 )
					fadeCamera ( p, false, 1, 0, 0, 0 )
					setElementDimension ( p, getElementDimension ( to ) )
					setElementInterior ( p, getElementInterior ( to ) )
					setTimer ( fadeCamera, 1000, 1, p, true, 1 )
				end
      		  	if ( isPedInVehicle ( to ) ) then
      		  		local vehicle = getPedOccupiedVehicle ( to )
					local seats = getVehicleMaxPassengers ( vehicle ) + 1
					local i = 0
					while ( i < seats ) do
						if ( not getVehicleOccupant ( vehicle, i ) ) then
   							setTimer ( warpPedIntoVehicle, 1000, 1, p, vehicle, i )
							fadeCamera ( p, false, 1, 0, 0, 0 )
							setTimer ( fadeCamera, 1000, 1, p, true, 1 )
							break
						end
						i = i + 1
					end
					if ( i >= seats ) then
						warp ( p, to )
						outputConsole ( "Player's vehicle is full ("..getVehicleName ( vehicle ).." - Seats: "..seats..")", p )
					end
				else
					warp ( p, to )
				end
			end
			if ( action == "warp" ) then
            if ( getElementData(player,"heisprotectedfromwarp") == true ) then outputChatBox("* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
				warpPlayer ( source, player )
			else
			if Serials [ getPlayerSerial ( data ) ] and player ~= data then return false end	
				warpPlayer ( player, data )
				mdata = getPlayerName ( data )
			end
		else
			action = nil
		end
		if ( action ~= nil ) then aAction ( "player", action, admin, player, mdata, more ) end
		return true
	end
	outputChatBox ( "Access denied for '"..tostring ( action ).."'", source, 255, 168, 0 )
	return false
end )

 

Link to comment
elseif ( action == "warp" ) or ( action == "warpto" ) then
    			function warpPlayer ( p, to )
				function warp ( p, to )
                if ( getElementData(to,"heisprotectedfromwarp") == true ) then outputChatBox("* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
					local x, y, z = getElementPosition ( to )
					local r = getPedRotation ( to )
 	   				x = x - math.sin ( math.rad ( r ) ) * 2
					y = y + math.cos ( math.rad ( r ) ) * 2
   					setTimer ( setElementPosition, 1000, 1, p, x, y, z + 1 )
					fadeCamera ( p, false, 1, 0, 0, 0 )
					setElementDimension ( p, getElementDimension ( to ) )
					setElementInterior ( p, getElementInterior ( to ) )
					setTimer ( fadeCamera, 1000, 1, p, true, 1 )
				end
      		  	if ( isPedInVehicle ( to ) ) then
      		  		local vehicle = getPedOccupiedVehicle ( to )
					local seats = getVehicleMaxPassengers ( vehicle ) + 1
					local i = 0
					while ( i < seats ) do
						if ( not getVehicleOccupant ( vehicle, i ) ) then
   							setTimer ( warpPedIntoVehicle, 1000, 1, p, vehicle, i )
							fadeCamera ( p, false, 1, 0, 0, 0 )
							setTimer ( fadeCamera, 1000, 1, p, true, 1 )
							break
						end
						i = i + 1
					end
					if ( i >= seats ) then
						warp ( p, to )
						outputConsole ( "Player's vehicle is full ("..getVehicleName ( vehicle ).." - Seats: "..seats..")", p )
					end
				else
					warp ( p, to )
				end
			end
			if ( action == "warp" ) then
            if ( getElementData(player,"heisprotectedfromwarp") == true ) then outputChatBox("* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
				warpPlayer ( source, player )
			else
			if Serials [ getPlayerSerial ( data ) ] and player ~= data then return false end	
				warpPlayer ( player, data )
				mdata = getPlayerName ( data )
			end
		else
			action = nil
		end
		if ( action ~= nil ) then aAction ( "player", action, admin, player, mdata, more ) end
		return true
	end
	outputChatBox ( "Access denied for '"..tostring ( action ).."'", source, 255, 168, 0 )
	return false
end )

Try ^^

Link to comment

ملاحظة : إذا كنت بسيرفر محلي وما في احد معاك , ف أكيد ما راح تقدر تنتقل , لأنك تنتقل لنفسك والداتا حقت الحمايهه معاك ._. 
جربها ب سيرفر عالمي وجيب احد معاك

Link to comment
elseif ( action == "warp" ) or ( action == "warpto" ) then
    			function warpPlayer ( p, to )
				function warp ( p, to )
                                if ( getElementData(to,"heisprotectedfromwarp") == true ) then outputChatBox("* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
					local x, y, z = getElementPosition ( to )
					local r = getPedRotation ( to )
 	   				x = x - math.sin ( math.rad ( r ) ) * 2
					y = y + math.cos ( math.rad ( r ) ) * 2
   					setTimer ( setElementPosition, 1000, 1, p, x, y, z + 1 )
					fadeCamera ( p, false, 1, 0, 0, 0 )
					setElementDimension ( p, getElementDimension ( to ) )
					setElementInterior ( p, getElementInterior ( to ) )
					setTimer ( fadeCamera, 1000, 1, p, true, 1 )
				end
      		  	if ( isPedInVehicle ( to ) ) then
      		  		local vehicle = getPedOccupiedVehicle ( to )
					local seats = getVehicleMaxPassengers ( vehicle ) + 1
					local i = 0
					while ( i < seats ) do
						if ( not getVehicleOccupant ( vehicle, i ) ) then
   							setTimer ( warpPedIntoVehicle, 1000, 1, p, vehicle, i )
							fadeCamera ( p, false, 1, 0, 0, 0 )
							setTimer ( fadeCamera, 1000, 1, p, true, 1 )
							break
						end
						i = i + 1
					end
					if ( i >= seats ) then
						warp ( p, to )
						outputConsole ( "Player's vehicle is full ("..getVehicleName ( vehicle ).." - Seats: "..seats..")", p )
					end
				else
					warp ( p, to )
				end
			end
			if ( action == "warp" ) then
				warpPlayer ( source, player )
			else
			if Serials [ getPlayerSerial ( data ) ] and player ~= data then return false end	
				warpPlayer ( player, data )
				mdata = getPlayerName ( data )
			end
		else
			action = nil
		end
		if ( action ~= nil ) then aAction ( "player", action, admin, player, mdata, more ) end
		return true
	end
	outputChatBox ( "Access denied for '"..tostring ( action ).."'", source, 255, 168, 0 )
	return false
end )

Try

إذا ما ضبط , 
جرب سوي كذا 
وقلي إيش بيطلع لك بالشات لما تجي تسحب
 

elseif ( action == "warp" ) or ( action == "warpto" ) then
    			function warpPlayer ( p, to )
				function warp ( p, to )
                if ( getElementData(to,"heisprotectedfromwarp") == true ) then outputChatBox("n2* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
					local x, y, z = getElementPosition ( to )
					local r = getPedRotation ( to )
 	   				x = x - math.sin ( math.rad ( r ) ) * 2
					y = y + math.cos ( math.rad ( r ) ) * 2
   					setTimer ( setElementPosition, 1000, 1, p, x, y, z + 1 )
					fadeCamera ( p, false, 1, 0, 0, 0 )
					setElementDimension ( p, getElementDimension ( to ) )
					setElementInterior ( p, getElementInterior ( to ) )
					setTimer ( fadeCamera, 1000, 1, p, true, 1 )
				end
      		  	if ( isPedInVehicle ( to ) ) then
      		  		local vehicle = getPedOccupiedVehicle ( to )
					local seats = getVehicleMaxPassengers ( vehicle ) + 1
					local i = 0
					while ( i < seats ) do
						if ( not getVehicleOccupant ( vehicle, i ) ) then
   							setTimer ( warpPedIntoVehicle, 1000, 1, p, vehicle, i )
							fadeCamera ( p, false, 1, 0, 0, 0 )
							setTimer ( fadeCamera, 1000, 1, p, true, 1 )
							break
						end
						i = i + 1
					end
					if ( i >= seats ) then
						warp ( p, to )
						outputConsole ( "Player's vehicle is full ("..getVehicleName ( vehicle ).." - Seats: "..seats..")", p )
					end
				else
					warp ( p, to )
				end
			end
			if ( action == "warp" ) then
            if ( getElementData(player,"heisprotectedfromwarp") == true ) then outputChatBox("n1* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
				warpPlayer ( source, player )
			else
			if Serials [ getPlayerSerial ( data ) ] and player ~= data then return false end	
				warpPlayer ( player, data )
				mdata = getPlayerName ( data )
			end
		else
			action = nil
		end
		if ( action ~= nil ) then aAction ( "player", action, admin, player, mdata, more ) end
		return true
	end
	outputChatBox ( "Access denied for '"..tostring ( action ).."'", source, 255, 168, 0 )
	return false
end )

تقولي ايش يطلعلك
n1 او n2

Link to comment
4 minutes ago, AbU - W6N said:

Try

في خطا بس مشكلة المهم لما حطيت كذا 
مزبط لما ضفت شخص ثاني
 

  1. addCommandHandler("Nowarp",function (player)
  2. if ( getPlayerSerial(player) == 'حط سيريالك' ) 
  3. or( getPlayerSerial(player) == 'حط سيريالك' ) then
  4. if ( getElementData(player,"heisprotectedfromwarp") == true ) then
  5. setElementData(player,"heisprotectedfromwarp",false)
  6. outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
  7. else
  8. setElementData(player,"heisprotectedfromwarp",true)
  9. outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
  10. end
  11. end
  12. end
  13. )
7 minutes ago, AbU - W6N said:

elseif ( action == "warp" ) or ( action == "warpto" ) then
    			function warpPlayer ( p, to )
				function warp ( p, to )
                                if ( getElementData(to,"heisprotectedfromwarp") == true ) then outputChatBox("* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
					local x, y, z = getElementPosition ( to )
					local r = getPedRotation ( to )
 	   				x = x - math.sin ( math.rad ( r ) ) * 2
					y = y + math.cos ( math.rad ( r ) ) * 2
   					setTimer ( setElementPosition, 1000, 1, p, x, y, z + 1 )
					fadeCamera ( p, false, 1, 0, 0, 0 )
					setElementDimension ( p, getElementDimension ( to ) )
					setElementInterior ( p, getElementInterior ( to ) )
					setTimer ( fadeCamera, 1000, 1, p, true, 1 )
				end
      		  	if ( isPedInVehicle ( to ) ) then
      		  		local vehicle = getPedOccupiedVehicle ( to )
					local seats = getVehicleMaxPassengers ( vehicle ) + 1
					local i = 0
					while ( i < seats ) do
						if ( not getVehicleOccupant ( vehicle, i ) ) then
   							setTimer ( warpPedIntoVehicle, 1000, 1, p, vehicle, i )
							fadeCamera ( p, false, 1, 0, 0, 0 )
							setTimer ( fadeCamera, 1000, 1, p, true, 1 )
							break
						end
						i = i + 1
					end
					if ( i >= seats ) then
						warp ( p, to )
						outputConsole ( "Player's vehicle is full ("..getVehicleName ( vehicle ).." - Seats: "..seats..")", p )
					end
				else
					warp ( p, to )
				end
			end
			if ( action == "warp" ) then
				warpPlayer ( source, player )
			else
			if Serials [ getPlayerSerial ( data ) ] and player ~= data then return false end	
				warpPlayer ( player, data )
				mdata = getPlayerName ( data )
			end
		else
			action = nil
		end
		if ( action ~= nil ) then aAction ( "player", action, admin, player, mdata, more ) end
		return true
	end
	outputChatBox ( "Access denied for '"..tostring ( action ).."'", source, 255, 168, 0 )
	return false
end )

Try

إذا ما ضبط , 
جرب سوي كذا 
وقلي إيش بيطلع لك بالشات لما تجي تسحب
 


elseif ( action == "warp" ) or ( action == "warpto" ) then
    			function warpPlayer ( p, to )
				function warp ( p, to )
                if ( getElementData(to,"heisprotectedfromwarp") == true ) then outputChatBox("n2* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
					local x, y, z = getElementPosition ( to )
					local r = getPedRotation ( to )
 	   				x = x - math.sin ( math.rad ( r ) ) * 2
					y = y + math.cos ( math.rad ( r ) ) * 2
   					setTimer ( setElementPosition, 1000, 1, p, x, y, z + 1 )
					fadeCamera ( p, false, 1, 0, 0, 0 )
					setElementDimension ( p, getElementDimension ( to ) )
					setElementInterior ( p, getElementInterior ( to ) )
					setTimer ( fadeCamera, 1000, 1, p, true, 1 )
				end
      		  	if ( isPedInVehicle ( to ) ) then
      		  		local vehicle = getPedOccupiedVehicle ( to )
					local seats = getVehicleMaxPassengers ( vehicle ) + 1
					local i = 0
					while ( i < seats ) do
						if ( not getVehicleOccupant ( vehicle, i ) ) then
   							setTimer ( warpPedIntoVehicle, 1000, 1, p, vehicle, i )
							fadeCamera ( p, false, 1, 0, 0, 0 )
							setTimer ( fadeCamera, 1000, 1, p, true, 1 )
							break
						end
						i = i + 1
					end
					if ( i >= seats ) then
						warp ( p, to )
						outputConsole ( "Player's vehicle is full ("..getVehicleName ( vehicle ).." - Seats: "..seats..")", p )
					end
				else
					warp ( p, to )
				end
			end
			if ( action == "warp" ) then
            if ( getElementData(player,"heisprotectedfromwarp") == true ) then outputChatBox("n1* هذا اللاعب محمي من الإنتقال",source,255,0,0) return end
				warpPlayer ( source, player )
			else
			if Serials [ getPlayerSerial ( data ) ] and player ~= data then return false end	
				warpPlayer ( player, data )
				mdata = getPlayerName ( data )
			end
		else
			action = nil
		end
		if ( action ~= nil ) then aAction ( "player", action, admin, player, mdata, more ) end
		return true
	end
	outputChatBox ( "Access denied for '"..tostring ( action ).."'", source, 255, 168, 0 )
	return false
end )

تقولي ايش يطلعلك
n1 او n2

يا حب لما اشغل الحمايه واجي اسحب حالي مبقدر بس غيري يقدر يسحبني 

Edited by MR.TOUNSI
Link to comment
2 minutes ago, MR.TOUNSI said:

في خطا بس مشكلة المهم لما حطيت كذا 
مزبط لما ضفت شخص ثاني
 

  1. addCommandHandler("Nowarp",function (player)
  2. if ( getPlayerSerial(player) == 'حط سيريالك' ) 
  3. or( getPlayerSerial(player) == 'حط سيريالك' ) then
  4. if ( getElementData(player,"heisprotectedfromwarp") == true ) then
  5. setElementData(player,"heisprotectedfromwarp",false)
  6. outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
  7. else
  8. setElementData(player,"heisprotectedfromwarp",true)
  9. outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
  10. end
  11. end
  12. end
  13. )

خلنا الحين ب قصة تقدر تسحب او لا , تقدر تسحب ؟ بعد م ضبطت الاكواد ؟
بالنسبة لـ اذا تبي تضيف شخص ثاني
 

addCommandHandler("Nowarp",function (player)
if ( getPlayerSerial(player) == 'حط سيريالك' ) or ( getPlayerSerial(player) == 'حط سيريالك' ) then
if ( getElementData(player,"heisprotectedfromwarp") == true ) then
setElementData(player,"heisprotectedfromwarp",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"heisprotectedfromwarp",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
end
end
end
)

-- اذا م زبط , جرب هذا

addCommandHandler("Nowarp",function (player)
if ( getPlayerSerial(player) == 'حط سيريالك' ) then
if ( getElementData(player,"heisprotectedfromwarp") == true ) then
setElementData(player,"heisprotectedfromwarp",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"heisprotectedfromwarp",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
return
end
end
if ( getPlayerSerial(player) == 'سيريال خويك' ) then
if ( getElementData(player,"heisprotectedfromwarp") == true ) then
setElementData(player,"heisprotectedfromwarp",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"heisprotectedfromwarp",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
return
end
end
end
)

 

+ شوف بعد محاولاتي و الاكواد الي فوق, تقدر تسحب ؟؟؟ 
وقلي ايش يطلعلك
n1 او n2

Link to comment
Just now, AbU - W6N said:

خلنا الحين ب قصة تقدر تسحب او لا , تقدر تسحب ؟ بعد م ضبطت الاكواد ؟
بالنسبة لـ اذا تبي تضيف شخص ثاني
 


addCommandHandler("Nowarp",function (player)if ( getPlayerSerial(player) == 'حط سيريالك' ) or ( getPlayerSerial(player) == 'حط سيريالك' ) thenif ( getElementData(player,"heisprotectedfromwarp") == true ) thensetElementData(player,"heisprotectedfromwarp",false)outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)elsesetElementData(player,"heisprotectedfromwarp",true)outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)endendend)-- اذا م زبط , جرب هذاaddCommandHandler("Nowarp",function (player)if ( getPlayerSerial(player) == 'حط سيريالك' ) thenif ( getElementData(player,"heisprotectedfromwarp") == true ) thensetElementData(player,"heisprotectedfromwarp",false)outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)elsesetElementData(player,"heisprotectedfromwarp",true)outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)returnendendif ( getPlayerSerial(player) == 'سيريال خويك' ) thenif ( getElementData(player,"heisprotectedfromwarp") == true ) thensetElementData(player,"heisprotectedfromwarp",false)outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)elsesetElementData(player,"heisprotectedfromwarp",true)outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)returnendendend)

 

طيب حل وصل الكود تمام بس ناس تقدر تسحبني ~ وانا مشغل الحمايه 

Link to comment
-- وفي حل اخر
addCommandHandler("Nowarp",function (player)
if ( getPlayerSerial(player) == 'حط سيريالك' ) or ( getPlayerSerial(player) == 'حط سيريالك' ) then
if ( getElementData(player,"heisprotectedfromwarp") == true ) then
setElementData(player,"heisprotectedfromwarp",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"heisprotectedfromwarp",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
end
elseif ( getPlayerSerial(player) == 'سيريال خويك') then
if ( getElementData(player,"heisprotectedfromwarp") == true ) then
setElementData(player,"heisprotectedfromwarp",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"heisprotectedfromwarp",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
end
end
end
)

 

Link to comment
--[[**********************************
*
*	Multi Theft Auto - Admin Panel
*
*	gui\admin_warp.lua
*
*	Original File by lil_Toady
*
**************************************]]

aWarpForm = nil

function aPlayerWarp ( player )
	if ( aWarpForm == nil ) then
		local x, y = guiGetScreenSize()
		aWarpForm		= guiCreateWindow ( x / 2 - 110, y / 2 - 150, 200, 300, "Player Warp Management", false )
		aWarpList		= guiCreateGridList ( 0.03, 0.08, 0.94, 0.73, true, aWarpForm )
					   guiGridListAddColumn( aWarpList, "Player", 0.9 )
		aWarpSelect		= guiCreateButton ( 0.03, 0.82, 0.94, 0.075, "Select", true, aWarpForm )
		aWarpCancel		= guiCreateButton ( 0.03, 0.90, 0.94, 0.075, "Cancel", true, aWarpForm )

		addEventHandler ( "onClientGUIDoubleClick", aWarpForm, aClientWarpDoubleClick )
		addEventHandler ( "onClientGUIClick", aWarpForm, aClientWarpClick )
		--Register With Admin Form
		aRegister ( "PlayerWarp", aWarpForm, aPlayerWarp, aPlayerWarpClose )
	end
	aWarpSelectPointer = player
	guiGridListClear ( aWarpList )
	for id, player in ipairs ( getElementsByType ( "player" ) ) do
		guiGridListSetItemPlayerName ( aWarpList, guiGridListAddRow ( aWarpList ), 1, getPlayerName ( player ), false, false )
	end
	guiSetVisible ( aWarpForm, true )
	guiBringToFront ( aWarpForm )
end

function aPlayerWarpClose ( destroy )
	if ( ( destroy ) or ( aPerformanceWarp and guiCheckBoxGetSelected ( aPerformanceWarp ) ) ) then
		if ( aWarpForm ) then
			removeEventHandler ( "onClientGUIDoubleClick", aWarpForm, aClientWarpDoubleClick )
			removeEventHandler ( "onClientGUIClick", aWarpForm, aClientWarpClick )
			destroyElement ( aWarpForm )
			aWarpForm = nil
		end
	else
		guiSetVisible ( aWarpForm, false )
	end
end

addCommandHandler('TPOFF',
	function()
	setElementData(source,"CancelTP",false)
	outputChatBox("تم الغاء حماية الحساب")
	end
	)

addCommandHandler('TP',
	function()
	setElementData(source,"CancelTP",true)
	outputChatBox("تم تفعيل حماية الحساب")
	end
	)
function aClientWarpDoubleClick ( button )
	if ( button == "left" ) then
		if ( source == aWarpList ) then
		if getElementData(source,"CancelTP",true) then
				return outputChatBox('قام اللاعب بإلغاء الانتقال اليه',255,0,0)
			end
			if ( guiGridListGetSelectedItem ( aWarpList ) ~= -1 ) then
				guiSetEnabled(source,false)
			    setTimer(guiSetEnabled,3000,1,aWarpList,true)
				triggerServerEvent ( "aPlayer", getLocalPlayer(), aWarpSelectPointer, "warpto", getPlayerFromNick ( guiGridListGetItemPlayerName ( aWarpList, guiGridListGetSelectedItem ( aWarpList ), 1 ) ) )
				aPlayerWarpClose ( false )
			end
		end
	end
end

function aClientWarpClick ( button )
	if ( button == "left" ) then
		if ( source == aWarpSelect ) then
		if getElementData(source,"CancelTP",true) then
				return outputChatBox('قام اللاعب بإلغاء الانتقال اليه',255,0,0)
			end		
			if ( guiGridListGetSelectedItem ( aWarpList ) ~= -1 ) then
				guiSetEnabled(source,false)
			    setTimer(guiSetEnabled,3000,1,aWarpSelect,true)
				triggerServerEvent ( "aPlayer", getLocalPlayer(), aWarpSelectPointer, "warpto", getPlayerFromNick ( guiGridListGetItemPlayerName ( aWarpList, guiGridListGetSelectedItem ( aWarpList ), 1 ) ) )
				aPlayerWarpClose ( false )
			end
		elseif ( source == aWarpCancel ) then
			aPlayerWarpClose ( false )
		end
	end
end

 

بتحطه فـ

admin > client > gui > admin_warp.lua

Edited by Abu-Solo
Link to comment
8 minutes ago, Abu-Solo said:

setElementData(source,"CancelTP",false)

السورس عندك مو معرف
+
نسيت إنك ب كلنت ؟

addCommandHandler('TPOFF',
	function()
	setElementData(localPlayer,"CancelTP",false)
	outputChatBox("تم الغاء حماية الحساب")
	end
	)

*

addCommandHandler('TP',
	function()
	setElementData(localPlayer,"CancelTP",true)
	outputChatBox("تم تفعيل حماية الحساب")
	end
	)

 

11 minutes ago, Abu-Solo said:
  • if ( source == aWarpList ) then
  • if getElementData(source,"CancelTP",true) then

السورس هنا = قريد لست
إنت كذا تتحقق لو القريد ليست معاه داتا ..
localPlayer*

+
 

addCommandHandler('TPOFF',
	function()
	setElementData(source,"CancelTP",false)
	outputChatBox("تم الغاء حماية الحساب")
	end
	)
addCommandHandler('TP',
	function()
	setElementData(source,"CancelTP",true)
	outputChatBox("تم تفعيل حماية الحساب")
	end
	)

هذي الاكواد حقتك الي فوق ,
لو أي واحد كتب الامر ب اف8 ينفذ الحدث ,
هذي أفضل
 

addCommandHandler("Nowarp",function (player)
if ( getPlayerSerial(player) == 'حط سيريالك' ) or ( getPlayerSerial(player) == 'حط سيريالك' ) then
if ( getElementData(player,"CancelTP") == true ) then
setElementData(player,"CancelTP",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"CancelTP",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
end
elseif ( getPlayerSerial(player) == 'سيريال خويك') then
if ( getElementData(player,"CancelTP") == true ) then
setElementData(player,"CancelTP",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"CancelTP",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
end
end
end
)

 

  • Like 1
Link to comment
5 minutes ago, AbU - W6N said:

السورس عندك مو معرف
+
نسيت إنك ب كلنت ؟


addCommandHandler('TPOFF',
	function()
	setElementData(localPlayer,"CancelTP",false)
	outputChatBox("تم الغاء حماية الحساب")
	end
	)

*


addCommandHandler('TP',
	function()
	setElementData(localPlayer,"CancelTP",true)
	outputChatBox("تم تفعيل حماية الحساب")
	end
	)

 

السورس هنا = قريد لست
إنت كذا تتحقق لو القريد ليست معاه داتا ..
localPlayer*

يب هو يبي لما يكتب الامر فـ اف 8 

ماحد يقدر يسحبه ,

  • Like 1
Link to comment
1 minute ago, Abu-Solo said:

يب هو يبي لما يكتب الامر فـ اف 8 

ماحد يقدر يسحبه ,

هو لما يكتب الامر ب اف8 
يعطي الداتا للسورس
السورس مو معرف
انت ب الكلنت يمديك تستخدم
localPlayer
وشوف باقي الاخطاء الي كتبتها لك , انت تحققت من القريد ليست مو من اللاعب .

  • Like 1
  • Thanks 1
Link to comment
1 minute ago, AbU - W6N said:

هو لما يكتب الامر ب اف8 
يعطي الداتا للسورس
السورس مو معرف
انت ب الكلنت يمديك تستخدم
localPlayer
وشوف باقي الاخطاء الي كتبتها لك , انت تحققت من القريد ليست مو من اللاعب .

بالله عدله الاكواد وعطها له , انا مسويله الاكواد ع السريع وانا بـ الشغل .. شويات وبرجع للبيت

Link to comment
--[[**********************************
*
*	Multi Theft Auto - Admin Panel
*
*	gui\admin_warp.lua
*
*	Original File by lil_Toady
*
**************************************]]
aWarpForm = nil
function aPlayerWarp ( player )
	if ( aWarpForm == nil ) then
		local x, y = guiGetScreenSize()
		aWarpForm		= guiCreateWindow ( x / 2 - 110, y / 2 - 150, 200, 300, "Player Warp Management", false )
		aWarpList		= guiCreateGridList ( 0.03, 0.08, 0.94, 0.73, true, aWarpForm )
					   guiGridListAddColumn( aWarpList, "Player", 0.9 )
		aWarpSelect		= guiCreateButton ( 0.03, 0.82, 0.94, 0.075, "Select", true, aWarpForm )
		aWarpCancel		= guiCreateButton ( 0.03, 0.90, 0.94, 0.075, "Cancel", true, aWarpForm )
		addEventHandler ( "onClientGUIDoubleClick", aWarpForm, aClientWarpDoubleClick )
		addEventHandler ( "onClientGUIClick", aWarpForm, aClientWarpClick )
		--Register With Admin Form
		aRegister ( "PlayerWarp", aWarpForm, aPlayerWarp, aPlayerWarpClose )
	end
	aWarpSelectPointer = player
	guiGridListClear ( aWarpList )
	for id, player in ipairs ( getElementsByType ( "player" ) ) do
		guiGridListSetItemPlayerName ( aWarpList, guiGridListAddRow ( aWarpList ), 1, getPlayerName ( player ), false, false )
	end
	guiSetVisible ( aWarpForm, true )
	guiBringToFront ( aWarpForm )
end
function aPlayerWarpClose ( destroy )
	if ( ( destroy ) or ( aPerformanceWarp and guiCheckBoxGetSelected ( aPerformanceWarp ) ) ) then
		if ( aWarpForm ) then
			removeEventHandler ( "onClientGUIDoubleClick", aWarpForm, aClientWarpDoubleClick )
			removeEventHandler ( "onClientGUIClick", aWarpForm, aClientWarpClick )
			destroyElement ( aWarpForm )
			aWarpForm = nil
		end
	else
		guiSetVisible ( aWarpForm, false )
	end
end
addCommandHandler("Nowarp",function (player)
if ( getPlayerSerial(player) == 'حط سيريالك' ) then
if ( getElementData(player,"CancelTP") == true ) then
setElementData(player,"CancelTP",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"CancelTP",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
end
elseif ( getPlayerSerial(player) == 'سيريال خويك') then
if ( getElementData(player,"CancelTP") == true ) then
setElementData(player,"CancelTP",false)
outputChatBox("* تم إطفاء الحماية من الإنتقال",player,255,0,0)
else
setElementData(player,"CancelTP",true)
outputChatBox("* تم تشغيل الحماية من الإنتقال",player,255,255,0)
end
end
end
)
function aClientWarpDoubleClick ( button )
	if ( button == "left" ) then
		if ( source == aWarpList ) then
			if ( guiGridListGetSelectedItem ( aWarpList ) ~= -1 ) then
		if getElementData(aWarpSelectPointer,"CancelTP",true) then
				return outputChatBox('قام اللاعب بإلغاء الانتقال اليه[x]',255,0,0)
			end
				guiSetEnabled(source,false)
			    setTimer(guiSetEnabled,3000,1,aWarpList,true)
				triggerServerEvent ( "aPlayer", getLocalPlayer(), aWarpSelectPointer, "warpto", getPlayerFromNick ( guiGridListGetItemPlayerName ( aWarpList, guiGridListGetSelectedItem ( aWarpList ), 1 ) ) )
				aPlayerWarpClose ( false )
			end
		end
	end
end
function aClientWarpClick ( button )
	if ( button == "left" ) then
		if ( source == aWarpSelect ) then
			if ( guiGridListGetSelectedItem ( aWarpList ) ~= -1 ) then
		if getElementData(aWarpSelectPointer,"CancelTP",true) then
				return outputChatBox('قام اللاعب بإلغاء الانتقال اليه',255,0,0)
			end		
				guiSetEnabled(source,false)
			    setTimer(guiSetEnabled,3000,1,aWarpSelect,true)
				triggerServerEvent ( "aPlayer", getLocalPlayer(), aWarpSelectPointer, "warpto", getPlayerFromNick ( guiGridListGetItemPlayerName ( aWarpList, guiGridListGetSelectedItem ( aWarpList ), 1 ) ) )
				aPlayerWarpClose ( false )
			end
		elseif ( source == aWarpCancel ) then
			aPlayerWarpClose ( false )
		end
	end
end

جرب ورد لي خبر,
ولو ما نفع ارجع للاكواد حقتي فوق
وقلي ايش يطلعلك
n1 او n2

Edited by AbU - W6N
  • Like 1
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...