Jump to content

MTA SDK Adding user to ACL group


dewu

Recommended Posts

Humph, I write something like this:

  
function addvip ( account ) 
    for i, v in pairs ( getElementsByType ( "player" ) ) do 
        local a = getPlayerAccount ( v ) 
        if ( not isGuestAccount ( a ) and getAccountName ( a ) == account ) then 
             aclGroupAddObject (aclGetGroup("VIP"), "user."..v) 
            return true 
        end 
    end 
    return false 
end 
  

PHP side:

         $account = $_POST["account"];               include("sdk/mta_sdk.php");        $mtaServer = new mta("31.186.83.100", 22013, "mylogin", "mypassword" );      $mtaServer->getResource("vipadd")->call("addvip", $account); 

and HTML:

 Login:  type="text" name="account"> 

Link to comment

I don't think so MJNONFIK.

And

  
  
  
function addvip ( account ) 
    for i, v in pairs ( getElementsByType ( "player" ) ) do 
        local a = getPlayerAccount ( v ) 
        if ( not isGuestAccount ( a ) and getAccountName ( a ) == account ) then 
             aclGroupAddObject (aclGetGroup("VIP"), "user."..v) 
             aclSave() 
            return true 
        end 
    end 
    return false 
end 
  

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