Jump to content

Need help with admin_System


Recommended Posts

We need these Commands in for admin Control for a panel or the Chat box like /TP

/adminduty --go on admin duty.you can see reports only if you on duty

/reports --see any open report

/goto name --warp to player

/get name --warp player to you

/gotovehicle id --warp to vehicle

/getvehicle id --warp vehicle to you

/ann text ---announcements

/wr --show server information details

/a --admin chat

/respawnvehicles -- do /ann respawn in 10 sec first

/repairvehicles

/repairvehicle playername --repair single vehicle

/respawnvehicle ID --respawn single vehicle

/recon playername --spectate

/recon -- stop spectate

/setcolor name id1 id2 --change vehicle color

/setname firstname newname newlastname -change name

/jail playername time reason --admin jail

/tempvehicle ID ---to create a temp vehicle.it gets deleted on respawn

/freecam

/cr code --- Close report

/trackpm --Private message tracker

/tp --Teleport bookmarker

/freecam --Toggle freecam mode

/ban [playername] [reason] [Time|0 for infinite]

/kick [playername] [reason]

Type only command for SYNTAX if something is written wrong above

Edited by Guest
Link to comment

try this not tested but need to work if not writ the error you got

addEventHandler ("onPlayerChat",getRootElement(), 
function(message,typ,player) 
if (type(string.find(message,"/admins")) == "number") then 
outputChatBox("*Owner: writ your name " ) 
outputChatBox("*Leader Admins: write your leader admin") 
outputChatBox("*Super Admin: write your super admin names") 
outputChatBox("*Admin: write your admin names" ) 
outputChatBox("*Trial Admin: write your trial admins name  ") 
end 
end 
   ) 

Edited by Guest
Link to comment
  
addCommandHandler("admins",function() 
  all=aclGroupList () 
  for _,v in ipairs(all) do 
    local name=aclGetName(v) 
    if name~="Everyone" then 
      local objs=aclGroupListObjects(v) 
      local tooutput={} 
      for _,obj in ipairs(objs) do 
        if string.find(obj,"user.") then 
          table.insert(tooutput,obj:gsub("user.","")) 
        end 
      end 
      outputChatBox("*"..name.."'s : "..table.concat(tooutput,", "),0,255,0,true) 
   end 
end) 
  
  

Link to comment

yes but admin and trial admin maybe is a group and "leader admin" = admin group or super admin he don't say this only he is the boss of server = he is the leader admin ..... I only make to work for groups he ask (owner is not a group) ...

Link to comment

that command handler work 100% i use it on 2 script and no error or bug

only i forgot to delet the local player name bk i copy tha handler form 1 of my scripts ..

(he can add an outputChatBox but i don't think he can whit 0% of scripting skill )

but whit this i don't wanna say your code is not good only i make it easy as possible to edit that code for a person who don't have scripting skill

Edited by Guest
Link to comment
that command handler work 100% i use it on 2 script and no error or bug

only i forgot to delet the local player name bk i copy tha handler form 1 of my scripts ..

its not so efficent.

checking is it right command in C++ is far more efficent then duing it in lua.

Link to comment
When we go on admin duty we want it to say in the Log

Like this

(SAUR)DanChris is now on admin Duty

Maybe you can need this:

function Admin_Message() 
if ( getAccountData( getPlayerAccount( source ), "admin" ) == true ) then 
    outputChatBox( getPlayerName( source ) .. "is now on duty.", getRootElement(), 155, 155, 0 ) 
    end 
end 
addEventHandler( "onPlayerLogin", getRootElement(), Admin_Message ) 

Link to comment

And these Commands

/adminduty --go on admin duty.you can see reports only if you on duty

/reports --see any open report

/goto name --warp to player

/get name --warp player to you

/gotovehicle id --warp to vehicle

/getvehicle id --warp vehicle to you

/ann text ---announcements

/toggleooc --Toggles the global OOC chat

/wr --show server information details

/a --admin chat

/respawnvehicles -- do /ann respawn in 10 sec first

/refillvehicles

/repairvehicles

/repairvehicle playername --repair single vehicle

/respawnvehicle ID --respawn single vehicle

/recon playername --spectate

/recon -- stop spectate

/createatm ---create an atm

/nearbyatms ---gives you atm ids

/deleteatm id ---delete atm

/setcolor name id1 id2 --change vehicle color

/setname firstname newname newlastname -change name

/jail playername time reason --admin jail

/tempvehicle ID ---to create a temp vehicle.it gets deleted on respawn

/freecam

/cr code --- Close report

/trackpm --Private message tracker

/tp --Teleport bookmarker

/freecam --Toggle freecam mode

/ban [playername] [reason] [Time|0 for infinite]

/kick [playername] [reason]

Type only command for SYNTAX if something is written wrong above

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