Ja[B]er[X]Pro Posted May 31, 2016 Share Posted May 31, 2016 السلام عليكم ورحمة الله وبركاته سويت مود الافك المشكلة الان مسوي عندما الماب يشتغل ان كانت معه داتا الافك يقتل الاعب لكن عندما الماب يشتغل ما يصير شيئ وما يموت الاعب ومتأكد من وجود الداتا addEventHandler("onMapLoad",root,function() if getElementData(source,"afk",true) then killPlayer(source) end end) Link to comment
Me[Z]oO Posted May 31, 2016 Share Posted May 31, 2016 addEventHandler("onMapLoad",root,function() if getElementData(source,"afk") then killPlayer(source) end end) Link to comment
Ja[B]er[X]Pro Posted May 31, 2016 Author Share Posted May 31, 2016 addEventHandler("onMapLoad",root,function() if getElementData(source,"afk") then killPlayer(source) end end) شكراً لك لكن ما يشتغل Link to comment
Me[Z]oO Posted May 31, 2016 Share Posted May 31, 2016 addEventHandler("onMapLoad",root,function() if getElementData(source,"afk") then killPlayer(source) end end) شكراً لك لكن ما يشتغل addCommandHandler("hl", function(p) if getElementData(p,"afk") then outputChatBox("لديك الداتا",p) else outputChatBox("ليس لديك الداتا",p) end end) حط ذا الكود كلنت واكتب hl وشوف وش يظهر وقول لي Link to comment
Ja[B]er[X]Pro Posted May 31, 2016 Author Share Posted May 31, 2016 يجيني لديك الداتا addCommandHandler("afk",function(source) if getElementData(source,"afk",true) then local name = getPlayerName(source) outputChatBox("[AFK]The Player ["..name.."] Was Back#!",root,0,255,0) setElementData(source,"afk",false) else local name = getPlayerName(source) setElementData(source,"afk",true) outputChatBox("[AFK]The Player ["..name.."] Was AFK!!",root,255,0,0) end end) اكواد الافك Link to comment
Me[Z]oO Posted May 31, 2016 Share Posted May 31, 2016 addEventHandler("onMapLoad",root,function() if getElementData(source,"afk") == true then killPlayer(source) end end) Link to comment
Ja[B]er[X]Pro Posted May 31, 2016 Author Share Posted May 31, 2016 addEventHandler("onMapLoad",root,function() if getElementData(source,"afk") == true then killPlayer(source) end end) ما يشتغل Link to comment
Me[Z]oO Posted May 31, 2016 Share Posted May 31, 2016 كيف م يشتغل تاكد من ان الداتا معك Link to comment
Ja[B]er[X]Pro Posted May 31, 2016 Author Share Posted May 31, 2016 متأكد من كل شيئ الاكواد كاملة addCommandHandler("afk",function(source) if getElementData(source,"afk",true) then local name = getPlayerName(source) outputChatBox("[AFK]The Player ["..name.."] Was Back#!",root,0,255,0) setElementData(source,"afk",false) else local name = getPlayerName(source) setElementData(source,"afk",true) outputChatBox("[AFK]The Player ["..name.."] Was AFK!!",root,255,0,0) end end) addEventHandler("onMapLoad",root,function() if getElementData(source,"afk") == true then killPlayer(source) end end) addCommandHandler("hl", function(p) if getElementData(p,"afk") then outputChatBox("لديك الداتا",p) else outputChatBox("ليس لديك الداتا",p) end end) اليمتا "jaber" version="1.0" type="script" name="AFK System" description="AFK......" /> Link to comment
محمد Posted May 31, 2016 Share Posted May 31, 2016 يجيني لديك الداتا addCommandHandler("afk",function(source) if getElementData(source,"afk",true) then local name = getPlayerName(source) outputChatBox("[AFK]The Player ["..name.."] Was Back#!",root,0,255,0) setElementData(source,"afk",false) else local name = getPlayerName(source) setElementData(source,"afk",true) outputChatBox("[AFK]The Player ["..name.."] Was AFK!!",root,255,0,0) end end) اكواد الافك addCommandHandler("afk",function(source) if getElementData(source,"afk") == true then local name = getPlayerName(source) outputChatBox("[AFK]The Player ["..name.."] Was Back#!",root,0,255,0) setElementData(source,"afk",false) else local name = getPlayerName(source) setElementData(source,"afk",true) outputChatBox("[AFK]The Player ["..name.."] Was AFK!!",root,255,0,0) end end) Link to comment
Me[Z]oO Posted May 31, 2016 Share Posted May 31, 2016 addCommandHandler("afk",function(source) if getElementData(source,"afk",true) then local name = getPlayerName(source) outputChatBox("[AFK]The Player ["..name.."] Was Back#!",root,0,255,0) removeElementData(source,"afk") else local name = getPlayerName(source) setElementData(source,"afk") outputChatBox("[AFK]The Player ["..name.."] Was AFK!!",root,255,0,0) end end) addEventHandler("onMapLoad",root,function() setTimer(function() if getElementData(source,"afk") == true then killPlayer(source) end,20000,1) end end) addCommandHandler("hl", function(p) if getElementData(p,"afk") then outputChatBox("لديك الداتا",p) else outputChatBox("ليس لديك الداتا",p) end end) جرب Link to comment
iMr.SFA7 Posted May 31, 2016 Share Posted May 31, 2016 killPlayer -> This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. Please use killPed instead. addEventHandler("onMapLoad",root,function() if getElementData(source,"afk") then killPed(source) end end) في هذا الحدث هو اللاعب تأكد source أنا أشك أن الـ Link to comment
#Soking Posted May 31, 2016 Share Posted May 31, 2016 addEventHandler("onMapLoad",root, function ( ) for _,Valc in ipairs(getElementsByType("player")) do if ( getElementData(Valc,"afk") == true ) then killPed(Valc) end end end ) Link to comment
محمد Posted May 31, 2016 Share Posted May 31, 2016 اذا الايفنت ماخذه من مود ثاني حط فوق addEvent("onMapLoad",true) Link to comment
Me[Z]oO Posted May 31, 2016 Share Posted May 31, 2016 addCommandHandler("afk",function(source) if getElementData(source,"afk",true) then local name = getPlayerName(source) outputChatBox("[AFK]The Player ["..name.."] Was Back#!",root,0,255,0) removeElementData(source,"afk") else local name = getPlayerName(source) setElementData(source,"afk") outputChatBox("[AFK]The Player ["..name.."] Was AFK!!",root,255,0,0) end end) addEventHandler("onMapLoad",root,function() setTimer(function() if getElementData(source,"afk") == true then killPed(source) end,20000,1) end end) addCommandHandler("hl", function(p) if getElementData(p,"afk") then outputChatBox("لديك الداتا",p) else outputChatBox("ليس لديك الداتا",p) end end) جرب Link to comment
!#NssoR_) Posted May 31, 2016 Share Posted May 31, 2016 onMapLoad - Wiki : The source of this event refers to the loaded map. 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