Sign in to follow this  
#,Dr.To[sh]iBa

عمل خاصية عدم السحب

Recommended Posts

 سلام عليكم شباب ابي اسوي مود انه ما يقدر يسحب شخص محدد 
ممكن بالسريال او بالحساب او بالرتبه وشكرا

Share this post


Link to post
6 hours ago, FaHaD said:

يسحبه كيف؟ رتبه ولا مكان؟

ما يسحبنيWarp Player TO me  يعني يا غالي لو احد فتح لوحة الادمنيه وضغط علي اسمي وضغط علي 

Share this post


Link to post

حط داتا للاعب اول مايدخل السيرفر تحقق من سريالك :

 

addEventHandler ( 'onPlayerJoin' )
getPlayerSerial
setElementData

-- وفي الادمنية ابحث عن الزر اللي يسوي الـ Warp Player To 
-- وابحث عن الحدث اللي يوم يضغط والتحقق وسوي تحقق اذا كان عنده داتا يطلع خطأ ومايسوي شيء 
--

 

  • Like 1

Share this post


Link to post

فهد ذا الكود تحطو في اي مود ؟؟

او في اي ملف 

...

Edited by Ad[N]a[N]e

Share this post


Link to post

هذي وظائف وحدث + استعمل :

 

addEventHandler ( 'onResourceStart' )
getElementsType
setElementData

نسيت احط لكم هذي ..

وسوي الاكواد

Share this post


Link to post

 

     elseif ( action == "warp" ) or ( action == "warpto" ) then
            if getElementData( player ,"Account") == "???" then exports["guimessages"]:outputServer(source, "* #BDBCB7"..getPlayerName(player).." #FF0000is the owner you cant warp him", 255, 100, 100) return end
                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 ( action == "warp" ) then
            if getElementData( player ,"Account") == "???yourAccount" then exports["guimessages"]:outputServer(source, "* #BDBCB7"..getPlayerName(player).." #FF0000is the owner you cant warp him", 255, 100, 100) return end
                warpPlayer ( source, player )
            else
                warpPlayer ( player, data )
                mdata = getPlayerName ( data )
            end

Edited by #bazooka

Share this post


Link to post
14 hours ago, #bazooka said:

 

     elseif ( action == "warp" ) or ( action == "warpto" ) then
            if getElementData( player ,"Account") == "???" then exports["guimessages"]:outputServer(source, "* #BDBCB7"..getPlayerName(player).." #FF0000is the owner you cant warp him", 255, 100, 100) return end
                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 ( action == "warp" ) then
            if getElementData( player ,"Account") == "???yourAccount" then exports["guimessages"]:outputServer(source, "* #BDBCB7"..getPlayerName(player).." #FF0000is the owner you cant warp him", 255, 100, 100) return end
                warpPlayer ( source, player )
            else
                warpPlayer ( player, data )
                mdata = getPlayerName ( data )
            end

???= حساب اللاعب ولا وش ؟

Share this post


Link to post

^

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

addEventHandler('onPlayerLogin',root,
function ( _ ,acc ) 
	setElementData(source,'Account',getAccountName(acc))
end
) 


addEventHandler('onPlayerLogout',root,
function ( _,acc ) 
	local Does_has_a_name = getElementData(source,'Account') or false
	if ( Does_has_a_name ) then 
		removeElementData(source,'Account')
	end
end
) 

 

  • Like 1

Share this post


Link to post

+

addEventHandler ( "onResourceStart" , resourceRoot ,

	function (	)

	for _, players in ipairs ( getElementsByType ( "player" ) ) do 
	
	local playerAcc = getPlayerAccount ( players )
	
	if ( playerAcc ) and not ( isGuestAccount ( playerAcc ) ) then 
	
	local accName = getAccountName ( playerAcc )

	setTimer ( setElementData , 500 , 1 , players , "Account" , accName )
	
			end
		end
	end
	)

 

Edited by Abdul KariM
  • Like 2

Share this post


Link to post
3 minutes ago, Abdul KariM said:

+


addEventHandler ( "onResourceStart" , resourceRoot ,

	function (	)

	for _, players in ipairs ( getElementsByType ( "player" ) ) do 
	
	local playerAcc = getPlayerAccount ( v )
	
	if ( playerAcc ) and not ( isGuestAccount ( playerAcc ) ) then 
	
	local accName = getAccountName ( playerAcc )

	setTimer ( setElementData , 500 , 1 , players , "Account" , accName )
	
			end
		end
	end
	)

 

 

في فنكشن إحضار حساب اللاعب غير معرف v المتغير 

  • Like 1

Share this post


Link to post
1 hour ago, Abdul KariM said:

+


addEventHandler ( "onResourceStart" , resourceRoot ,	function (	)	for _, players in ipairs ( getElementsByType ( "player" ) ) do 	
	local playerAcc = getPlayerAccount ( players )
	
	if ( playerAcc ) and not ( isGuestAccount ( playerAcc ) ) then 
	
	local accName = getAccountName ( playerAcc )

	setTimer ( setElementData , 500 , 1 , players , "Account" , accName )
	
			end
		end
	end
	)

 

 

1 hour ago, !#NssoR_) said:

 

في فنكشن إحضار حساب اللاعب غير معرف v المتغير 

                 

        if ( action == "warp" ) then
            if getElementData( player ,"Account") == "???yourAccount" then exports["guimessages"]:outputServer(source, "* #BDBCB7"..getPlayerName(player).." #FF0000is the owner you cant warp him", 255, 100, 100) return end
                warpPlayer ( source, player )
            else
                warpPlayer ( player, data )
                mdata = getPlayerName ( data )
            end

يعني هذا الكود شغال ولا لا

Edited by abulghar

Share this post


Link to post

وليش ماتسوي اذا الاعب سجل دخوله حط لة داتا وخلاص وبالكلنت اذا ضغطت شوف تحقق انة الداتا موجودة وارجع لرسالة خطأ وخلاص :/ ؟

Share this post


Link to post
On 11/4/2016 at 1:19 PM, abulghar said:

???= حساب اللاعب ولا وش ؟

  حساب الاعب ,  ، بس طبعا بلوحة الادمنية حطه الكود

Edited by #bazooka

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.