Jump to content

مود الافك


Recommended Posts

11 hours ago, Jack Tom said:

شباب كيف اسوي مود الافك في تاب يعني كيف اخلي لما حد يعمل 

/afk 

او يدوس على ال 

hud 

اللي انا عاملها يظهر للكل في tab

ان الشخص ده افك يظهر جمب اسمو AFK

ما جربته .. سويته عالسريع ذذ
 

exports.scoreboard:addScoreboardColumn( 'AFK' ) 
function killerProjectScoreboard ( )

	for _, v in pairs( getElementsByType( "player" ) ) do 
	
	if getElementData ( v,"AFKstats" ) == "AFK" then
	setElementData( v, "AFK" , "AFK" ) 
	elseif getElementData ( v,"AFKstats" ) == "notAFK" then
	setElementData( v, "AFK" , "" )
	end

	end

end
addEventHandler("onElementDataChange",root, killerProjectScoreboard )

function killerProjectAFKstats ( player )

if getElementData ( player,"AFKstats" ) == "AFK" then
setElementData ( player,"AFKstats","notAFK" )
elseif getElementData ( player,"AFKstats" ) == "notAFK" then
setElementData ( player,"AFKstats","AFK" )
end

end

addCommandHandler ( "AFK", killerProjectAFKstats )
addCommandHandler ( "afk", killerProjectAFKstats )

 

Link to comment
exports.scoreboard:addScoreboardColumn

عشان تضيف كلومن جديد في السكوري بورد " التاب "

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

واذا اتحرك تشيل الداتا منه .

Link to comment
7 minutes ago, Killer Project said:

ما جربته .. سويته عالسريع ذذ
 


exports.scoreboard:addScoreboardColumn( 'AFK' ) 
function killerProjectScoreboard ( )

	for _, v in pairs( getElementsByType( "player" ) ) do 
	
	if getElementData ( v,"AFKstats" ) == "AFK" then
	setElementData( v, "AFK" , "AFK" ) 
	elseif getElementData ( v,"AFKstats" ) == "notAFK" then
	setElementData( v, "AFK" , "" )
	end

	end

end
addEventHandler("onElementDataChange",root, killerProjectScoreboard )

function killerProjectAFKstats ( player )

if getElementData ( player,"AFKstats" ) == "AFK" then
setElementData ( player,"AFKstats","notAFK" )
elseif getElementData ( player,"AFKstats" ) == "notAFK" then
setElementData ( player,"AFKstats","AFK" )
end

end

addCommandHandler ( "AFK", killerProjectAFKstats )
addCommandHandler ( "afk", killerProjectAFKstats )

 

wrong n't right

Link to comment

شف ذا المثال كمل عليه :
 

addCommandHandler ( "AFK",
	function ( player )
		setElementInterior ( player, 0, x, y, z  ) -- المكان التبيه يروح له
		setElementFrozen ( player, true ) 
			outputChatBox ( "تم نقلك للافك", player, 255,255,255,true )
		else
			setElementInterior ( player, 0, x, y, z ) -- جط x,y,z للمكان التبيه يرجع له لين يكتب افك مرأ اخرا
			setElementFrozen ( player, false ) 
			outputChatBox ( "تم نقلك للعالم العادي", player, 255,255,255,true )
		end
	end
)

 

Link to comment
Just now, Deativated said:

شف ذا المثال كمل عليه :
 


addCommandHandler ( "AFK",
	function ( player )
		setElementInterior ( player, 0, x, y, z  ) -- المكان التبيه يروح له
		setElementFrozen ( player, true ) 
			outputChatBox ( "تم نقلك للافك", player, 255,255,255,true )
		else
			setElementInterior ( player, 0, x, y, z ) -- جط x,y,z للمكان التبيه يرجع له لين يكتب افك مرأ اخرا
			setElementFrozen ( player, false ) 
			outputChatBox ( "تم نقلك للعالم العادي", player, 255,255,255,true )
		end
	end
)

 

حبي ما اقدر اسوي هذا لاني في رول بلاي ما اقدر اخليه يروح  لمكان الافك انا زبطله مود انو يظهر فوقيه علامة afk
و يتغير لون اسمو و ما يقدر يتحرك فاضل بس كيف اربطها بالحالة في تاب

@Deativated

Link to comment
Just now, Jack Tom said:

حبي ما اقدر اسوي هذا لاني في رول بلاي ما اقدر اخليه يروح  لمكان الافك انا زبطله مود انو يظهر فوقيه علامة afk
و يتغير لون اسمو و ما يقدر يتحرك فاضل بس كيف اربطها بالحالة في تاب

@Deativated

قصدك الكان مثل في طارة القديم ؟

Link to comment
Just now, Deativated said:

قصدك الكان مثل في طارة القديم ؟

ما شفت اللي كان في طاره 
بس هو انت تدوس على ايقونة تقلب لون اسمك و تخليك ثابت في ماكنك و يظهرلك شارة انك afk
بس فاضلي اربطة ب tab

Link to comment
2 minutes ago, Jack Tom said:

