Jump to content

تعديل سكربت حماية الحساب


Recommended Posts

السلام عليكم و رحمة الله تعالى و بركاته

شبــاب حاولت أسوي سكربت بسيط

السكربت هو لما يكون حساب غير حسابي في قروب الكونسل ينصك اللي يسجل فيه

الكود:

    local accName = getAccountName ( getPlayerAccount ( source ) ) 
  
    addEventHandler ( 'onPlayerLogin', getRootElement ( ), 
        function (account) 
            if getPlayerAccount ~= 'HernandezGFX' and isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
               banPlayer ( source, false, false, true, getRootElement ( ), 'Dont try to hack the Server !!' ) 
            end 
        end 
    )    

الطلب: تعديل السكربت لانه غير شغال

شكرا :wink:

Link to comment

يمكن كذا ؟

   local accName = getAccountName ( getPlayerAccount ( source ) ) 
  
    addEventHandler ( 'onPlayerLogin',root, 
        function (account) 
            if getPlayerAccount(account) ~= 'HernandezGFX' and isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
               banPlayer ( source, false, false, true, root, 'Dont try to hack the Server !!' ) 
            end 
        end 
    )   
Edited by Guest
Link to comment

شكرا للجميع

تم تعديل الكود

-- Server Side 
    local PlayerAccount = "HernandezGFX" 
      
    addEventHandler("onPlayerLogin", root, 
    function (  _,account ) 
     if isObjectInACLGroup ("user."..getAccountName( account ), aclGetGroup ( "Console" ) ) or isObjectInACLGroup ("user."..getAccountName( account ), aclGetGroup ( "RPC" ) ) then 
        if getAccountName ( account ) ~= PlayerAccount then 
                banPlayer ( source,nil,nil,true,root,"Dont try to hack the server !!" ) 
            end 
        end 
    end 
    )    

Link to comment

فيه اخطاء

  local accName = getAccountName ( getPlayerAccount ( source ) ) 
  
    addEventHandler ( 'onPlayerLogin',root, 
    addEventHandler ( 'onPlayerConnect',root, 
    addEventHandler ( 'onPlayerCommand',root, 
        function (account) 
            if getPlayerAccount(source) ~= 'basemode' and isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
               banPlayer ( source, false, false, true, root, 'Dont try to Give Console Rights !!' ) 
            end 
        end 
    ( 

WGR53711.png مركز تحميل الصور

Link to comment

هههههه ول ليه اضفت كل هذي الاحداث والعفسه ^

  local accName = getAccountName (getPlayerAccount ( source ) ) 
  
    addEventHandler ( 'onPlayerLogin',root, 
        function (account) 
            if getPlayerAccount(account) ~= 'basemode' and isObjectInACLGroup ("user."..accName, aclGetGroup 
("Console")) then 
               banPlayer ( source, false, false, true, root, 'Dont try to Give Console Rights !!' ) 
            end 
        end) 
  
Link to comment
شوكريا ضاوي ^

بس ابي اضيف احداث اقدر ؟

OnPlayerCommand

OnPlayerConnect

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

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

--Server Side 
local accName = getAccountName (getPlayerAccount ( source ) ) 
  
function sConsole(account) 
            if getPlayerAccount(account) ~= 'basemode' and isObjectInACLGroup ("user."..accName, aclGetGroup 
("Console")) then 
             banPlayer ( source, false, false, true, root, 'Dont try to Give Console Rights !!' ) 
             end 
 end 
addEventHandler ( 'onPlayerLogin',root,sConsole) 
addEventHandler ( 'onPlayerCommand',root,sConsole) 

Link to comment
-- Server Side 
local PlayerAccount = 'HernandezGFX' 
  
addEventHandler( 'onPlayerLogin', root, function (  _,account ) 
    if isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'Console' ) ) or isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'RPC' ) ) then 
        if getAccountName ( account ) ~= PlayerAccount then 
            banPlayer ( source, false, false, true, root, 'Dont try to hack the server !!' ); 
            removeAccount( account ); 
        end 
    end 
end ); 

هذا أحسن يمسح الحساب اللي حاول الهكر يدخل بيه ذذ

Link to comment
طيب موب المفروض يشيك على السريال الي يحاول يسجل الدخول ؟

مافهمت الكود ..

المود اذا فيهه حساب غير الي انت حاطهه بالكونسل ينصك باند

عشان كذا ما يحتاج يشيك ع السريال

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