Jump to content

ابي كود بسيط


Jw8.

Recommended Posts

local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
 function xteam ( source, commandName, teamName )
local myteam = createTeam ( Staff )  -- مثلا سويت تيم ستاف
if myteam then -- تحقق للتيم
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- تحقق لجروب ادمن
setPlayerTeam ( source, myteam ) -- تحويلك للتيم
end 
  end 
    end
addCommandHandler ( "st", xteam )

اذا كنت ادمن تدخله st مثال لما تكتب 

Edit

خطٱ ^

TeamName احذف

myteam = createTeam ( "Staff", 0, 255, 0 )

غير السطر 3 بدا^

Edited by #BrosS
Link to comment

local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
 function xteam ( source, commandName )
 setElementModel (skin ,160)
local myteam = createTeam ( Staff )  -- مثلا سويت تيم ستاف
if myteam then -- تحقق للتيم
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- تحقق لجروب ادمن
setPlayerTeam ( source, myteam ) -- تحويلك للتيم
end 
  end 
    end
addCommandHandler ( "st", xteam )

Link to comment
9 minutes ago, #BrosS said:

local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) function xteam ( source, commandName, teamName )local myteam = createTeam ( Staff )  -- مثلا سويت تيم ستافif myteam then -- تحقق للتيمif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- تحقق لجروب ادمنsetPlayerTeam ( source, myteam ) -- تحويلك للتيم
end 
  end 
    end
addCommandHandler ( "st", xteam )

اذا كنت ادمن تدخله st مثال لما تكتب 


هو قصده لو اي لاعب خارج قروب الأدمن وصار بـ تيم معين مثلا يطلعه من التيم لو هو مو ادمن

هذا طلبك تفضل ^
 

setTimer(
function( )
	local AdminsTeam = getTeamFromName('Admins')
		if ( AdminsTeam == nil or not AdminsTeam ) then return end
			local Players = getPlayersInTeam( AdminsTeam )
				for _, player in ipairs( Players ) do
					local account = getPlayerAccount( player )
						if ( isGuestAccount( account ) ) then
							setPlayerTeam( player, nil )
								outputChatBox( '* Error : #FFFFFF Sorry, you are not admin we took you out from "Admins" team ', source, 255, 0, 0, true )
								else
								if ( not isObjectInACLGroup( 'user.' .. getAccountName( account ), aclGetGroup( 'Admin' ) ) ) then
							setPlayerTeam( player, nil )
						outputChatBox( '* Error : #FFFFFF Sorry, you are not admin we took you out from "Admins" team ', source, 255, 0, 0, true )
					else
			return end
		end
	end
end, 50, 0 )

 

  • Like 1
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...