حبي ما اقدر اسوي هذا لاني في رول بلاي ما اقدر اخليه يروح  لمكان الافك انا زبطله مود انو يظهر فوقيه علامة afk
و يتغير لون اسمو و ما يقدر يتحرك فاضل بس كيف اربطها بالحالة في تاب

@Deativated

سويتها بالداتا ولا بوشو؟

Link to comment
Just now, Jack Tom said:

بمود لوحدو في سيرفرات الرول بلاي

 

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

في

f8

ولا واللاعب موقف ولا وشو

 

Edited by Master_MTA
Link to comment
14 minutes ago, Killer Project said:

ما جربته .. سويته عالسريع ذذ
 


exports.scoreboard:addScoreboardColumn( 'AFK' ) 
function killerProjectScoreboard ( )

	for _, v in pairs( getElementsByType( "player" ) ) do 
	
	if getElementData ( v,"AFKstats" ) == "AFK" then
	setElementData( v, "AFK" , "AFK" ) 
	elseif getElementData ( v,"AFKstats" ) == "notAFK" then
	setElementData( v, "AFK" , "" )
	end

	end

end
addEventHandler("onElementDataChange",root, killerProjectScoreboard )

function killerProjectAFKstats ( player )

if getElementData ( player,"AFKstats" ) == "AFK" then
setElementData ( player,"AFKstats","notAFK" )
elseif getElementData ( player,"AFKstats" ) == "notAFK" then
setElementData ( player,"AFKstats","AFK" )
end

end

addCommandHandler ( "AFK", killerProjectAFKstats )
addCommandHandler ( "afk", killerProjectAFKstats )

 

انا عاوز اعرف الاكسبورت هو ده قربت قوي بس قلي اعملو في مود لوحدة ؟
@Killer Project

Just now, Master_MTA said:

وانا كيف اعرف ؟ روح شيك على المود حق الافك شف مسويها بالداتا ولا command

في

f8

addEventHandler("onPlayerJoin",getRootElement(),
function ()
setElementData(source,"afk_state","back")
setElementData(source,"HideState","disabled")
end)

addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()),
function ()
for i,v in pairs (getElementsByType("player")) do
setElementData(v,"afk_state","back")
setElementData(v,"HideState","disabled")
end
end)

addCommandHandler("afk",
function (thePlayer)
if getElementData(thePlayer,"afk_state") == "back" then
triggerClientEvent(thePlayer,"god_mode",thePlayer)
setPedFrozen(thePlayer,true)
setPlayerNametagText (thePlayer, "|AFK|" .. getPlayerName (thePlayer))
outputChatBox(getPlayerName(thePlayer).." is AFK!",getRootElement(),255,50,0)
setElementData(thePlayer,"afk_state","afk")
if getPedOccupiedVehicle(thePlayer) then
fixVehicle(getPedOccupiedVehicle(thePlayer),true)
setVehicleFrozen(getPedOccupiedVehicle(thePlayer),true)
setVehicleDamageProof(getPedOccupiedVehicle(thePlayer),true)
end
elseif getElementData(thePlayer,"afk_state") == "afk" then
setElementData(thePlayer,"afk_state","back")
triggerClientEvent(thePlayer,"disable_god_mode",thePlayer)
setPedFrozen(thePlayer,false)
setPlayerNametagText (thePlayer, "" .. getPlayerName (thePlayer))
outputChatBox(getPlayerName(thePlayer).." is back!",getRootElement(),0,255,0)
if getPedOccupiedVehicle(thePlayer) then
setVehicleFrozen(getPedOccupiedVehicle(thePlayer),false)
setVehicleDamageProof(getPedOccupiedVehicle(thePlayer),false)
end
end
end)

اهو المود

Link to comment
exports.scoreboard:addScoreboardColumn( 'afk_state' ) 
addEventHandler("onPlayerJoin",getRootElement(),
function ()
setElementData(source,"afk_state","back")
setElementData(source,"HideState","disabled")
end)

addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()),
function ()
for i,v in pairs (getElementsByType("player")) do
setElementData(v,"afk_state","back")
setElementData(v,"HideState","disabled")
end
end)

addCommandHandler("afk",
function (thePlayer)
if getElementData(thePlayer,"afk_state") == "back" then
triggerClientEvent(thePlayer,"god_mode",thePlayer)
setPedFrozen(thePlayer,true)
setPlayerNametagText (thePlayer, "|AFK|" .. getPlayerName (thePlayer))
outputChatBox(getPlayerName(thePlayer).." is AFK!",getRootElement(),255,50,0)
setElementData(thePlayer,"afk_state","afk")
if getPedOccupiedVehicle(thePlayer) then
fixVehicle(getPedOccupiedVehicle(thePlayer),true)
setVehicleFrozen(getPedOccupiedVehicle(thePlayer),true)
setVehicleDamageProof(getPedOccupiedVehicle(thePlayer),true)
end
elseif getElementData(thePlayer,"afk_state") == "afk" then
setElementData(thePlayer,"afk_state","back")
triggerClientEvent(thePlayer,"disable_god_mode",thePlayer)
setPedFrozen(thePlayer,false)
setPlayerNametagText (thePlayer, "" .. getPlayerName (thePlayer))
outputChatBox(getPlayerName(thePlayer).." is back!",getRootElement(),0,255,0)
if getPedOccupiedVehicle(thePlayer) then
setVehicleFrozen(getPedOccupiedVehicle(thePlayer),false)
setVehicleDamageProof(getPedOccupiedVehicle(thePlayer),false)
end
end
end)

