Jump to content

ACL GROUP - OuTputChatBox


Annas

Recommended Posts

hello community Member ,

so ..

i try to create a simple resource But idk why it's not work :D

CLIENT SIDE :

function donatorL1 ( source, commandName, teamName ) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "DL1" ) ) then   
    outputChatBox("Welcome To Your Donator Level 1", source, 60, 255, 0) 
    end 
end 
addEventHandler ( "onPlayerLogin", donatorL1 ) 

my work is about : when a player in ACL Group "DL1" then when he logged in (outPut in His ChatBox "Welcome To Your Donator Level 1" )

idk why it's not work ..

Link to comment
function donatorL1 (player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "DL1" ) ) then   
    outputChatBox("Welcome To Your Donator Level 1", player, 60, 255, 0) 
    end 
end 
addEventHandler ( "onPlayerLogin", getRootElement(), donatorL1 ) 

Link to comment
function donatorL1() 
    local accName = getAccountName(getPlayerAccount(source)) 
    if isObjectInACLGroup("user."..accName, aclGetGroup("DL1")) then 
       outputChatBox("Welcome To Your Donator Level 1", source, 60, 255, 0) 
    end 
end 
addEventHandler("onPlayerLogin", getRootElement(), donatorL1) 

its server side not client so for that not work

Edited by Guest
Link to comment

:o is that code client said man read the Wiki page

Simply it can be like this.

-- Server side

function donatorL1(_,cur) 
    local accName = getAccountName(cur) 
    if isObjectInACLGroup("user."..accName, aclGetGroup("DL1")) then 
       outputChatBox("Welcome To Your Donator Level 1.",source, 60, 255, 0) 
    end 
end 
addEventHandler("onPlayerLogin", getRootElement(), donatorL1) 

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