SycroX Posted January 30, 2016 Share Posted January 30, 2016 سلام عليكم انا مسوي كود تحقق بلتايمر ابي اتحقق لو اللاعب معه داتا PoliceKing و لو معه يعطيه جروب في اي بي بس ما ظبتت الكود function CheakBest() for i, player in ipairs(getElementsByType("player")) do if getElementData(player, "PoliceKing") == true then local accountName = getAccountName(getPlayerAccount(player)) aclGroupAddObject (aclGetGroup("VIP"), "user."..accountName) else aclGroupRemoveObject (aclGetGroup("VIP"), "user."..accountName) end end end setTimer(CheakBest, 2000, 0, true) Link to comment
#Mr.alkmasha Posted January 30, 2016 Share Posted January 30, 2016 function CheakBest(plrName) if getElementData(plrName, "PoliceKing") == true then aclGroupAddObject(aclGetGroup("VIP"),"user."..getAccountName((getPlayerAccount(plrName))) ) end end setTimer(CheakBest, 2000, 0, true) Link to comment
` Allawi Posted January 30, 2016 Share Posted January 30, 2016 ضيف المود في قروب ادمن Link to comment
SycroX Posted January 30, 2016 Author Share Posted January 30, 2016 فكرك ما جربتها :- مو شغالة Link to comment
#CroSs Posted January 30, 2016 Share Posted January 30, 2016 فكرك ما جربتها :-مو شغالة جرب function CheckPlayer( Player ) local Group = aclGetGroup( "VIP" ) if ( Group ) then local PlayerAccount = getPlayerAccount( Player ) if ( not isGuestAccount( PlayerAccount ) ) then local Object, Boolean = "user."..getAccountName( PlayerAccount ), getElementData( Player, "PoliceKing" ) local Exists = isObjectInACLGroup( Object, Group ) if ( Boolean and not Exists or not Boolean and Exists ) then ( Boolean and aclGroupAddObject or aclGroupRemoveObject )( Group, Object ) end end end end for _, Player in ipairs( getElementsByType( "player" ) ) do CheckPlayer( Player ) end addEventHandler( "onElementDataChange", root, function( DataName ) if ( DataName == "PoliceKing" and getElementType( source ) == "player" ) then CheckPlayer( source ) end end ) Link to comment
SycroX Posted January 30, 2016 Author Share Posted January 30, 2016 يعطي رتبة بس ما يسحب لما تروح الداتا منو Link to comment
#Mr.alkmasha Posted January 30, 2016 Share Posted January 30, 2016 function CheckPlayer( Player ) local Group = aclGetGroup( "VIP" ) if ( Group ) then local PlayerAccount = getPlayerAccount( Player ) if ( not isGuestAccount( PlayerAccount ) ) then local Object, Boolean = "user."..getAccountName( PlayerAccount ), getElementData( Player, "PoliceKing" ) local Exists = isObjectInACLGroup( Object, Group ) if ( Boolean and not Exists or not Boolean and Exists ) then ( Boolean and aclGroupAddObject or aclGroupRemoveObject )( Group, Object ) end end end end for _, Player in ipairs( getElementsByType( "player" ) ) do CheckPlayer( Player ) end addEventHandler( "onElementDataChange", root, function( DataName ) if ( DataName == "PoliceKing" and getElementType( source ) == "player" ) then CheckPlayer( source ) end end ) setTimer(function(plrName) if getElementData(plrName, "PoliceKing") ~= true then aclGroupRemoveObject(aclGetGroup("VIP"),"user."..getAccountName((getPlayerAccount(plrName))) ) end end,10*500,0) Link to comment
Jupi Posted January 30, 2016 Share Posted January 30, 2016 (edited) function CheckPlayer( Player ) local Group = aclGetGroup( "VIP" ) if ( Group ) then local PlayerAccount = getPlayerAccount( Player ) if ( not isGuestAccount( PlayerAccount ) ) then local Object, Boolean = "user."..getAccountName( PlayerAccount ), getElementData( Player, "PoliceKing" ) local Exists = isObjectInACLGroup( Object, Group ) if ( Boolean and not Exists or not Boolean and Exists ) then ( Boolean and aclGroupAddObject or aclGroupRemoveObject )( Group, Object ) end end end end for _, Player in ipairs( getElementsByType( "player" ) ) do CheckPlayer( Player ) end addEventHandler( "onElementDataChange", root, function( DataName ) if ( DataName == "PoliceKing" and getElementType( source ) == "player" ) then CheckPlayer( source ) end end ) setTimer(function(plrName) if getElementData(plrName, "PoliceKing") ~= true then aclGroupRemoveObject(aclGetGroup("VIP"),"user."..getAccountName((getPlayerAccount(plrName))) ) end end,10*500,0) انت كدة معملتش حاجة الا انك زودت تايمر خربان بس :'D + من وين اجا plrname? Edited January 30, 2016 by Guest Link to comment
#CroSs Posted January 30, 2016 Share Posted January 30, 2016 يعطي رتبةبس ما يسحب لما تروح الداتا منو . يسحب ، مجربه أنا Link to comment
SycroX Posted January 30, 2016 Author Share Posted January 30, 2016 اه يب يسحب مشكور جدا كروس حليت لي ازمة Link to comment
#Mr.alkmasha Posted January 30, 2016 Share Posted January 30, 2016 انت كدة معملتش حاجة الا انك زودت تايمر خربان بس :'D + من وين اجا plrname? اذا احول و ما تشوف setTimer(function(plrName) Link to comment
Jupi Posted January 30, 2016 Share Posted January 30, 2016 انت كدة معملتش حاجة الا انك زودت تايمر خربان بس :'D + من وين اجا plrname? اذا احول و ما تشوف setTimer(function(plrName) انا برضو اللي احول؟ هههههههه يخي انت شكلك واخذ الاقواس تعرف اي شيء =_=" روح سوي كذا setTimer(plrname) outputChatBox(getPlayerName(plrname), root) end, 1000, 1) قولي وش يطلع لك Link to comment
#Mr.alkmasha Posted January 30, 2016 Share Posted January 30, 2016 (edited) DELETED. Edited February 1, 2016 by Guest Link to comment
Jupi Posted January 30, 2016 Share Posted January 30, 2016 (edited) و ما غيرت مسار الموضوع =_=" خخخخخخخخخخخ المهم بفهمك شيء الاقواس ما راح تعرف الاعب و لما يجي يجيب اسمه بيقولك nil و شاطر يا مبرمج Edited February 1, 2016 by Guest 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