جرب لاني ما جربت

Link to comment

@Jack Tom

سوي ملف جديد سيرفر وميتا وضيف ذا بملف السيرفر

 

-- server

exports.scoreboard:addScoreboardColumn( 'AFK' )
function killerProjectScoreboard ( )

    for _, v in pairs( getElementsByType( "player" ) ) do

        if getElementData ( v,"AFKstats" ) == "AFK" then
            setElementData( v, "AFK" , "AFK" )
        elseif getElementData ( v,"AFKstats" ) == "notAFK" then
            setElementData( v, "AFK" , "" )
        end

    end

end
addEventHandler("onElementDataChange",root, killerProjectScoreboard )

for _, v in pairs( getElementsByType( "player" ) ) do

    setElementData( v, "AFKstats" , "notAFK" )

end

function killerProjectAFKstats ( player )

    if getElementData ( player,"AFKstats" ) == "AFK" then
        setElementData ( player,"AFKstats","notAFK" )
        outputChatBox ( "you are now not afk", player )
    elseif getElementData ( player,"AFKstats" ) == "notAFK" then
        setElementData ( player,"AFKstats","AFK" )
        outputChatBox ( "you are now afk", player )
    end

end

addCommandHandler ( "AFK", killerProjectAFKstats )
addCommandHandler ( "afk", killerProjectAFKstats )



@#BrosS sorry bross :D

Link to comment
7 minutes ago, Jack Tom said:

انا عاوز اعرف الاكسبورت هو ده قربت قوي بس قلي اعملو في مود لوحدة ؟
@Killer Project


addEventHandler("onPlayerJoin",getRootElement(),
function ()
setElementData(source,"afk_state","back")
setElementData(source,"HideState","disabled")
end)

addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()),
function ()
for i,v in pairs (getElementsByType("player")) do
setElementData(v,"afk_state","back")
setElementData(v,"HideState","disabled")
end
end)

addCommandHandler("afk",
function (thePlayer)
if getElementData(thePlayer,"afk_state") == "back" then
triggerClientEvent(thePlayer,"god_mode",thePlayer)
setPedFrozen(thePlayer,true)
setPlayerNametagText (thePlayer, "|AFK|" .. getPlayerName (thePlayer))
outputChatBox(getPlayerName(thePlayer).." is AFK!",getRootElement(),255,50,0)
setElementData(thePlayer,"afk_state","afk")
if getPedOccupiedVehicle(thePlayer) then
fixVehicle(getPedOccupiedVehicle(thePlayer),true)
setVehicleFrozen(getPedOccupiedVehicle(thePlayer),true)
setVehicleDamageProof(getPedOccupiedVehicle(thePlayer),true)
end
elseif getElementData(thePlayer,"afk_state") == "afk" then
setElementData(thePlayer,"afk_state","back")
triggerClientEvent(thePlayer,"disable_god_mode",thePlayer)
setPedFrozen(thePlayer,false)
setPlayerNametagText (thePlayer, "" .. getPlayerName (thePlayer))
outputChatBox(getPlayerName(thePlayer).." is back!",getRootElement(),0,255,0)
if getPedOccupiedVehicle(thePlayer) then
setVehicleFrozen(getPedOccupiedVehicle(thePlayer),false)
setVehicleDamageProof(getPedOccupiedVehicle(thePlayer),false)
end
end
end)

اهو المود

 

1 minute ago, Killer Project said:

@Jack Tom

سوي ملف جديد سيرفر وميتا وضيف ذا بملف السيرفر

 


-- server

exports.scoreboard:addScoreboardColumn( 'AFK' )
function killerProjectScoreboard ( )

    for _, v in pairs( getElementsByType( "player" ) ) do

        if getElementData ( v,"AFKstats" ) == "AFK" then
            setElementData( v, "AFK" , "AFK" )
        elseif getElementData ( v,"AFKstats" ) == "notAFK" then
            setElementData( v, "AFK" , "" )
        end

    end

end
addEventHandler("onElementDataChange",root, killerProjectScoreboard )

for _, v in pairs( getElementsByType( "player" ) ) do

    setElementData( v, "AFKstats" , "notAFK" )

end

function killerProjectAFKstats ( player )

    if getElementData ( player,"AFKstats" ) == "AFK" then
        setElementData ( player,"AFKstats","notAFK" )
        outputChatBox ( "you are now not afk", player )
    elseif getElementData ( player,"AFKstats" ) == "notAFK" then
        setElementData ( player,"AFKstats","AFK" )
        outputChatBox ( "you are now afk", player )
    end

end

addCommandHandler ( "AFK", killerProjectAFKstats )
addCommandHandler ( "afk", killerProjectAFKstats )



@#BrosS sorry bross :D

 why loop?

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...