Jump to content

مشكلة if isObjectInACLGroup


SAM!!

Recommended Posts

function LauncherVIP () 
   local accName = getAccountName ( getPlayerAccount ( source ) )
if isObjectInACLGroup("user." .. accName, aclGetGroup("Best-G")) or isObjectInACLGroup("user." .. accName, aclGetGroup("Best-P")) then
setElementData(source,"GLA",(getElementData(source,"GLA")or 0)+3)
outputChatBox ("#00FF00|Best-System|#CC0000 : You take 3 Launcher successfully . Wait 10 minutes to again.",source,255,255,0,true)
   end
end
addEvent( "LauncherVIP", true )
addEventHandler( "LauncherVIP", getRootElement(),LauncherVIP )

 

ذي سيرفر

هل في مشكلة هون وخصوصا السطر الثاني والثالث

وشكرا..

Edited by SAM!!
Link to comment

غير مجرب#
 

function LauncherVIP ( player ) 
   local accName = getPlayerAccount ( player )
   if accName and not isGuestAccount ( accName ) then
   if isObjectInACLGroup("user."..getAccountName(accName), aclGetGroup("Best-G")) or isObjectInACLGroup("user." .. accName, aclGetGroup("Best-P")) then 
setElementData(player,"GLA",(getElementData(player,"GLA")or 0)+3)
outputChatBox ("#00FF00|Best-System|#CC0000 : You take 3 Launcher successfully . Wait 10 minutes to again.",player,255,255,0,true)
   end
end
end
addEvent( "LauncherVIP", true )
addEventHandler( "LauncherVIP", getRootElement(),LauncherVIP )

جرب وعطني خبر

Link to comment
function LauncherVIP () 
   if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then return end 
        if isObjectInACLGroup("user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup("Best-G")) or isObjectInACLGroup("user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup("Best-P")) then
        setElementData( source , 'GLA' , getElementData ( source , 'GLA' ) +3 )
        outputChatBox ("#00FF00|Best-System|#CC0000 : You take 3 Launcher successfully . Wait 10 minutes to again.",source,255,255,0,true)
		end
end
addEvent( "LauncherVIP", true )
addEventHandler( "LauncherVIP", getRootElement(),LauncherVIP )

جرب ..

Link to comment
local uGroups_ = { 
	'Best-G' ,
	'Best-P' 
}

addEvent ( 'LauncherVIP' , true )
addEventHandler ( 'LauncherVIP' , root , 
	function (	) 
		if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then 
			return 
		end 
		for _ , group in ipairs ( uGroups_ ) do
			if ( isObjectInACLGroup ( 'user.' ..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( group ) ) ) then
				local uData_ = getElementData ( source , 'GLA' )
				if ( uData_ == 0 ) or ( uData_ == nil ) then 
					setElementData ( source , 'GLA' , 3 )
				elseif ( uData_ > 0 ) then 
					setElementData ( source , 'GLA' , uData_ + 3 )
				end 
				outputChatBox ( '#00FF00|Best-System|#CC0000 : You take 3 Launcher successfully . Wait 10 minutes to again.' , source , 255 , 255 , 0 , true )
			end 
		end 
	end
)

 

Edited by #_iMr.[E]coo
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...