Jump to content

الرجاء المساعدة


Qus4Y

Recommended Posts

طلب مساعدة

عندي مشكلة بالسكربت انه ما يرقي انا ضفت تيبل عشان تنحذف الرتبة الي معاه وتجي الجديدة لما يشتريها والادمن المخالف ما يقدر يرقي نفسه وما يظبت معي

للعلم كان يشتغل بدون التيبل الي تحذف وتضيف رتبة جديدة

x5VlszT.jpg

 

الكود 

 

groupsToRemove = { 'Moderator1', 'Moderator2' };

addEvent("onBuyRank",true) 
addEventHandler("onBuyRank",root,function ( Rank,Level ) 
if ( isGuestAccount(getPlayerAccount(source)) ) then return outputChatBox("* Please Register To Buy Rank",source,255,0,0,true) end 
if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin.ex")) ) then return end 
if ( tonumber( gettok(getElementData(source,"Level"), 2, string.byte(' ')) ) >= tonumber(Level) ) then 
aclGroupAddObject (aclGetGroup( tostring(Rank)),"user."..getAccountName(getPlayerAccount(source)))
for i, _ in ipairs( groupsToRemove ) do
	if ( isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( source ) ), aclGetGroup( groupsToRemove[i] ) ) and groupsToRemove[i] ~= tostring( Rank ) ) then
		aclGroupRemoveObject( aclGetGroup( tostring( Rank ) ), 'user.'..getAccountName( getPlayerAccount( source ) ) )
	end
end
outputChatBox("* You Has Been Buy ".. Rank .." !",source,255,255,0,true) 
else 
outputChatBox("* You Has Been Buy ".. Level .." !",source,255,255,0,true) 
end 
end) 
  

 

 

 

Edited by Qus4Y
Link to comment

جرب

groupsToRemove = { "Moderator1", "Moderator2" };

addEvent ( "onBuyRank", true )
addEventHandler ( "onBuyRank", root,
	function ( rank, Level )
		if rank and Level then
			local acc = getPlayerAccount ( source )
			if acc and not isGuestAccount ( acc ) then
			if isObjectInACLGroup ("user."..getAccountName(acc), aclGetGroup ( "Admin-Ex" ) ) then return false end
				if ( tonumber( gettok(getElementData(source,"Level"), 2, string.byte(' ')) ) >= tonumber(Level) ) then 
					aclGroupAddObject (aclGetGroup( tostring(Rank)),"user."..getAccountName(acc))
					for i,v in ipairs( groupsToRemove ) do
							if ( isObjectInACLGroup( "user."..getAccountName(acc), aclGetGroup( v ) ) and v ~= tostring( Rank ) ) then
								aclGroupRemoveObject( aclGetGroup( tostring( Rank ) ), "user."..getAccountName( acc ) )
							end
						end
					end
				end
			end
		end
	end
)

 

Edited by Deativated
Link to comment
1 hour ago, Deativated said:

جرب


groupsToRemove = { "Moderator1", "Moderator2" };

addEvent ( "onBuyRank", true )
addEventHandler ( "onBuyRank", root,
	function ( rank, Level )
		if rank and Level then
			local acc = getPlayerAccount ( source )
			if acc and not isGuestAccount ( acc ) then
			if isObjectInACLGroup ("user."..getAccountName(acc), aclGetGroup ( "Admin-Ex" ) ) then return false end
				if ( tonumber( gettok(getElementData(source,"Level"), 2, string.byte(' ')) ) >= tonumber(Level) ) then 
					aclGroupAddObject (aclGetGroup( tostring(Rank)),"user."..getAccountName(acc))
					for i,v in ipairs( groupsToRemove ) do
							if ( isObjectInACLGroup( "user."..getAccountName(acc), aclGetGroup( v ) ) and v ~= tostring( Rank ) ) then
								aclGroupRemoveObject( aclGetGroup( tostring( Rank ) ), "user."..getAccountName( acc ) )
							end
						end
					end
				end
			end
		end
	end
)

نفس المشكلة ما يرقي

 

Link to comment

جرب ~

 

groupsToRemove = { 'Moderator1', 'Moderator2' };

addEvent( 'onBuyRank', true )
addEventHandler ( 'onBuyRank', root,
function ( rank, Level )
	if ( rank and Level ) then
		local acc = getPlayerAccount( source )
			if ( not acc or isGuestAccount ( acc ) ) then return end
				if ( isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( 'Admin-Ex' ) ) ) then return end
					if ( tonumber( gettok( getElementData( source, 'Level'), 2, string.byte(' ')) ) >= tonumber(Level) ) then 
				aclGroupAddObject ( aclGetGroup( tostring( rank ) ), 'user.'..getAccountName( acc ) )
			for i, _ in ipairs( groupsToRemove ) do
				if ( isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( groupsToRemove[i] ) ) and groupsToRemove[i] ~= tostring( rank ) ) then
					aclGroupRemoveObject( aclGetGroup( tostring( rank ) ), 'user.'..getAccountName( acc ) )
				end
			end
		end
	end
end );

 

Edited by MR.GRAND
Link to comment
1 hour ago, MR.GRAND said:

جرب ~

 


groupsToRemove = { 'Moderator1', 'Moderator2' };

addEvent( 'onBuyRank', true )
addEventHandler ( 'onBuyRank', root,
function ( rank, Level )
	if ( rank and Level ) then
		local acc = getPlayerAccount( source )
			if ( not acc or isGuestAccount ( acc ) ) then return end
				if ( isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( 'Admin-Ex' ) ) ) then return end
					if ( tonumber( gettok( getElementData( source, 'Level'), 2, string.byte(' ')) ) >= tonumber(Level) ) then 
				aclGroupAddObject ( aclGetGroup( tostring( rank ) ), 'user.'..getAccountName( acc ) )
			for i, _ in ipairs( groupsToRemove ) do
				if ( isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( groupsToRemove[i] ) ) and groupsToRemove[i] ~= tostring( rank ) ) then
					aclGroupRemoveObject( aclGetGroup( tostring( rank ) ), 'user.'..getAccountName( acc ) )
				end
			end
		end
	end
end );

 

ما ضبط 

Link to comment
local groupsToRemove = { 'Moderator1', 'Moderator2' };

addEvent( 'onBuyRank', true )
addEventHandler ( 'onBuyRank', root,
function ( rank, Level )
	if ( rank and Level ) then
		local acc = getPlayerAccount( source )
			if ( not acc or isGuestAccount ( acc ) ) then return end
				if ( isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( 'Admin-Ex' ) ) ) then return end
					if ( tonumber( gettok( getElementData( source, 'Level'), 2, string.byte(' ')) ) >= tonumber(Level) ) then 
				aclGroupAddObject ( aclGetGroup( tostring( rank ) ), 'user.'..getAccountName( acc ) )
			for i, _ in ipairs( groupsToRemove ) do
				if ( isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( groupsToRemove[i] ) ) and groupsToRemove[i] ~= rank ) then
					aclGroupRemoveObject( aclGetGroup( groupsToRemove[i] ), 'user.'..getAccountName( acc ) )
				end
			end
		end
	end
end );


Done! :-P

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