Jump to content

تصحيح كود تحقق


SycroX

Recommended Posts

سلام عليكم انا مسوي كود تحقق

بلتايمر

ابي اتحقق لو اللاعب معه داتا

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
فكرك ما جربتها :-

مو شغالة

جرب

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
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
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 by Guest
Link to comment

انت كدة معملتش حاجة الا انك زودت تايمر خربان بس

:'D

+

من وين اجا

plrname?

اذا احول و ما تشوف

setTimer(function(plrName) 

انا برضو اللي احول؟

هههههههه يخي انت شكلك واخذ الاقواس تعرف اي شيء

=_="

روح سوي كذا

  
setTimer(plrname) 
    outputChatBox(getPlayerName(plrname), root) 
end, 1000, 1) 
  

قولي وش يطلع لك :lol:

Link to comment

و ما غيرت مسار الموضوع =_="

خخخخخخخخخخخ

المهم بفهمك شيء

الاقواس ما راح تعرف الاعب

و لما يجي يجيب اسمه

بيقولك nil

و شاطر يا مبرمج :)

Edited by Guest
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...