Kutlu35 Posted August 31, 2017 Share Posted August 31, 2017 Hey , i wan't make teleport all players to admin script. Example: I type "/getall" and every player in the server comes to me. Can anybody help me with start ? I think that funcitions are usefully: getElementPosition setElementPosition addCommandHandler Link to comment
Master_MTA Posted August 31, 2017 Share Posted August 31, 2017 (edited) addCommandHandler('getall',function(plr) local acc=getPlayerAccount(plr) if not acc then return end local accname=getAccountName(acc) if not isObjectInACLGroup('user.'..accname,aclGetGroup('Console')) then return end local elements=getElementsByType('player') if #elements==0 then return end local x,y,z=getElementPosition(plr) local int=getElementInterior(plr) local dim=getElementDimension(plr) for k,v in ipairs(elements)do if v~=plr setElementDimension(v,dim) setElementInterior(v,int,x,y,z+2) outputChatBox('#33ff00you have been warapped to ['..getPlayerName(plr)..'#33ff00] by admin system ',v,255,255,255,true) end end end) try this Edited August 31, 2017 by Master_MTA 1 Link to comment
Kutlu35 Posted September 1, 2017 Author Share Posted September 1, 2017 5 hours ago, Master_MTA said: addCommandHandler('getall',function(plr) local acc=getPlayerAccount(plr) if not acc then return end local accname=getAccountName(acc) if not isObjectInACLGroup('user.'..accname,aclGetGroup('Console')) then return end local elements=getElementsByType('player') if #elements==0 then return end local x,y,z=getElementPosition(plr) local int=getElementInterior(plr) local dim=getElementDimension(plr) for k,v in ipairs(elements)do if v~=plr setElementDimension(v,dim) setElementInterior(v,int,x,y,z+2) outputChatBox('#33ff00you have been warapped to ['..getPlayerName(plr)..'#33ff00] by admin system ',v,255,255,255,true) end end end) try this Oh thanks i'll test this today Link to comment
Master_MTA Posted September 1, 2017 Share Posted September 1, 2017 (edited) 8 hours ago, Kutlu35 said: Oh thanks i'll test this today any time Edited September 1, 2017 by Master_MTA 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now